rule "Turn Lamp off"
when
Item Lamp_Switch received command OFF
then
sendHttpGetRequest("http://10.1.1.83/lamp/OFF")
end
rule "Turn Lamp on"
when
Item Lamp_Switch received command ON
then
sendHttpGetRequest("http://10.1.1.83/lamp/ON")
end
rule "Change lamp brightness"
when
Item Lamp_Brightness received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/brightness/" + receivedCommand)
postUpdate(Lamp_Brightness, "")
end
rule "Change lamp red level"
when
Item Lamp_Red received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/red/" + receivedCommand)
postUpdate(Lamp_Red, "")
end
rule "Change lamp green level"
when
Item Lamp_Green received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/green/" + receivedCommand)
postUpdate(Lamp_Green, "")
end
rule "Change lamp blue level"
when
Item Lamp_Blue received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/blue/" + receivedCommand)
postUpdate(Lamp_Blue, "")
end