question

equi avatar image
equi asked

ET340 Modbus RTU to Modbus TCP

Hi@all,

I have a Carlo Gavazzi ET340 and a Waveshare RS485 TO ETH (B)


https://www.waveshare.com/wiki/RS485_TO_ETH_(B)


I configured that the Waveshare sends the Modbus RTU data to my MQTT broker. Unfortunately, above a certain power, the positive values are displayed negatively.


Now I am looking for another solution which does not need any additional software like the MQTT Broker.


Is there a way/device to convert all the Modbus RTU data of the ET340 into Modbus TCP, so that Venus OS can find and use the energymeter directly in the network?


regards,

equi

Energy MeterModbus TCPgrid
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
matt1309 avatar image
matt1309 answered ·

Hi @equi

I think Waveshare devices can convert RS485 to modbusTCP however I'm unsure if that will work with Venus os as the layout of the data in modbusTCP might be different to the ModbusTCP meters that Victron natively supports. You'd need to make sure the data was in a format of a meter supported by venus os for it to work. I dont think Waveshare device can do that (however someone please feel free to correct me).

What i mean is:

Your setup: RS485 meter + waveshare might assign this to Watts to register 1

EM24 meter: Which is ModbusTCP Meter might assign Watts to register 5.

Venus will be looking at register 5 for watts but you're sending it on 1.


You could intercept the modbustcp data and reorganise it using a raspi/server to match EM24 meter but for me at least that would be a more involved tasks.


The way i got around this problem is i got a second waveshare rs485 device one to send RS485 data and one to convert it back. (client and server is what Waveshare settings call them)

So it would go meter (RS485) - > Waveshare (convert to IP) -> over LAN -> Waveshare (convert back to RS485) -> RS485 to USB adapter -> venus os

3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Jan avatar image Jan commented ·

The last configuration (meter (RS485) - > Waveshare (convert to IP) -> over LAN -> Waveshare (convert back to RS485) -> RS485 to USB adapter -> venus os) works for you? I mean, do you have tested?

0 Likes 0 ·
matt1309 avatar image matt1309 Jan commented ·

@janobi

Yes this is what my system currently uses. It's not as flawless as using a wire as it is dependent on LAN but it's what I've been running for awhile.

ie if you have LAN connection goes down or has issues or if DHCP server has issues you can lose meter data for a few seconds however I only had 1 cat 6 to my install and needed it for internet so this was my only choice. However I've found messing with the waveshare reconnect speeds can drastically reduce the impact of this.


I personally plan on changing to running another wire (in the hopes of using it for CT clamp as I'm not a fan of ET112 time lag) but the above does work. I believe there are newer models of the waveshare devices now so the settings might not be the same but these are mine in case they're useful.


Server (IP 192.168.3.111, connected to ET112 energy meter): Note my LAN is 192.168.3.xx

1683713988560.png



Client (IP 192.168.3.110, connected to Venus os via rs485 to usb)

1683714109765.png

0 Likes 0 ·
1683713988560.png (64.8 KiB)
1683714109765.png (73.3 KiB)
Jan avatar image Jan matt1309 commented ·

That looks good. And its the same waveshare firmware version as in my installation. Thanks a lot

0 Likes 0 ·

Related Resources

Energy Meter Selection Guide

Modbus TCP Basics

Additional resources still need to be added for this topic