Hello,
something is wrong with my rule, sometimes the rule work well an after a restart, the rule don’t work.
rule “auto Heizung”
when
Time cron “0 0/30 * * * ?” or
Item home changed
then
if (home.state == ON && now.getHourOfDay >= 5 && now.getHourOfDay < 6) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 21)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 6)
sendCommand (kueche_soll_temp, 21)
sendCommand (wc_soll_temp, 16)
sendCommand (schlafzimmer_soll_temp, 18)
sendCommand (marlene_soll_temp, 18)
sendCommand (bad_soll_temp, 21)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 18)
sendPushoverMessage(pushoverBuilder("Heizung 5 - 6Uhr" ))
}
else if (home.state == ON && now.getHourOfDay >= 6 && now.getHourOfDay < 8) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 21)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 6)
sendCommand (kueche_soll_temp, 21)
sendCommand (wc_soll_temp, 18)
sendCommand (schlafzimmer_soll_temp, 18)
sendCommand (marlene_soll_temp, 18)
sendCommand (bad_soll_temp, 21)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 20)
sendPushoverMessage(pushoverBuilder("Heizung 6 -8 Uhr" ))
}
else if (home.state == ON && now.getHourOfDay >= 8 && now.getHourOfDay < 17) {
sendCommand (alex_soll_temp, 18)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 20)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 6)
sendCommand (kueche_soll_temp, 20)
sendCommand (wc_soll_temp, 20)
sendCommand (schlafzimmer_soll_temp, 18)
sendCommand (marlene_soll_temp, 20)
sendCommand (bad_soll_temp, 20)
sendCommand (moritz_soll_temp, 20)
sendCommand (anna_soll_temp, 20)
sendPushoverMessage(pushoverBuilder("Heizung 8-17 Uhr" ))
}
else if (home.state == ON && now.getHourOfDay >= 17 && now.getHourOfDay < 19) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 20)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 6)
sendCommand (kueche_soll_temp, 20)
sendCommand (wc_soll_temp, 20)
sendCommand (schlafzimmer_soll_temp, 20)
sendCommand (marlene_soll_temp, 19)
sendCommand (bad_soll_temp, 19)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 18)
sendPushoverMessage(pushoverBuilder("Heizung 17 19 Uhr" ))
}
else if (home.state == ON && now.getHourOfDay >= 19 && now.getHourOfDay < 20) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 19)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 6)
sendCommand (kueche_soll_temp, 19)
sendCommand (wc_soll_temp, 18)
sendCommand (schlafzimmer_soll_temp, 20)
sendCommand (marlene_soll_temp, 18)
sendCommand (bad_soll_temp, 20)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 18)
sendPushoverMessage(pushoverBuilder("Heizung 19-20Uhr" ))
}
else if (home.state == ON && now.getHourOfDay >= 20 && now.getHourOfDay < 21) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 19)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 0)
sendCommand (kueche_soll_temp, 19)
sendCommand (wc_soll_temp, 18)
sendCommand (schlafzimmer_soll_temp, 20)
sendCommand (marlene_soll_temp, 18)
sendCommand (bad_soll_temp, 17)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 18)
sendPushoverMessage(pushoverBuilder("Heizung 20 - 21Uhr" ))
}
else if (home.state == ON && now.getHourOfDay >= 21 && now.getHourOfDay < 5) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, ON)
Thread::sleep(2000)
sendCommand (kacontrolbetriebsart, 5)
Thread::sleep(2000)
sendCommand (kacontroltemp, 19)
Thread::sleep(2000)
sendCommand (kacontrolvendilatorstufe, 0)
sendCommand (kueche_soll_temp, 19)
sendCommand (wc_soll_temp, 17)
sendCommand (schlafzimmer_soll_temp, 18)
sendCommand (marlene_soll_temp, 18)
sendCommand (bad_soll_temp, 17)
sendCommand (moritz_soll_temp, 20)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 18)
sendPushoverMessage(pushoverBuilder("Heizung 21-5 Uhr" ))
}
else if (home.state == OFF ) {
sendCommand (alex_soll_temp, 16)
sendCommand (kacontrolan_aus, OFF)
sendCommand (wc_soll_temp, 16)
sendCommand (schlafzimmer_soll_temp, 18)
sendCommand (marlene_soll_temp, 18)
sendCommand (bad_soll_temp, 16)
sendCommand (moritz_soll_temp, 18)
sendCommand (anna_soll_temp, 18)
sendPushoverMessage(pushoverBuilder("Heizung OFF" ))
}
end
The Pushover Message ist just a test
Can everybody help me with my problem
Thanks Alex