Modbus on openhab 4 not working

Dear all

Just migrated to OH 4. Unfortunately Modbus Binding ist not working, i.e. the data thing is offline and says no online bridge. The poller bridge says:

Error with read: Error connecting to endpoint ModbusIPSlaveEndpoint [address=, port=502] 

My Thing configuration is as follows:

Bridge modbus:tcp:Pool [ host="", port=502, id=1, connectMaxTries=3, connectTimeoutMillis=1000] {
	Bridge poller holding_low [ start=0, length=24, refresh=3000, maxTries=2, type="holding"]{
       	Thing data holding0		[ readStart="0", readValueType="uint16", writeStart="0", writeValueType="int16", writeType="holding" ]
       	Thing data holding1		[ readStart="1", readValueType="int16", readTransform="JS(divide10.js)", writeStart="1", writeValueType="int16", writeType="holding", writeTransform="JS(multiply10.js)" ]
    	Thing data holding6		[ readStart="6", readValueType="int16", readTransform="JS(divide10.js)" ]
    	Thing data holding7		[ readStart="7", readValueType="uint16", readTransform="JS(divide10.js)" ]
    	Thing data holding23	[ readStart="23", readValueType="int16" ]

Can anybody help me on this?

Many thanks in advance


I had the same issue. The id-thing fixed it:

  • In Thing configuration id changed to “3” (do not know why this helped)

  • additionally I had to “count up” the register addresses ( register 0 → 1)