- Platform information:
- Hardware: intel i5
- OS: _Windows
- Java Runtime Environment: 17
- openHAB version: 4.3
- Issue of the topic: Error reading modbus register
The issue is simple. Openhab errors out when reading a modbus sensor
12:38:04.067 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_MULTIPLE_REGISTERS, start=0, length=1, maxTries=3]). Aborting. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 71ba6b03-67b3-4d3a-a388-d87502ab078a]
This is on a brand new Openhab installation with only one USBtoRS485 interface and one sensor.
I know everything works on the hardware side because I can read the sensor with modbus programs, for example
The value is zero but the reading is not throwing an error
Here are the configurations of the serial slave and poller
UID: modbus:serial:fbae51e9b3
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: COM10
connectTimeoutMillis: 10000
afterConnectionDelayMillis: 0
id: 1
enableDiscovery: false
UID: modbus:poller:fbae51e9b3:627920aaf4
label: Regular Poll
thingTypeUID: modbus:poller
configuration:
length: 1
start: 0
refresh: 10000
maxTries: 3
cacheMillis: 50
type: holding
bridgeUID: modbus:serial:fbae51e9b3
I can see that openhab is sending the Tx as the USB to 485 has a led for TX but the sensor does not get the request (it has an led that shows when it is performing a measurement) and thus does not send a reply (Rx) to Openhab
Can anyone make sense of this?
Thanks