[SOLVED] MODBUS/TCP OH2 write to words and coils fails

I have my sprinkler system driven by a PLC, I talk to it over MODBUS/TCP

When my rule runs I see the 4 Zx_Time writes but not the coil write for Watering
What am I missing?

I use these writes to start it:



Number Z1_Time "Zone 1 Time [%d]" (gRAIN) { channel="modbus:data:plc_TCP:timers:Z1_TimeT:number" }
Number Z2_Time "Zone 2 Time [%d]" (gRAIN) { channel="modbus:data:plc_TCP:timers:Z2_TimeT:number" }
Number Z3_Time "Zone 3 Time [%d]" (gRAIN) { channel="modbus:data:plc_TCP:timers:Z3_TimeT:number" }
Number Z4_Time "Zone 4 Time [%d]" (gRAIN) { channel="modbus:data:plc_TCP:timers:Z4_TimeT:number" }

Contact Watering "Watering [MAP(rain.map):%s]" (gRAIN) { channel="modbus:data:plc_TCP:status:WateringT:contact" }


Bridge modbus:tcp:plc_TCP [ host="", port=502, id=1 ] {
    Bridge poller timers [ start=999, length=5, refresh=1000, type="holding" ] {
        Thing data Z1_TimeT [ readStart="999", readValueType="int16", writeStart="999", writeValueType="int16", writeType="holding" ]
        Thing data Z2_TimeT [ readStart="1000", readValueType="int16", writeStart="1000", writeValueType="int16", writeType="holding" ]
        Thing data Z3_TimeT [ readStart="1001", readValueType="int16", writeStart="1001", writeValueType="int16", writeType="holding" ]
        Thing data Z4_TimeT [ readStart="1002", readValueType="int16", writeStart="1002", writeValueType="int16", writeType="holding" ]
        Thing data Current_ZoneT [ readStart="1003", readValueType="int16", writeStart="1003", writeValueType="int16", writeType="holding" ]
    Bridge poller status [ start=999, length=5, refresh=1000, type="coil" ] {
        Thing data WateringT [ readStart="999", readValueType="bit", writeStart="999", writeValueType="bit", writeType="coil" ]
        Thing data Zone1T [ readStart="1000", readValueType="bit", writeStart="1000", writeValueType="bit", writeType="coil" ]
        Thing data Zone2T [ readStart="1001", readValueType="bit", writeStart="1001", writeValueType="bit", writeType="coil" ]
        Thing data Zone3T [ readStart="1002", readValueType="bit", writeStart="1002", writeValueType="bit", writeType="coil" ]
        Thing data Zone4T [ readStart="1003", readValueType="bit", writeStart="1003", writeValueType="bit", writeType="coil" ]

more things

I only see the Write Single Register, no Write Coils

Even if I set watering on first…


You cannot send commands to Contact type Items, these are input only. errors will be logged,in events.log I think.
You probably want to use Switch type Items.


Thanks, so obvious when you point it out :slight_smile:

Code that had been working for years with OH 1.8