Getting started with Modbus

Hi all,
I’m getting AC units installed next week, and they’re modbus compatible with these gadgets: http://www.realtime-controls.co.uk/rtd/EN%20RTD-RA%20Installation%20Instructions%2021070-1.07.pdf

I’ve never touched modbus before, and it looks like a bit of a minefield to get into. Can I just buy something like this: https://www.amazon.co.uk/Waveshare-RS485-Ethernet-Converter-Auto-negotiation/dp/B0BGHVRMPJ/

Daisy chain up the AC units and plug the other end into the same network as OpenHab, and then expect to find a binding that’s going to magically work for me? Or is this going to be more involved? I’m happy enough with writing something to send TCP packets to the Waveshare device if there are no bindings that would be suitable to start with (looks like it supports MQTT too).

Or is there a lot more involvement in getting started with modbus?

Thanks.

Hi,

If you don’t have any experience, it can be difficult to configure. It is not only the serial port settings you need to take in account, but often there can be shifting in the address between the master and the slave or byte order can be different. Therefore, the first advice is connect a Modbus simulator and try to read and write the registers you want to include. Trying to figure out the communication via OH is not easy.

Once you get your register table working, you can include that in OH & try to read out the data. Daisy chaining devices is supported in Modbus and for sure it works in OH (I use it), but you need to define different slave ID at each device and also install 120ohm termination resistor on the beginning and end of the bus (i.e. at the master and at the last slave device in the chain).

Also important is not to try to poll the devices too often, in Modbus via serial line only one device should talk, so geve time of the device to answer the request. Usually 5 to 10s between polls is recommended

Good luck

1 Like