I’ve encountered the problem with Modbus binding. Couldn’t find a way to configure several slaves in cfg. Whenever I put more than 1 slave, only one of them is working. Regardless of id, data type and so on. But 1 slave is always working fine.
The device I’m connecting to is Shneider-Electric ComBox, which is TCP-gate for multiple modbus-available devices.
I know somewhere from the forum the similar problem was in place with COM connections. And that was fixed in 1.8.1. Unfortunately in TCP mode still doesn’t work.
OpenHab and addons version 1.8.1.
Did anybody treat this problem with TCP-modbus protocol?
Also, if the device accepts at most one connection at a time, commands will still be problematic with the current implementation. I invite you to test the new experimental version available at this thread
Edit : BTW, can you please paste longer logs on pastebin. It would be also nice to know whether you get errors if you remove the write commands, ie just polling enabled.
2016-02-17 16:18:21.589 [INFO ] [.b.modbus.internal.ModbusSlave] - ModbusSlave error getting responce from slave 2016-02-17 16:18:24.606 [INFO ] [.b.modbus.internal.ModbusSlave] - ModbusSlave error getting responce from slave 2016-02-17 16:18:29.565 [INFO ] [.b.modbus.internal.ModbusSlave] - ModbusSlave error getting responce from slave
Getting this if point any other type then “holding”.
And getting this if I comment the type key in cfg:
10:35:18.748 [INFO ] [.b.modbus.internal.ModbusSlave:267 ] - ModbusSlave not connected
I am ready to test new experimental binding, but not that experienced to assemble source to ready-to-use binding. unfortunately I am not a Java-programmer.
Please follow these steps (modified from linked thread more suitable for TCP testing) to make the debugging easier.
have an minimal configuration (for example two slaves that just read data). I suggest creating separate configuration for these tests for your convenience
TRACE level logging enabled
latest release version of openhab
When you have issues, please
paste the logs here (or even better use pastebin.com for long logs to make this thread more readable)
the associated openhab.cfg configuration
openhab item definitions.
modbus device you are using (I believe you already reported this)
I’ve had positive experiences with the experimental version with Modbus TCP but would be nice to hear it from others as well! I really appreciate if you have time to test the new version.
One more thing: Please report your experiences in the other thread, in order to collect all feedback of the new version there.