package org.openremote.controller.protocol
global org.openremote.controller.statuscache.CommandFacade execute;global org.openremote.controller.statuscache.SwitchFacade switches;
rule "Turn garden lights on" when
Event( source == "Sunset", value == "true" )
then
execute.command( "Tuinhuis Buiten ON" ); execute.command( "Achterdeur Light ON" );
end
rule "Turn garden lights off" when
Event( source == "Sunset", value == "false" )
then
execute.command( "Tuinhuis Buiten OFF" ); execute.command( "Achterdeur Light OFF" );
/* ----------------------------------------------- OUTDOOR LIGHTS ----------------------------------------------- */rule "Turn Outside Lights on at Sunset" when Event( source == "isNightSensor", value == "true" ) then execute.command( "Node 10 (ON)" ); execute.command( "Node 14 (ON)" ); end
rule "Turn Outside Lights off at Sunrise" when Event( source == "isNightSensor", value == "false" ) then execute.command( "Node 10 (OFF)" ); execute.command( "Node 14 (OFF)" ); end