i have written some rules. but none of them are working
please check for any errors.
ps i have written the rules for the fist time
//This is the Rules File
rule "Sai's Room ON"
when
Item SKEverything received update [ON]
then
SKBedLights.sendCommand(ON)
SKBedFan.sendCommand(ON)
end
rule "Sai's Room OFF"
when
Item SKEverything received update [ON]
then
SKBedLights.sendCommand(OFF)
SKBedFan.sendCommand(OFF)
SKAC.sendCommand(OFF)
SKMediaCenter.sendCommand(OFF)
SKSocket.sendCommand(OFF)
SKUBLights5MIN.sendCommand(ON)
end
//AC-Timer-Cycle
rule "Ac-Timer-Cycle @12AM"
when
Time cron "0 0 0 1/1 * ? *"
then
if(SKACCYCLE.state == ON)
{
sendBroadcastNotification("AC-ON")
sendCommand(SKAC, ON)
sendCommand(SKBedFan, OFF)
}
end
rule "Ac-Timer-Cycle @5AM"
when
Time cron "0 0 5 1/1 * ? *"
then
if(SKACCYCLE.state == ON)
{
sendBroadcastNotification("AC-ON")
sendCommand(SKAC, ON)
sendCommand(SKBedFan, OFF)
}
end
rule "Ac-Timer-Cycle @3AM"
when
Time cron "0 0 3 1/1 * ? *"
then
if(SKACCYCLE.state == ON)
{
sendBroadcastNotification("AC-OFF")
sendCommand(SKAC, OFF)
sendCommand(SKBedFan, ON)
}
end
rule "Ac-Timer-Cycle @8AM"
when
Time cron "0 0 8 1/1 * ? *"
then
if(SKACCYCLE.state == ON)
{
sendBroadcastNotification("AC-OFF")
sendCommand(SKAC, OFF)
sendCommand(SKBedFan, ON)
}
end