Binding Modbus 2.5.7. Stops working after unsuccessful read attempt

SMA error 11.59 smal.pcapng.txt (69.9 KB) I believe I have the same problem. I’m using OH2 with binding-modbus - 2.5.2. I looked at the protocol (mirror port on my switch) and see many problems and in attached packet capture you see around 11.59 hours that the data exchange even stops and only re-transmission continue. Remove the .txt extension.
I use the following configuration
Bridge modbus:tcp:tripower “SMA Sunny Tripower 5000TL-20” @ “Zolder” [ host=“192.168.100.85”, port=502, id=3, connectMaxTries=3, reconnectAfterMillis=60000, connectTimeoutMillis=3000] {

Bridge poller SMA_Poller_Totaal "SMA_Poller_Totaal" [ start=30531, length=10, refresh=5000, type="holding" ] { 

    Thing data SMA_Totaal "SMA_Input_Totaal" [ readStart="30531", readValueType="uint32", readTransform="JS(divide1000.js)"]  

    Thing data SMA_Vandaag "SMA_Input_Vandaag" [ readStart="30535", readValueType="uint32", readTransform="JS(smalimit.js)"] 

} 

Bridge poller SMA_Poller_Huidig "SMA_Poller_Huidig" [ start=30775, length=8, refresh=5000, type="holding" ] {

    Thing data SMA_Huidig "SMA_Input_Huidig" [ readStart="30775", readValueType="int32", readTransform="JS(smalimit.js)"]   

}

}
In the logfile I see
2020-09-12 11:17:00.916 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 2/3 error: connect timed out. Connection TCPMasterConnection@6060e114[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:03.979 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 3/3 error: connect timed out. Connection TCPMasterConnection@6060e114[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:03.979 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 3, throwing last error: connect timed out. Connection TCPMasterConnection@6060e114[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:03.980 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection TCPMasterConnection@6060e114[socket=Socket[unconnected]] for endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]: connect timed out

2020-09-12 11:17:03.980 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502] – aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@408c60ad[slaveId=3,functionCode=READ_MULTIPLE_REGISTERS,start=30531,length=10,maxTries=3] [operation ID e43abc95-d803-4a0a-92ad-ef1462dbe5ae]

2020-09-12 11:17:03.981 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:tripower:SMA_Poller_Totaal:SMA_Totaal ‘SMA_Input_Totaal’ had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502])

2020-09-12 11:17:03.981 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:tripower:SMA_Poller_Totaal:SMA_Vandaag ‘SMA_Input_Vandaag’ had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502])

2020-09-12 11:17:06.983 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/3 error: connect timed out. Connection TCPMasterConnection@592f47e9[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:10.047 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 2/3 error: connect timed out. Connection TCPMasterConnection@592f47e9[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:13.111 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 3/3 error: connect timed out. Connection TCPMasterConnection@592f47e9[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:13.111 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 3, throwing last error: connect timed out. Connection TCPMasterConnection@592f47e9[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:13.112 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - Error connecting connection TCPMasterConnection@592f47e9[socket=Socket[unconnected]] for endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]: connect timed out

2020-09-12 11:17:13.112 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502] – aborting request ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@11ded93c[slaveId=3,functionCode=READ_MULTIPLE_REGISTERS,start=30775,length=8,maxTries=3] [operation ID 6d4254f9-2c01-4e2d-98db-6285714ea7a2]

2020-09-12 11:17:13.113 [ERROR] [ernal.handler.ModbusDataThingHandler] - Thing modbus:data:tripower:SMA_Poller_Huidig:SMA_Huidig ‘SMA_Input_Huidig’ had ModbusConnectionException error on read: ModbusConnectionException(Error connecting to endpoint=ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502])

2020-09-12 11:17:16.116 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 1/3 error: connect timed out. Connection TCPMasterConnection@782c38b0[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:19.178 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 2/3 error: connect timed out. Connection TCPMasterConnection@782c38b0[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:22.242 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - connect try 3/3 error: connect timed out. Connection TCPMasterConnection@782c38b0[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2020-09-12 11:17:22.243 [ERROR] [ing.ModbusSlaveConnectionFactoryImpl] - re-connect reached max tries 3, throwing last error: connect timed out. Connection TCPMasterConnection@782c38b0[socket=Socket[unconnected]]. Endpoint ModbusTCPSlaveEndpoint@20a39fe2[address=192.168.100.85,port=502]

2

I don’t see why. To all appearances, openHAB is trying to communicate with your device but it is not responding. Seems to be the opposite of the symptoms here.

1 Like

The log file is a result of the protocol failures. I’m almost sure that is the root cause.

I’m not sure what you want to happen next.

The binding is throwing errors because your device is not responding as expected. (From what I can see, not responding at all)

The binding will continue to attempt communication unless you tell it different.
This is unrelated to the binding stopping polling unannounced, the topic of this thread.

There is an updated binding version available for the stoppage problem, which of course you can try if you think you have the ‘same problem’.
I don’t think that will help at all.

I cannot view your image file, would you be able to post text version in code fences?

1 Like

I have a SMA Tripower 6000TL-20. I dont have the same issues.