Hi
i’m new to openhab and have been playing around with programing some virtual items and rules for them, before i get all my IOT devices.
the problem is I have created some virtual items as scenes, and made some rules for them. but it seems to me that the rules are not running.
or at least they are not doing anything.
my rules are in the rules folder and the file is called RULES.rules, do i need to tell openhab to load that file ?
does it have any effect on this file that i am running some rules on " Rule Engine (Experimental)" ?
or is something wrong with my code ?
rule "Sunset Rule"
when
Channel 'astro:sun:local:set#event' triggered END
then
if( VirtualItem.state==ON ) {
VirtualItem4.sendCommand(ON)
//kveikir á deigi
}
end
rule "Sunrise Rule"
when
Channel 'astro:sun:local:rise#event' triggered END
then
if( VirtualItem.state==ON ) {
VirtualItem5.sendCommand(ON)
//kveikir á kvöldi
}
end
end
rule "Night Rule"
when
Time cron "0 0 0 ? ? MON,TUE,WED,THU,FRI *" or
// Kveikir á nótt
Time cron "0 0 1 ? ? SAT,SUN *"
then
VirtualItem2.sendCommand(ON)
end
end