für das Badezimmer habe ich mir mehrere rules erstellt habe. Erst einen Tag später kann ich eigentlich wirklich feststellen, dass der Time Cron auch die richtige Rule einleitet. Gestern beim testen wollte irgendwie alles nicht so richtig laufen ...
Habt ihr auch die Erfahrung gemacht ???
Weiterhin bin ich über Verbesserung von Rules oder Schreibweisen sehr dankbar
Code: Alles auswählen
rule Bad_1
when
System started
then
if ( Anwesenheit.state == ON && SomWin.state == OFF && Fe_Bad.state == 0)
[color=#00BF00]Anwesenheitsabfrage & Sommer/Winter Status && und Stellung des Fensterkontakts[/color]
{sendCommand (Bad_SollSet, 17)
}
else
if ( Anwesenheit.state == OFF && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 13)
}
else
if ( SomWin.state == OFF || Fe_Bad.state != 0)
{sendCommand (Bad_SollSet, OFF)
end
rule Bad_2
when
Time cron "0 0/10 6-8 ? * *"
then
if (Anwesenheit.state == ON && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 21)
}
else
if (Anwesenheit.state == OFF && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 13)
}
else
if (SomWin.state == ON || Fe_Bad.state != 0)
{sendCommand (Bad_SollSet, OFF)
}
end
rule Bad_3
when
Time cron "0 0/10 8-18 ? * *"
then
if (Anwesenheit.state == ON && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 17)
}
else
if (Anwesenheit.state == OFF && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 13)
}
else
if (SomWin.state == ON || Fe_Bad.state != 0)
{sendCommand (Bad_SollSet, OFF)
}
end
rule Bad_4
when
Time cron "0 0/10 18-21 ? * *" /* Schreibeweise im Test // von 18-21 Uhr */
then
if (Anwesenheit.state == ON && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 21)
}
else
if (Anwesenheit.state == OFF && SomWin.state == OFF && Fe_bad.state == 0)
{sendCommand (Bad_SollSet, 17)
}
else
if (SomWin.state == ON || Fe_Bad.state != 0)
{sendCommand (Bad_SollSet, OFF)
}
end
rule Bad_5
when
Time cron "0 0/10 21-5 ? * *"
then
if (Anwesenheit.state == ON && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 17)
}
else
if (Anwesenheit.state == OFF && SomWin.state == OFF && Fe_Bad.state == 0)
{sendCommand (Bad_SollSet, 13)
}
else
if (SomWin.state == ON || Fe_Bad.state != 0)
{sendCommand (Bad_SollSet, OFF)
}
end
rule Bad_7
when
Item Anwesenheit changed from On to OFF
then
{sendCommand (Bad_SollSet, 13)
}
end
rule Bad_8
when
Item Fe_Bad changed from 0
or
Item SomWin changed from OFF to ON
then
{sendCommand (Bad_SollSet, OFF)
}