volkszaehler / mbmd

ModBus Measurement Daemon - simple reading of data from ModBus meters and grid inverters
BSD 3-Clause "New" or "Revised" License
224 stars 81 forks source link

Unable to create RTU over TCP connections to multiple devices at different IPs #306

Open InternetPersonality opened 1 year ago

InternetPersonality commented 1 year ago

First, I want to thank you for this useful piece of software.

I have two different grid meters I want to open in one mbmd instance at the same time. They are in adjacent buildings and thus have separate RTU to Ethernet adapters with different IPs.

According to the documentation, one can open TCP connections to multiple meters at different IPs using the -d xy@IP feature. However, as far as I can tell with my precompiled package, you cannot identify this additional connection to be made as RTU over TCP. the --rtu modifier only applies to the -a standard adapter string and not to additional -d devices. It instead attempts a standard TCP connection, which fails.

Is this intended behavior? To quote the readme: "To use RTU devices with RS485/Ethernet adapters, add the --rtu switch to configure mbmd to use the TCP connection with RTU data format", this reads as if the modifier is supposed to be global?

It would be great to be able to set the --rtu modifier for every -d device.