Setup an item linked to modbus

Summarizing the setup that I think is meant the work with a single item without rules. I have also created it again to ensure I wasn’t making a mistake setting it up and have encountered some behavior I didn’t expect (aka learning :slight_smile: )

Things involved:

  • one modbus TCP thing (didn’t make a screenshot since this seems to be working correctly)
  • two modbus pollers (one to read the bits and one to write the bits) → screenshots below
  • two modbus data items (one to read a bit and one to write a bit) → screenshots below

Items involved and how I created it: (screenshot below)

  • one switch item with 2 channels
    • Add equipment to my test location (type: switch, meta data to AutoUpdate=false)
    • Add channel links → the corresponding modbus data read (as Contact) and write bit (as Switch)

The expected behavior: the OH item doesn’t follow the Modbus stat when it is updated/changed by the PLC. I checked via a seperate tool that the modbus is actually updated when I switch the PLC.
The unexpected behavior I see, the Item now only reports the ON state in the logging (screenshot below), not the OFF state and doesn’t update the actual modbus. When I turn on the autoupdate it does update the modbus. This clearly is a lack in my understanding of how OH process this.

Then when I update to the solution written above with the rule all starts to work. I do this without changing any of the Modbus Things, which tells me they are “working”

Sorry if I am repeating myself or am giving to much screenshots… trying to make it clear what I am doing/ trying to achieve and what I am seeing…


image