[modbus] read errors when defining write-only things

Connection from OH3 to KEBA P30x wall-box using Modbus.
While reading of read-only registers is working very well I’ve encountered problems with write-only registers.

    Bridge poller w1 [ start=5004, length=2, type="holding" ] {
        Thing data SetChargingCurrent [ writeStart="5004", writeValueType="uint16", writeType="holding" ]

I get the following warning and then an error:

2022-03-21 13:24:57.739 [WARN ] [rt.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=255, functionCode=READ_MULTIPLE_REGISTERS, start=5004, length=2, maxTries=3]). Will try again soon. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: SocketTimeoutException Read timed out [operation ID 4dd62de0-0c74-4c5e-9013-22beb1772570]

What is wrong?

Your data Thing is write-only.
Your poller Thing however will be doing what it is supposed to do, and read polling.

You may set the poller period to 0 for no polling - but I think it will still make a one-time "refresh’ read poll at startup.

Not obvious, but you may create a write-only data Thing as a direct child of your serial/TCP bridge Thing, and so have no poller Thing involved with it at all.

Note that slave ID 255 is technically reserved in Modbus protocol.

1 Like

Great! I’ve simply set refresh=0 and it seems to help.
Many thanks!