Modbus RTU communication error

  • openHAB version: 4.1

Hi:

I am running into a problem when reading from a sensor using Modbus

The Modbus serial slave shows ONLINE

Here is the code

UID: modbus:serial:88e20f2440
label: Modbus Serial Slave
thingTypeUID: modbus:serial
configuration:
  baud: 9600
  connectMaxTries: 1
  timeBetweenTransactionsMillis: 35
  stopBits: "1.0"
  parity: none
  receiveTimeoutMillis: 1500
  dataBits: 8
  echo: false
  encoding: rtu
  flowControlIn: none
  flowControlOut: none
  port: COM8
  connectTimeoutMillis: 10000
  afterConnectionDelayMillis: 0
  id: 1
  enableDiscovery: false

The Regular Poll
Code

UID: modbus:poller:d27deb0c81:a755cb7923
label: Regular Poll
thingTypeUID: modbus:poller
configuration:
  length: 1
  start: 0
  refresh: 5000
  maxTries: 3
  cacheMillis: 50
  type: holding
bridgeUID: modbus:serial:88e20f2440

gives this error

Status:
OFFLINE
COMMUNICATION_ERROR
Error with read: org.openhab.core.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException Error reading response (EOF)', cause2=null 

However if I use QModMaster to communicate with the sensor it works without any issues

Does anyone more versed than me have any idea what it is I am missing?

Thank you

Why does your poller start wirh “0” and not “100”?

I believe those are different ways to say, start reading at the first register. One is Hex the other is a convention to start at 0
But I will check. Thanks

This is strange, I tested a few other modbus programs and they all error out just like Openhab. The only one that seems to work is QmodMaster. Anyways, I found a sensor that plays nice with Openhab so I am going to postpone the troubleshooting for when that sensor dies and I have to try the one that is giving me problems now.

Thanks again