# Modbus RTU communication error

**URL:** <https://community.openhab.org/t/modbus-rtu-communication-error/160860>\
**Category:** Beginners\
**Tags:** modbus-rtu\
**Created:** [December 15, 2024, 1:02am UTC](https://community.openhab.org/t/modbus-rtu-communication-error/160860 "2024-12-15T01:02:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![clark](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@clark](https://community.openhab.org/u/clark)\
**Post date:** [December 15, 2024, 1:02am UTC](https://community.openhab.org/t/modbus-rtu-communication-error/160860/1 "2024-12-15T01:02:28Z")

</div>

- 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

```yaml
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

```yaml
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

```php
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

 ![modbus](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/8/b85c7e6829e48d2ca961d0e708025fa9edae8259.jpeg)

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

Thank you

---

<div class="post-metadata">

**Author:** ![Tuny](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@Tuny](https://community.openhab.org/u/Tuny)\
**Post date:** [December 15, 2024, 8:29am UTC](https://community.openhab.org/t/modbus-rtu-communication-error/160860/2 "2024-12-15T08:29:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![clark](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@clark](https://community.openhab.org/u/clark)\
**Post date:** [December 15, 2024, 1:56pm UTC](https://community.openhab.org/t/modbus-rtu-communication-error/160860/3 "2024-12-15T13:56:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![clark](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@clark](https://community.openhab.org/u/clark)\
**Post date:** [December 15, 2024, 6:02pm UTC](https://community.openhab.org/t/modbus-rtu-communication-error/160860/4 "2024-12-15T18:02:52Z")

</div>

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
