If the statement

I have a garage door opener and a Aerotech door bell that I am using as a voice devise. I have a scene that checks the garage door at 9:00 pm and alerts us if it has been left open. I am new at code and am using pieces of others code. Here is what I have , but get an error. The code for the door bell works, but the if then statement for checking to see if the garage door is open fails. Any help would be great. The garage door is 34 and the door bell is 44.

local lul_tmp = luup.variable_get(",urn:schemas-upnp-uorg:device:BinaryLight:1 “Status”, 34)
if (lul_tmp == “1”) then

luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘44’,Data=‘112 4 6 1 18’},1)
end

[quote=“Aubreypric, post:1, topic:197192”]I have a garage door opener and a Aerotech door bell that I am using as a voice devise. I have a scene that checks the garage door at 9:00 pm and alerts us if it has been left open. I am new at code and am using pieces of others code. Here is what I have , but get an error. The code for the door bell works, but the if then statement for checking to see if the garage door is open fails. Any help would be great. The garage door is 34 and the door bell is 44.

local lul_tmp = luup.variable_get(",urn:schemas-upnp-uorg:device:BinaryLight:1 “Status”, 34)
if (lul_tmp == “1”) then

luup.call_action(‘urn:micasaverde-com:serviceId:ZWaveNetwork1’,‘SendData’,{Node=‘44’,Data=‘112 4 6 1 18’},1)
end[/quote]

So why is there a comma between your opening quote and “urn” in the luup.variable_get call?

–Richard

use

local lul_tmp = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1","Status",34)

instead…

Other than the obvious typos in the command… You need to specify a service id… The URN you specified is a device type id (as indicated by :device: in the urn)…

Alternately, get pleg. It makes having AND/OR triggers much easier.

I have my doorbell set up to chime on open doors, when the washer stops, fire alarm, leak sensor, severe weather alerts, etc.