Author Topic: Zone Violated Report DSC Alarm  (Read 105 times)

Offline aohome

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Zone Violated Report DSC Alarm
« on: August 07, 2017, 11:22:58 am »
Can anyone give me the luup code or way to send a message saying which zone was the cause of the alarm going off?
Surely there is something simple I have missed.
I have DSC alarm linked with IT-100 to VeraLite. Presenly I setup code that reports any open zones on alarm .. rather clumsy and wordy luup and reports all open zones .. so does not isolate the one that caused the alarm to siren.


Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9501
  • Karma: +721/-133
    • RTS Services Plugins
Re: Zone Violated Report DSC Alarm
« Reply #1 on: August 07, 2017, 12:38:12 pm »
There is NOT enough information on Vera to determine what caused the alarm.
You would need all of the Zone Configuration info for each zone.

If you watched when all the zones were tripped, you could deduce that it was the LAST one that tripped before the alarm went off.

Offline aohome

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Zone Violated Report DSC Alarm
« Reply #2 on: August 08, 2017, 11:34:45 am »
So if I am reading you right... I keep track of all 32 zones somehow storing the latest zone to be tripped. Then assume that it was the one that set the alarm off?
and No way of interogating the Contact ID of the the alarm?

Offline aohome

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Zone Violated Report DSC Alarm
« Reply #3 on: August 08, 2017, 11:43:37 am »
This was my clumsy code to send a Push message to me at the time of the alarm going into siren .. showing all open zones.
However I reviewed again and setoff a PIR .. and it doesn't report as I think it is too much of a quick motion in time .. and is closed again when the info is gathered...so not effective

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)