Hi
I’m having a hard time trying to implement a toggle switch with a homematic push button (HM-PB-2-WM55-2) via homegear
Item:
Switch fernbedienung1 "Testbutton" (Fernbedienung) {homematic="address=MEQ*******, channel=1, parameter=PRESS_SHORT"}
Switch testSwitch "Test Switch" (Fernbedienung) {exec=">[*:bash /etc/openhab/configurations/test.sh]"}
rule "Fernbedienung 1"
when
Item fernbedienung1 received update
then
if(testSwitch.state == OFF)
{
sendCommand(testSwitch, 'ON')
}
else if (testSwitch.state == ON)
{
sendCommand(testSwitch, 'OFF')
}
When I press the button, the switch toggles as expected. But after a second or so, it toggles again. Does anyone have an idea what’s going wrong here? It looks like the button sends a retransmission of the PRESS_SHORT event, which is then evaluated again. But it just has to be an error on OSI layer 8, because this is such a basic use-case, I can’t imagine that this doesn’t work if done right.
Thanks in advance for your help!