[SOLVED] MODBUS with Teltonika RUT955

Hi there,

I’m trying to follow this:


For example, trying to read system uptime, register address=1, number of registers=2, 32bit unsigned integer. (In my head that corresponds to

Using the paper ui, setting start=0 and length=2 in the poll thing, I get:

“Error with read: org.openhab.io.transport.modbus.internal.ModbusSlaveErrorResponseExceptionImpl: Slave responsed with error=2”

Setting start=1, I get no error, but when I make the data thing, I get an error if I set read address as 0:

2020-02-06 22:08:29.291 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Unregistering regular poll task BasicPollTaskImpl@1468b1[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1eba6d8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=2,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@188a784[address=,port=502],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@c5388fa1] (interrupting if necessary)

2020-02-06 22:08:29.300 [INFO ] [rt.modbus.internal.ModbusManagerImpl] - Poll task BasicPollTaskImpl@1468b1[request=ModbusPollerThingHandlerImpl.ModbusPollerReadRequest@1eba6d8[slaveId=1,functionCode=READ_MULTIPLE_REGISTERS,start=0,length=2,maxTries=3],endpoint=ModbusTCPSlaveEndpoint@188a784[address=,port=502],callback=org.openhab.binding.modbus.internal.handler.ModbusPollerThingHandlerImpl$ReadCallbackDelegator@c5388fa1] canceled

2020-02-06 22:08:29.313 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Poll task was canceled – not executing/proceeding with the poll: sleep interrupted [operation ID 6bc515df-0800-4615-908f-826393b9b4a0]

Some of the above could be from the first error when I had the error in the poll thing.

With read address as “1” in the data thing, I get no error, but when I query the item(s):

openhab> smarthome:status jgkgkg1
openhab> smarthome:status jgkgkg

So, I am not sure if it is working and the value of the item needs to be transformed or if indeed the values of the start length and read address are wrong.

What should be written for start, length and read address if I am trying to follow Teltonika’s wiki - for example for uptime?


Modbus exception code 2 means that the remote device has rejected the attempted modbus transfer with “Illegal Data Address”
Simply, it doesn’t like the register address and/or length combination.

The good news here is that you get a response - so the IP, unit ID, etc. are good :grinning:

As per Modbus binding docs, you can never be sure whether a document is talking about register numbers or register address i.e. first is “1” or first is “0”.
Our binding is always address / start at 0

You tried poller address 0 length 2 and it was rejected.
Next step, try poller address 1 length 2.

Yes. If the poller is fetching registers 1 and 2 you won’t be able to access register 0 in a data Thing because it hasn’t been fetched.

So, if the poll address 1 length 2 appears to poll, you’d want your data Thing to look at address 1.
And according to Teltonika docs, assume a 32-bit integer (which will automatically use two registers i.e. pick up register 2 as well).

Note that when making small edits to Things it is highly advisable to restart the binding, to make sure old scheduled pollers are tidied away and new settings are used.

What Items? Detail please.

Hi there, thanks very much for the response. I restarted openHAB and it started working right away.

read address = 1 (in the data thing)

and in the poller thing:
start = 1
length = 2

1 Like