I’m just wondering if it’s possible with the plugin to receive information on which zone caused an alarm. I’ve got my DSC PC5010 connected to my Vera3 with the IT-100 and I’m working on setting up my scenes - ideally if the alarm is going off, I want my notification to be able to tell me which zone is the one that tripped it. I’m just not sure if this value is obtainable or not.
Any help would be great!
With [scene-based] Luup code, you can determine which Zones are open, along with When they were opened.
It’s not quite as exact as which Zone triggered the Alarm, since some of these Zones may have been bypassed at the time of the Alarm, but it’s fairly close if you use the “most recent” open Zone (by it’s timestamp)
Here’s some (admittedly rough - I haven’t figured out arrays in Lua) code that I use to tell what zones are open in my house. I’ll occasionally launch it from my phone app when I see that the green “ready” light is off. Helps to figure out if one of the kids didn’t close the door all the way, etc. You’ll need to update the ID numbers to match your setup.
I’m sending the notification via the Push Notification plugin (device ID 10) - alter that line to send notification however you’d like.
Put this in the LUUP for a scene. Kick off the scene when the alarm is breached.
[code]local back = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 35)
local crawl = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 36)
local office = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 29)
local front = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 25)
local living = luup.variable_get(“urn:micasaverde-com:serviceId:SecuritySensor1”, “Tripped”, 27)
local msg
local trips = ‘’
if tonumber(back) == 1 then
trips = trips … "back door. "
end
if tonumber(crawl) == 1 then
trips = trips … "crawl space door. "
end
if tonumber(office) == 1 then
trips = trips … "office or dining room windows. "
end
if tonumber(front) == 1 then
trips = trips … "front or garage door. "
end
if tonumber(living) == 1 then
trips = trips … "living room windows. "
end
if string.len(trips) > 0 then
msg = "The following zones are open. " … trips
else
msg = “No zones are open.”
end
luup.call_action(“urn:upnp-org:serviceId:IOSPush1”, “SendPushOverNotification”,{ Title= “Zone Status”, Message=msg, Priority=-1, URL=“”, URLTitle=“”, Sound=“”}, 10)
[/code]
I was thinking that’s the way I’d have to go - thanks for the code…
If the alarm is tripped but the zone is no longer open (door opened trips the alarm and they closed the door behind them) would it still tell me?
Ultimately I’d like to write a scene where if it’s tripped by Zone X, then Camera X (the camera in view of that zone) takes a picture and Vera Alerts sends that picture to me.
Technically, with an IT100, you can also monitor for a Zone-Alarm event (Code “601”) and trigger a notification from that. Presumably this also works on a 2DS/3DS unit as well.
This would be done using an Advanced-Scene, using a Vendor Code of “601”, but I’ve not specifically tested for how/when this event occurs, or where it occurs relative to the Alarm event (Code “654”)
That said, I just checked the code of the DSC Plugin, and I wasn’t setting these correctly for this event type. I’ve created an [untested] patch to address setting these Variables ([tt]VendorStatusCode[/tt], [tt]VendorStatusData[/tt], [tt]VendorStatus[/tt]) correctly.
In this case, it would be a Partition-level Advanced Scene, since the 601 codes are delivered to the Partition. If you want to try the [untested] one-off patch, it’s this file:
http://code.mios.com/trac/mios_dscalarmpanel/export/89/trunk/I_DSCAlarmPanel1.xml
Thanks.
Is there anything that lists all the vendor codes? I’m trying to figure them out but not doing so well
They all come in the programming guide:
Support Home Page | HomeSeer
At least, those are the ones that the IT100 supports. The 2DS/3DS should support all of them, but recently there have been a few of the more exotic ones they don’t [yet] implement.
Not a problem for you, since you have a IT100, more a note for others reading the thread… 
Being new to LUUP / LUA coding and the Vera in general, I may be stepping in this deeper than I can handle right now but all of this information is a great reference. The biggest perk of the Vera I’ve seen so far is how helpful the development community is.
Thanks!