DSC Alarm Invoked - Is it possible to capture what zone triggered it ?

Hi

Does anyone know how you can capture which sensor triggered the alarm ?

I’d like to have a some code run that announces (via TTS) which zone was tripped to trigger the alarm ?

This was recently asked in the Lock, Motion & Security sub-forum…

http://forum.micasaverde.com/index.php/topic,50212.0.html

I get a text from the EyezOn portal showing the zone. I think I could also pull from EventWatcher…

Thanks @wilme2

That’s a lot of code from @aohome

[code]local Z1 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 81)
local Z2 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 82)
local Z3 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 83)
local Z4 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 84)
local Z5 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 85)
local Z6 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 88)
local Z7 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 100)
local Z8 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 89)
local Z9 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 101)
local Z10 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 90)
local Z11 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 102)
local Z12 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 91)
local Z13 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 103)
local Z14 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 104)
local Z15 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 105)
local Z16 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 92)
local Z17 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 93)
local Z18 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 106)
local Z19 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 107)
local Z20 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 108)
local Z21 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 109)
local Z22 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 110)
local Z23 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 94)
local Z24 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 95)
local Z25 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 96)
local Z26 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 97)
local Z27 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 98)
local Z28 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 99)
local Z29 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 111)
local Z30 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 126)
local Z31 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 122)
local Z32 = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 123)

local msg
local trips = ‘’

if tonumber(Z1) == 1 then
trips = trips … “SMS Arm\n”
end
if tonumber(Z2) == 1 then
trips = trips … “Guest Passage\n”
end
if tonumber(Z3) == 1 then
trips = trips … “Passage PIR\n”
end
if tonumber(Z4) == 1 then
trips = trips … “Laundry PIR\n”
end
if tonumber(Z5) == 1 then
trips = trips … “Kitchen VX\n”
end
if tonumber(Z6) == 1 then
trips = trips … “Front Door\n”
end
if tonumber(Z7) == 1 then
trips = trips … “Kitchen PIR\n”
end
if tonumber(Z8) == 1 then
trips = trips … “Remote Arm\n”
end
if tonumber(Z9) == 1 then
trips = trips … “Fountain VX\n”
end
if tonumber(Z10) == 1 then
trips = trips … “Lounge Kitchen\n”
end
if tonumber(Z11) == 1 then
trips = trips … “Lounge PIR\n”
end
if tonumber(Z12) == 1 then
trips = trips … “TV Study\n”
end
if tonumber(Z13) == 1 then
trips = trips … “Pool VX\n”
end
if tonumber(Z14) == 1 then
trips = trips … “TV PIR\n”
end
if tonumber(Z15) == 1 then
trips = trips … “Club Road Beam\n”
end
if tonumber(Z16) == 1 then
trips = trips … “Panic Zone\n”
end
if tonumber(Z17) == 1 then
trips = trips … “Stair Window\n”
end
if tonumber(Z18) == 1 then
trips = trips … “Landing PIR\n”
end
if tonumber(Z19) == 1 then
trips = trips … “Front Beam\n”
end
if tonumber(Z20) == 1 then
trips = trips … “Study Beam\n”
end
if tonumber(Z21) == 1 then
trips = trips … “Balcony VX\n”
end
if tonumber(Z22) == 1 then
trips = trips … “Front Wall Beam\n”
end
if tonumber(Z23) == 1 then
trips = trips … “Upstairs Window\n”
end
if tonumber(Z24) == 1 then
trips = trips … “Laundry Garage\n”
end
if tonumber(Z25) == 1 then
trips = trips … “Kate’s Room\n”
end
if tonumber(Z26) == 1 then
trips = trips … “Emma’s Room\n”
end
if tonumber(Z27) == 1 then
trips = trips … “Main Bedroom\n”
end
if tonumber(Z28) == 1 then
trips = trips … “Ensuite\n”
end
if tonumber(Z29) == 1 then
trips = trips … “D/Door VX\n”
end
if tonumber(Z30) == 1 then
trips = trips … “Z30 Unknown\n”
end
if tonumber(Z31) == 1 then
trips = trips … “Garage Door\n”
end
if tonumber(Z32) == 1 then
trips = trips … “Gate\n”
end

if string.len(trips) > 0 then
msg =“” … trips
else
msg = "No zones are open. "
end

luup.call_action(“urn:upnp-org:serviceId:IOSPush1”, “SendPushOverNotification”,{ Title= “Alarm Siren(a)”, Message=msg, Priority=1, URL=“”, URLTitle=“”, Sound=“intermission”}, 121)[/code]

I have the IT-100 integration for the DSC plugin, so whatever i do would need to be local.

But thinking about it - once the alarm is armed, other than date/time updates being sent though - in the event that the alarm is triggered, my assumption is that the culprit zone would be the first sensor (that’s not an entry/exit zone) that’s reported as being tripped …

So the key will be to try and capture and extract that value. (no small task) :frowning:

[quote=“parkerc, post:3, topic:197222”]I have the IT-100 integration for the DSC plugin, so whatever i do would need to be local.

But thinking about it - once the alarm is armed, other than date/time updates being sent though - in the event that the alarm is triggered, my assumption is that the culprit zone would be the first sensor (that’s not an entry/exit zone) that’s reported as being tripped …

So the key will be to try and capture and extract that value. (no small task) :-([/quote]
In what I have seen EventWatcher capture at the time of an alarm (Alarm Active), it is the zone that tripps right before the alarm goes active…

I could pull one up from my Syslog server (EventWatcher populates), I think…

I use Vera Alerts to verbally tell me what zone was opened. it also keeps a log as to what zone was opened.