Helios Binding for Modbus TCP

Hey

If Helios is based on modbus, perhaps it would make sense to use the upcoming/wip modbus transport in openhab2? I have been working with the modbus binding for openhab2 and one of the motivations for me was to separate protocol from the binding.

I would like to hear if you find the current transport layer API suitable for Helios as well . I think it should be possible to make changes easily also at this point.

I’m looking at the code of HeliosCommunicator and I think it should work with the transport layer… The rest of the code would remain quite much unchanged as far as I can tell – after all, there’s no way around building requests or parsing registers the helios way.

The benefit would be that bug fixes and improvements to the protocol would be shared. Ideally, you could focus only on the Helios specifics and how to lay it out as things in openhab2. All modbus variants supported by the transport layer would be supported with hopefully smaller effort. The transport bundle for example contains bug fixes to the modbus library (it’s a forked version), ensures that slaves are not spammed with requests (some slaves cannot handle this, not sure how it is with helios slaves. With Modbus RTU, having silent period between requests is critical. Anyways, this is controllable as well).

See this thread Modbus openHAB2 binding available for alpha testing

For a quick peek at the protocol api, see this https://github.com/ssalonen/openhab2-addons/blob/modbus-openhab2-native-binding/addons/io/org.openhab.io.transport.modbus/src/main/java/org/openhab/io/transport/modbus/ModbusManager.java

I’m happy to answer further questions

Best
Sami