Hey,
I still keep moving forward… right now i ve got one new problem:
I have got some electric-roof-windows including rollershutter.
My problem is: Each window has 4 switches:
open the window
close the window
open the rollershutter
close the rollershutter
So if i switch the “close the rollershutter” on, before i switch the open the rollershutter off… nothing happens.
For that example:
Switch Fenster_202_Rollo_Runter “202 Rollo Runter” { knx=“<3/1/182” }
Switch Fenster_202_Rollo_Rauf “202 Rollo Rauf” { knx=“<3/1/183” }
If i press the switches in the right order… it works.
Now i thought: Ok, lets try a rule.
rule "Dachfenstersteuerung1"
when
Item Fenster_202_Rollo_Runter changed to ON
then
Switch Fenster_202_Rollo_Rauf.sendCommand(OFF)
end
rule "Dachfenstersteuerung2"
when
Item Fenster_202_Rollo_Rauf changed to ON
then
Switch Fenster_202_Rollo_Runter.sendCommand(OFF)
end
Typically, there would be a rollershutter actuator to switch motors. This actuator will switch up-stop-down when changing the direction. In fact, with this actuator it would be impossible to switch on up and down at the same time (this is the preferred, if not the mandated way to switch bidirectional motors).
The Keyword Switch is wrong in a rule context.
Just a guess, if this will not solve the problem, I would expand the rules to
rule "Dachfenstersteuerung1"
when
Item Fenster_202_Rollo_Runter changed to ON
then
if (Fenster_202_Rollo_Rauf.state != OFF) {
Fenster_202_Rollo_Rauf.sendCommand(OFF)
Fenster_202_Rollo_Runter.sendCommand(OFF)
Thread::sleep(500)
Fenster_202_Rollo_Runter.sendCommand(ON)
}
end
rule "Dachfenstersteuerung"
when
Item Fenster_202_Rollo_Runter changed to ON
then
Fenster_202_Rollo_Rauf.sendCommand(OFF)
Thread::sleep(500)
Fenster_202_Rollo_Runter.sendCommand(ON)
end
rule "Dachfenstersteuerung2"
when
Item Fenster_202_Rollo_Runter changed to OFF
then
Fenster_202_Rollo_Rauf.sendCommand(ON)
end