I’m still running openhab 1.9. The last couple of years I didn’t spend much time on my domotics. But I feel it’s time to take a giant leap forward.
My old openhab setup controls several programmable relays (Zelio Schneider). About ten year ago’s someone provided me some C-programs which are able to read from and write to these relays. To do this I use the exec binding.
Basically 90 percent of my home is controlled with items like this:
Switch Light_Kitchen “Kitchen Light” (GF_Kitchen, Lights)
<[/home/scripts/ison ttyUSB0 10:1000:REGEX((.*?))]
>[OFF:/home/scripts/setstate ttyUSB0 10 0]
>[ON:/home/scripts/setstate ttyUSB0 10 1]
Thus the first ‘ison’ command reads the state every second. I am not sure what the added value is from the REGEX in this one.
And the ‘setstate’ commands enable to switch lights on and off.
Today I just started with openhab3 … but I don’t have a clue how to integrate these commands. Can someone show me the way? Some examples of similar setups (switches managed via exec commands) might be useful.