Hello All
I want a Luup which does the followings:
-When the Door is opened
-the program will wait 30 seconds
-after this 30 seconds if the door sensor is Armed it will activate a Sound (device# 21) for 10 seconds and send a Notification via Powrl
-if the door is Bypass it will only turn on device# 8
i have done the followings but i always got an error and i couldn’t make the 10 seconds which the alarm will be activated at.
function tuning()
local doorstatus = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Armed”, 6)
if (doorstatus == “1”) then
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “1”}, 21)
luup.inet.wget("http://www.prowlapp.com/publicapi/add?apikey=9e85297ce969620c081ccfc82fe4e1575acd0140&application=Vera&event=Armed&description=Alarm+Armed&priority=-1")
return true
else luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = “1”}, 8)
end
end
luup.call_delay(“tuning”, 30)
any help would be appreciate it