Polling loop with 16 different values to same relay

  • Platform information:
    • Hardware: Raspberry PI 4
    • openHAB version: 2.5.10

I have a relay (reachable through IP-adres) with 16 exits, each controlling a light. I can sent commands through the TCP/UDP binding (simple string “Sxy00”) to put the lights on and off. x and y is the number of the relay’s exit.
Now, since I can also turn the lights on and off trough a light switch, I want a check (let’s say every 30sec) of each exit, sending the command “Ixy00”. The UDP-answer I can capture in a rule and postUpdate the item.
Can somebody get me on the way please? Is it possible to send the command after I get a respons of the previous one?


Do you have the data coming back to openHAB item?

Yes, it’ a simple string, which I can transform into ON/OFF.