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.
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.
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