Earlier, the roller shutters in the office and on the terrace worked, and then nothing worked when I tried to integrate the 3rd roller shutter in the living room couch. Again, no error message is displayed, but no commands are sent to the Arduino except for the STOP functions.
.rule 1
var Timer t_Rolllaeden = null
rule "KG Rollladen Buero HOCH/RUNTER/STOP"
when
Item KG_Rollladen_Buero received command
then
switch(receivedCommand.toString.toUpperCase){
case "UP": {
KG_Rollladen_Buero_UP.postUpdate(1)
logInfo ("KG-R-B-UP - check", "Variablenstatus ist: " + KG_Rollladen_Buero_UP.state)
}
case "STOP": {
KG_Rollladen_Buero_UP.postUpdate(0)
logInfo ("KG-R-B-UP - check", "Variablenstatus ist: " + KG_Rollladen_Buero_UP.state)
KG_Rollladen_Buero_DOWN.postUpdate(0)
logInfo ("KG-R-B-DOWN - check", "Variablenstatus ist: " + KG_Rollladen_Buero_DOWN.state)
sendCommand (ArduMEGA, "<KG_Rollladen_Buero_STOP,>");
KG_Rollladen_Buero_STOP.postUpdate(1)
logInfo ("KG-R-B-STOP - check", "Variablenstatus ist: " + KG_Rollladen_Buero_STOP.state)
}
case "DOWN": {
KG_Rollladen_Buero_DOWN.postUpdate(1)
logInfo ("KG-R-B-DOWN - check", "Variablenstatus ist: " + KG_Rollladen_Buero_DOWN.state)
}
}
end
rule "EG Rollladen Terrasse HOCH/RUNTER/STOP"
when
Item EG_Rollladen_Terrasse received command
then
switch(receivedCommand.toString.toUpperCase){
case "UP": {
EG_Rollladen_Terrasse_UP.postUpdate(1)
logInfo ("EG-R-T-UP - check", "Variablenstatus ist: " + EG_Rollladen_Terrasse_UP.state)
}
case "STOP": {
EG_Rollladen_Terrasse_UP.postUpdate(0)
logInfo ("EG-R-T-UP - check", "Variablenstatus ist: " + EG_Rollladen_Terrasse_UP.state)
EG_Rollladen_Terrasse_DOWN.postUpdate(0)
logInfo ("EG-R-T-DOWN - check", "Variablenstatus ist: " + EG_Rollladen_Terrasse_DOWN.state)
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_STOP,>");
t_Rolllaeden = null
t_Rolllaeden = createTimer (now.plusSeconds(1), [
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_U_E,>");
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_D_E,>");
t_Rolllaeden = null
])
EG_Rollladen_Terrasse_STOP.postUpdate(1)
logInfo ("EG-R-T-STOP - check", "Variablenstatus ist: " + EG_Rollladen_Terrasse_STOP.state)
}
case "DOWN": {
EG_Rollladen_Terrasse_DOWN.postUpdate(1)
logInfo ("EG-R-T-DOWN - check", "Variablenstatus ist: " + EG_Rollladen_Terrasse_DOWN.state)
}
}
end
.rule 2
var Timer t_Rolllaeden = null
rule "KG_Rollladen_Buero_UPDOWN"
when
Item KG_Rollladen_Buero_UP changed or
Item KG_Rollladen_Buero_DOWN changed or
Time cron "0 0/1 * 1/1 * ? *"
then
t_Rolllaeden = createTimer (now.plusSeconds(2), [
if (KG_Rollladen_Buero_UP.state == 1 && KG_Rollladen_Buero_STOP.state == 1 && EG_Rollladen_Terrasse_STOP.state == 1 && EG_Rollladen_Wohnzimmer_Couch_STOP.state == 1 && EG_Rollladen_Esszimmer_STOP.state == 1 && EG_Rollladen_Kueche_Einfahrt_STOP.state == 1 && EG_Rollladen_Kueche_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Garten_STOP.state == 1 && OG_Rollladen_Bad_STOP.state == 1 && DG_Rollladen_Schlafzimmer_STOP.state == 1 && DG_Rollladen_Bad_STOP.state == 1){
t_Rolllaeden = null
KG_Rollladen_Buero_STOP.postUpdate(0)
logInfo ("KG-R-B-UP if ausgeführt", "Variablenstatus ist: " + KG_Rollladen_Buero_UP.state )
sendCommand (ArduMEGA, "<KG_Rollladen_Buero_UP,>");
t_Rolllaeden = createTimer (now.plusSeconds(40), [
KG_Rollladen_Buero_UP.postUpdate(0)
sendCommand (KG_Rollladen_Buero, STOP)
t_Rolllaeden = null
])
}
else if (KG_Rollladen_Buero_DOWN.state == 1 && KG_Rollladen_Buero_STOP.state == 1 && EG_Rollladen_Terrasse_STOP.state == 1 && EG_Rollladen_Wohnzimmer_Couch_STOP.state == 1 && EG_Rollladen_Esszimmer_STOP.state == 1 && EG_Rollladen_Kueche_Einfahrt_STOP.state == 1 && EG_Rollladen_Kueche_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Garten_STOP.state == 1 && OG_Rollladen_Bad_STOP.state == 1 && DG_Rollladen_Schlafzimmer_STOP.state == 1 && DG_Rollladen_Bad_STOP.state == 1){
t_Rolllaeden = null
KG_Rollladen_Buero_STOP.postUpdate(0)
logInfo ("KG-R-B-DOWN if ausgeführt", "Variablenstatus ist: " + KG_Rollladen_Buero_DOWN.state )
sendCommand (ArduMEGA, "<KG_Rollladen_Buero_DOWN,>");
t_Rolllaeden = createTimer (now.plusSeconds(40), [
KG_Rollladen_Buero_DOWN.postUpdate(0)
sendCommand (KG_Rollladen_Buero, STOP)
t_Rolllaeden = null
])
}])
end
rule "EG_Rollladen_Terrasse_UPDOWN"
when
Item EG_Rollladen_Terrasse_UP changed or
Item EG_Rollladen_Terrasse_DOWN changed or
Time cron "0 0/1 * 1/1 * ? *"
then
t_Rolllaeden = null
t_Rolllaeden = createTimer (now.plusSeconds(3), [
if (EG_Rollladen_Terrasse_UP.state == 1 && KG_Rollladen_Buero_STOP.state == 1 && EG_Rollladen_Terrasse_STOP.state == 1 && EG_Rollladen_Wohnzimmer_Couch_STOP.state == 1 && EG_Rollladen_Esszimmer_STOP.state == 1 && EG_Rollladen_Kueche_Einfahrt_STOP.state == 1 && EG_Rollladen_Kueche_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Garten_STOP.state == 1 && OG_Rollladen_Bad_STOP.state == 1 && DG_Rollladen_Schlafzimmer_STOP.state == 1 && DG_Rollladen_Bad_STOP.state == 1){
t_Rolllaeden = null
EG_Rollladen_Terrasse_STOP.postUpdate(0)
logInfo ("EG-R-T-UP if ausgeführt", "Variablenstatus ist: " + EG_Rollladen_Terrasse_UP.state )
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_U_V,>");
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_D_V,>");
t_Rolllaeden = createTimer (now.plusSeconds(1), [
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_UP,>");
t_Rolllaeden = null
])
t_Rolllaeden = createTimer (now.plusSeconds(40), [
EG_Rollladen_Terrasse_UP.postUpdate(0)
sendCommand (EG_Rollladen_Terrasse, STOP)
t_Rolllaeden = null
])
}
else if (EG_Rollladen_Terrasse_DOWN.state == 1 && KG_Rollladen_Buero_STOP.state == 1 && EG_Rollladen_Terrasse_STOP.state == 1 && EG_Rollladen_Wohnzimmer_Couch_STOP.state == 1 && EG_Rollladen_Esszimmer_STOP.state == 1 && EG_Rollladen_Kueche_Einfahrt_STOP.state == 1 && EG_Rollladen_Kueche_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Strasse_STOP.state == 1 && OG_Rollladen_Zimmer_Garten_STOP.state == 1 && OG_Rollladen_Bad_STOP.state == 1 && DG_Rollladen_Schlafzimmer_STOP.state == 1 && DG_Rollladen_Bad_STOP.state == 1){
t_Rolllaeden = null
EG_Rollladen_Terrasse_STOP.postUpdate(0)
logInfo ("EG-R-T-DOWN if ausgeführt", "Variablenstatus ist: " + EG_Rollladen_Terrasse_DOWN.state )
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_U_V,>");
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_D_V,>");
t_Rolllaeden = createTimer (now.plusSeconds(1), [
sendCommand (ArduMEGA, "<EG_Rollladen_Terrasse_DOWN,>");
t_Rolllaeden = null
])
t_Rolllaeden = createTimer (now.plusSeconds(40), [
EG_Rollladen_Terrasse_DOWN.postUpdate(0)
sendCommand (EG_Rollladen_Terrasse, STOP)
t_Rolllaeden = null
])
}
])
end