I am trying to control the relay board and read data from the kWh meter via an rs485 to eth converter.
Everything works separately.
When I use both bridges at the same time, the relay plug loses connection with OH and starts turning random relays on and off on its own.
Hardware-wise, everything looks OK.
Below is the binding configuration.
both bridges have things. The problem already appears at the poller stage. If the ID3 relay bridge is active, controlling it works, but when I turn on the ID1 bridge, ID3 stops working and it turns red.
There are no Things here, only bridges. Are you mixing managed Things and .things files?
It also seems odd to have two bridges connected to the same host and port. Usually thatâs not allowed and itâs my understanding that this is why the binding uses nested bridges.
Based on the examples in the docs and on the forum it should be something like:
The behavior you describe sounds a whole lot like the problem is the multiple connections to the same socket which isnât allowed. When the second one tries to connect it replaces the connection of the first one perhaps or at least interferes with it.
Have you proved your ability to successfully read and control the devices in exactly the manner you expect from outside Openhab via a free Modbus test client? i.e. from simplymodbus.ca.
I am able to communicate with both modules via e.g. Modbus Poll. With OH I can also communicate with them, just not âsimultaneouslyâ.
Error in the log after running both bridges
â[ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=3, functionCode=READ_MULTIPLE_REGISTERS, start=1, length=16, maxTries=3]). Aborting. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 85df160f-f35e-466b-802a-5413f5f739e0]â
In cases like this, the device probably cannot handle the traffic openHAB is generating
Are any of the reads successful?
Is the error occurring right after the connection has been established (you might need to enable verbose logging)? You can give some breathing space for the device with âafterConnectionDelayMillisâ parameter with tcp thing
You can also try increasing âtimeBetweenTransactionsMillisâ from default 60 ms to, say, 150ms. This is the minimum time between requests giving some extra breathing space for the device when the 500ms and 1000ms polls would happen right after each another
I thought so too and tried various delays but the result was only a communication error.
Today I installed another module, the same parts, but probably different software.
The tests have been running for one hour without any errors for other modules and for itself.
The previous record on the old module was 10 seconds ;/. It seems that the relay module has something wrong with the software since everything is OK on another device