Modbus-Binding and wirte-only register

Hi,

i’m using the Modbus-Binding and most of the time all works like a charm. But now I have a problem and don’t know how to solve this.
I have a emergency generator using a DSE 8620 MK II controller. To control the mode, i have to send a number to two different write-only register using FC16. So far so good.
But this seems to be a problem for the Modbus-Binding. If I add the Konfig to my things, OH trys to read this wirte-only Registers and gets an Read-Error. If I try to send something, it nevers shows up on the Bus.
How can I tell OH to stop reading these registers? Is there a workaround?

Here is my things:

Bridge modbus:tcp:GEN1 [
  host="10.80.66.150",
  port=502,
  id=1,
  connectMaxTries=200
] {
      Bridge poller holding [ start=4096, length=33, refresh=5000, type="holding" ] {
                Thing data GEN1_System_Control_Key      [ writeStart="4104", writeValueType="uint32", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil = true ]

        }

}

Thanks,

Sascha

It does what you ask it to do.

This tells the binding to read poll those registers.
Even though you have no ‘read’ data Things, the poller tries to read the whole block of registers.

You can make a poller that doesn’t poll by setting refresh=0
But that is not a complete solution because the binding will still I think issue a one-time refresh at start up.

The non-obvious solution - don’t have a poller at all.
You can have a write-only data Thing directly as the “child” of a TCP Thing

Bridge modbus:tcp:GEN1 [
  host="10.80.66.150",
  ....
] {
       Thing data GEN1_System_Control_Key      [ writeStart="4104", ... }

This only works for strictly write-only data Things. You’ll probably need to change the channel UID your Item is linked to.

You can also have ordinary poller Things and their data Thing “children” under the same TCP Bridge, of course.

Ok, sounds strange, but I will give it a try. :slight_smile:

Ok, it works now. Thanks a lot! But not without Poller. The trick was to just read what is readable with the Poller and not to read the write-only registers.

Working example:

Bridge modbus:tcp:GEN1 [
  host="10.80.66.150",
  port=502,
  id=1,
  connectMaxTries=200
] {
        Bridge poller holding [ start=4096, length=8, refresh=5000, type="holding" ] {
                Thing data GEN1_System_Control_Key      "GEN1" @ "AA"   [ writeStart="4104", writeValueType="uint32", writeType="holding", writeMultipleEvenWithSingleRegisterOrCoil=true ]
        }
}

Thanks a lot again!