help me figure out where I’m wrong, this works:
rule "casa1 preset"
when
Item casa1_preset received command
then
switch
sendHttpGetRequest("http://ipaddress:port/decoder_control.cgi?command=31&user=username&pwd=password" )
end
but needing more presets, and this does not work:
rule "casa1 preset"
when
Item casa1_preset received command
then
switch(receivedCommand) {
case 0: sendHttpGetRequest("http://ipaddress:port/decoder_control.cgi?command=31&user=username&pwd=password" )
case 1: sendHttpGetRequest("http://ipaddress:port/decoder_control.cgi?command=33&user=username&pwd=password" )
}
end
sitemap: Switch item=casa1_preset mappings=[0=“door”, 1=“windows” ]
item: String casa1_preset “preset”