Hi all,
I´d like to turn on/off a lamp with an intertechno switch and an amazon dash Button…
I set up a rule like this one:
rule "DashButton_Somat"
when
Channel "amazondashbutton:dashbutton:ac-63-be-0a-8b-38:press" triggered
then
if (Schrank_Kueche1.state=="OFF") {
Schrank_Kueche1.sendCommand(ON)
} else {
Schrank_Kueche1.sendCommand(OFF)
}
end
The problem like always with intertechno is, that openhab doesn´t know if intertechno is ON or OFF.
How can it manage to turn the lights on or off with an amazon dash button?
There is no way to make this work if OH doesn’t know if the intertechno light is actually ON or OFF. It can only operate on the states that it knows as your rule is currently written. You either need to find some way to determine the true state of the light (lux sensor perhaps) or live with OH occasionally getting out of sync.
I don’t understand the question. Are you saying the rule triggers twice when you press the dash button once?
Beyond that, it already does work that way. When you press the dash button it toggles Schrank_Kueche1 (i.e. if it was ON it sends it an OFF command, if it was OFF it sends it an ON command).
that´s what it should do but it always sends OFF not ON.
I wanted it to behave like a switch - not checking if the state of Schrank_Kueche is on or off.
Then like I said before, “If it is only turning the light OFF it is because the Schrank_Kueche1 Item is never becoming OFF.” There is something else wrong. The Rule as written is correct. You have some other problem. You need to figure out why Schrank_Kueche1 is always in the ON state.
Either the Rule is being triggered twice when the Dash button is pressed, or the binding is setting the Item back to ON after it receives the OFF command or something else is going on.
Look at events.log and watch the Channel and Schrank_Kueche1 changing state.
2018-10-30 00:27:24.137 [WARN ] [echno.internal.CULIntertechnoBinding] - The address parameter is deprecated! Please use just commandOn and commandOff.
2018-10-30 00:27:24.140 [WARN ] [echno.internal.CULIntertechnoBinding] - type=raw;commandOn=000000000FFF;commandOff=000000000FF0