Here’s what I’m trying:
A Scene with a trigger of Exit Delay for the alarm panel. (I’ll later use PLEG to differentiate between exit delay and entry delay as I don’t think my panel supports entry delay)
vDev55ID = 55
vDev55Name = "Zone #2 - Front Door"
local vDev55Tripped = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", vDev55ID)
local vDev55LastTrip = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", vDev55ID)
if (vDev55Tripped == "1") then
luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendProwlNotification", {Event= alarmstate, Description=tostring(vDev55Name), Priority=2, URL=tmp_url}, 378)
end
vDev56ID = 56
vDev56Name = "Zone #3 - Laundry Door"
local vDev56Tripped = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", vDev56ID)
local vDev56LastTrip = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", vDev56ID)
if (vDev56Tripped == "1") then
luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendProwlNotification", {Event= alarmstate, Description=tostring(vDev56Name), Priority=2, URL=tmp_url}, 378)
end
vDev57ID = 57
vDev57Name = "Zone #4 - Front Garage Entry"
local vDev57Tripped = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", vDev57ID)
local vDev57LastTrip = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "LastTrip", vDev57ID)
if (vDev57Tripped == "1") then
luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendProwlNotification", {Event= alarmstate, Description=tostring(vDev57Name), Priority=2, URL=tmp_url}, 378)
end
I prefer this because it appears it will create less traffic and use less overhead. If the Tripped state proves unreliable, I’ll try compare the LastTrip to NOW and use like 5 seconds.
I have a lot more zones, but I’m only posting a few.