Connection issues with ModbusTcpAgent

Hello, I’m currently trying to connect my openremote instance with multiple Kostal Pikos using ModbusTCP. After figuting out how to connect oto them im now facing the issue that the connection randomly drops. It once ran for almost an hour without issue but did so only once.

The msot common error i get is this one:
Failed to start protocol ‘Modbus TCP Protocol[modbus-tcp://192.168.1.11:1502?unit-identifier=1]’: ModbusTcpAgent{id=‘7BvhRJYpUlbQXgxMcxAiLj’, name=‘ModbusTCPAgentLink’, type =‘ModbusTcpAgent’, parentId=‘7Ii52ONUaVmWHtQPrfFLKf’, realm=‘master’} msg=org.apache.plc4x.java.api.exceptions.PlcConnectionException: Error creating channel.

Together with:
Failed to create PLC4X connection for protocol instance: ModbusTcpAgent{id=‘7BvhRJYpUlbQXgxMcxAiLj’, name=‘ModbusTCPAgentLink’, type =‘ModbusTcpAgent’, parentId=‘7Ii52ONUaVmWHtQPrfFLKf’, realm=‘master’} – org.apache.plc4x.java.api.exceptions.PlcConnectionException: Error creating channel.

I can ping all the devices without issue and the ports etc. are also correctly configured.
It works sometimes for a short period and i cant figure out what im doing wrong. Any help is much appreciated

Hi mito, there are some known bugs in the modbus library, a fix is currently in review.

Hi Berg, thank you for the reply.
Is the fix you mentioned PR#2097?
When I went through the Pr I got the impression that it only reworks the Modbus RTU implementation and leaves the TCP implementation the same. I’d really appreciate it if you could clear things up for me.

Hi mito, it started with RTU but TCP was also reworked because of bugs found in the external library we used.

Great to hear, can you give me some kind of timeframe for when the new implementation will replace the old one?

Thank you for taking the time to answer my questions so far :slight_smile:

It’s on hold right now because of other priorities, but it will be done by the end of the year.

In the meantime, if you want to test, you can build that branch because it is allready fully functional.