I’m trying to read data via modbus from the EPEVER wifi adapter. I’m trying to replicate the setup example given here:
I copied the Thing definition (updated IP, using same port):
`Bridge modbus:tcp:EPEVER [ host="192.168.86.28", port=502, id=1, timeBetweenTransactionsMillis=500, timeBetweenReconnectMillis=500, reconnectAfterMillis=0, connectTimeoutMillis=30000 ] {`
Bridge poller realtime_data1 [start=12548, length=14, refresh=5000, type="input"] {
Thing data 3104 "Battery voltage" @ "EPEVER" [readStart="12548", readValueType="int16"]
}
(Just 1 data Thing for now, trying to get it to work first!)
I get the following in the log:
2020-08-26 22:12:47.356 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusPollerThingHandler.ModbusPollerReadRequest@525403[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=12548,length=14,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: ModbusIOException Premature end of stream (Header truncated). [operation ID 1ec26de5-ade4-4405-94e3-a737c9dc1686]
2020-08-26 22:12:47.884 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusPollerThingHandler.ModbusPollerReadRequest@525403[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=12548,length=14,maxTries=3]). Will try again soon. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: ModbusIOException Premature end of stream (Header truncated). [operation ID 1ec26de5-ade4-4405-94e3-a737c9dc1686]
2020-08-26 22:12:48.393 [ERROR] [rt.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusPollerThingHandler.ModbusPollerReadRequest@525403[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=12548,length=14,maxTries=3]). Aborting. Error was I/O error, so reseting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: ModbusIOException Premature end of stream (Header truncated). [operation ID 1ec26de5-ade4-4405-94e3-a737c9dc1686]
I can’t work out from the error if the issue is with the bridge link to the TCP server, or the read of the data from poller?
I realise that the original post i am copying from is 3 years old now, so maybe something changed in the Modbus binding and the Thing definition needs updating?
Any ideas greatly welcome!