Hello all
I am trying to write a Luup which does the followings:
-waiting 30 seconds after the scene is RUN
-check if the DOOR sensor is Armed then turn on device number 12
-if not then turn on device number 6
here is what i did:
function tuning()
local doorstatus = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “status”, 6)
if (doorstatus = “armed”) then
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “1”}, 12)
else
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “0”}, 14)
end
luup.call_timer(“tuning”,1,30,“”,“”)
but it has an error
help will be appreciated