Hi, I’ve recently discovered the joys of openHAB and I’m currently trying to get it working with my existing home automation on my Raspberry Pi. Most of my things are controlled by shell scripts so I’m using the Exec binding to execute these.
The problem I have is I’d like a control on the PaperUI panel that does both input and output. For example, I have a script that shows the state of the lounge light, either on or off, and I have another script that turns the light on or off. So, I’d like a widget that shows me the current state but also lets me change the state of the light. So I have my two exec binding things, a getter with an output and a setter with an input.
For the single control on the panel I set some rules as follows:
rule "Lounge Lamp State On"
Item LoungeLampState_Output changed to ON
rule "Lounge Lamp State Off"
Item LoungeLampState_Output changed to OFF
This sort of works ok but I have some feedback lag. If I press the control to switch the lamp it can briefly flick back to the other state because it has just received a state update from the output item, then after a short delay it will switch back again to where I set it when the ouptut item reports the newly set state.
I’m assuming this is quite a common requirement to have a control that combines input and output so I’m thinking I’m inplementing this in the wrong way. I’d be very grateful if somebody could point me in the right direction.