Modbus rtu master reading via modbus tcp from modbus rtu slaves

I am looking for a solution for remote reading of a Modbus-RTU-Master from a MODBUS RTU Smart meter like Carlo Gavazzi EM340 on long distances not having a direct 2-wire connection between both.
Luckily I have a LAN/WLAN network with ethernet switches close to both (RTU-Master and RTU-slave).

I would like to use f.i. two Raspberry Pis as CODECs / tranlaters. The poll of the RTU-Master shall be brigded to MODBUS TP/IP using an RS485-USB conector.

Once the request is transferred to modbus-TCP it should be read by another bridge (f.i. Raspberry-Pi) translating the modbus-TCP-request to modbus-RTU and connecting with another USB-RS485 connector to the smart meter modbus-RTU interface.

I don’t think that’ll work as Modbus/TCP isn’t 100% Modbus/RTU wrapped in IP.
You could try with a tunneling software such as ser2net, but ultimately a more clever approach
would be to install another openHAB instance on the remote RPi (could be a Zero for that single purpose) and to use the remote openHAB binding to access it from your main OH server.
This will save you from lots of potential timing and synchronisation problems.

O.K. Yes that is true. I will try out and will put the results here.

Why don’t you just use a ModbusTCP-to-ModbusRTU serial gateway?

The Master end (openHAB) talks Modbus-TCP directly to the ethernet, no converters or adaptors.
The Gateway converts ethernet to RS485 Modbus autonomously. Several slaves may share one wired bus/gateway.
Chinese made serial gateways are cheap, but make sure to choose one that handles Modbus corectly.

Hi @mstormi,
would OH3 work on rPi zero?

@gabreitenbach
I use Elfin-EW11 WiFi Modbus TCP to modbus RTU converter I bought from aliexpress for about 10 euros and works fine reading out SDM120 Modbus power meters

probably if you only use it for that

looked that up. How do you power it, what’s the connector type for power? Ali does not provide that info :frowning:

I have external 24VDC power supply. There is option that you buy the device with RJ45 connector on one side and screw terminals on the other, I purchased that option.

so no connector just blank wires for power in ? The RJ45-to-4x-screw is for the bus but not to power the device, isn’t it.

Yes

It is both power and RS485, I think the outside terminals were RS485 and the middle was power, not sure anymore

Pinouts here
http://www.hi-flying.com/elfin-ew10-elfin-ew11

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.