I would like to replace an EM24 Ethernet with an EM540 and can only connect to the Cerbo via a LAN cable.
can someone tell me if a standard RS485 to Lan converter, e.g. a Waveshare RS485 to RJ45 Ethernet Converter Module, works?
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
I would like to replace an EM24 Ethernet with an EM540 and can only connect to the Cerbo via a LAN cable.
can someone tell me if a standard RS485 to Lan converter, e.g. a Waveshare RS485 to RJ45 Ethernet Converter Module, works?
I am currently doing this with an EM530 (same as EM540, but with external CTs, US split-phase).
But to accomplish this, I've had to add two custom services in /opt/victronenergy/service. It will not work out of the box without modifying Venus OS.
The first service runs this:
/usr/bin/socat pty,link=/dev/ttyV0,raw tcp:192.168.1.101:502
The second service runs this:
/opt/victronenergy/dbus-cgwacs/dbus-cgwacs /dev/ttyV0
These services create a virtual pty that the Cerbo GX or other Venus OS device can use like a regular serial port, and then starts a CGwacs instance on it. I like the services approach because they automatically reconnect if the ethernet is disconnected or power is cycled, it just keeps working.
This Waveshare device is used in Transparent mode on port 502. This is NOT modbusTCP! It is modbusRTU over TCP/IP. I also set the EM530 and waveshare to use a 115200 baud rate because I like my data snappy. This is working very very well in v3.00~36 for me. dbus-spy and the Cerbo menus are updating grid power at what appears to be 10 Hz.
Just done this with my ET112 meter, works like a charm.
Thanks for putting this mod out there :)
Full process for anyone else wondering is...
cd /opt/victronenergy/service
mkdir meter1 meter2
cd meter1
nano run
paste this code
#!/bin/sh exec 2>&1 exec /usr/bin/socat pty,link=/dev/ttyV0,raw tcp:<<RS485 TO ETHERNET IP HERE>>:502
Exit nano
chmod 755 run
cd ../meter2
nano run
paste this code
#!/bin/sh exec 2>&1 exec /opt/victronenergy/dbus-cgwacs/dbus-cgwacs /dev/ttyV0
exit nano
chmod 755 run
Then reboot
After reboot, you'll see your ModbusRTU over Ethernet bridge working, and hopefully, the meter will have already been populated in the system.
I'm about to receive my EM530 and can't find any info or examples of connections. It'll be a 3-wire split phase installation.
Thanks!
https://www.gavazzionline.com/pdf/EM530_DS_ENG.pdf
page 13, figure 6 for usa split phase (they call it two-phase).
You need to bring {L1,L2,N,Ground} from a breaker and busbars in your panel to a suitable junction box. If you double tap a breaker, make sure the wire you run is rated for the breaker current (e.g. AWG 12 for a double pole 20A breaker). L1 and L2 only provide miniscule power to run the EM530, and to sense voltage and phase. I put el-cheapo inline glass fuses for this purpose in the box, but you could put them in your panel and run smaller wires I suppose, not sure of NEC code for that.
The CTs go around your main panel feeds, you have to get the direction right. Did you find 5A CTs suitable for 200A? I got mine on Amazon. The CT wires have to run to the junction box as well, I twisted mine and put a shield around them, not sure if that was necessary. The ground wire is necessary to ground your metal junction box, and to ground reference one leg of the CTs to avoid having thousands of volts floating. Do not run current through the CTs if the leads are floating unconnected!
I have a similar problem but i use FHEM as gateway. But i am not so familiar with the VenusOS.
Can you add some more comment on your solution?
In which file i can add the two lines to have the service available on startup?
How can i check if the service is running correct?
I get no responce on the console if i run the fist service and also there also no TCP-request on my gateway.
I’m not a Venus OS expert, all I did was clone one of the existing directories in /opt/victronenergy/services, creating two new directories, and then modified the command lines in the ‘run’ file in the new directories to what I posted above.
I recommend spending some time reading posts and the GitHub documentation of VenusOS. My solution is just a hack to make it work, it needs to be re-installed with every release. Others in the Modifications space with more VenusOS experience may be more helpful.
42 People are following this question.