Hey there, I am playing around with some rules. After my first complex try did not work I tried easier rules to find the error but I cannot find one. Can somebody explain me where the mistake is?
This rule does not work:
rule "Check if enough power is beeing produced for venting"
when
Time cron "0 */1 * * * ?"
then
if(Solar_Aktuell.state >= 200) { //Check if there is more than 200W power
if(lg500_anaus != ON) //If switch lg500_anaus is set to off then ...
{
sendCommand(lg500_anaus, ON) //...set it on ... and...
sendTelegram("bot1", "venting started") // ...send me a telegram
}
}
end
This rule sends me a telegram every minute and switches the switch on every minute… but why if it IS already on??
This thing does not do anything at all:
rule "LĂĽftungsanlage anschalten wenn genug Strom produziert wird"
when
Time cron "0 */1 * * * ?" && Solar_Aktuell.state >= 200
then
if(lg500_anaus != ON)
{
sendCommand(lg500_anaus, ON)
sendTelegram("bot1", "Lueftungsanlage wird angestellt")
}
end