Jump to content

Program with Elk integration


rccoleman

Recommended Posts

Posted

I just installed my Elk security system and I've spent some time integrating it with my ISY.  I'd like to write a program to handle a particular sequence, but I'm having trouble making it work.  Basically, if the alarm trips while armed, I'd like to turn on the downstairs lights and send an email with the violated zone after the entry delay has expired.

 

Taking a cue from the wiki, I can write a program like this that send a notification with the violated zone when it happens:

 

If

Elk Zone 'xxx' is Violated

Or Elk Zone 'yyy' is Violated

...

Then

Send Notification to Email 'Prowl' content 'Alarm Zone Violated'

 

where 'Alarm Zone Violated' has the following: "Zone Violated: ${elk.zone.#.name}"

 

That works at the time of the zone violation because zone violation itself caused the program to run, but it also runs when I enter normally and disarm the system within the entry delay time.

 

I can also get the lights to turn on after the entry delay has expired using this:

 

If

Elk Area 'House' 'Alarm State' is Burglar Alarm

Then

Set Scene 'Scenes / Downstairs Lights' On

 

This program works fine and turns the lights on after the entry delay expires.

 

Merging the two programs should work if the zone remains violated (door is left open), but if the zone has become normal (i.e., the door has been closed), I can only rely on the 'Burglar Alarm' state as a trigger (as in the second program) and I can't use the if zone 'xxx' is violated conditions.  If I try to send the "Alarm Zone Violated" notification from the second program and the zone has become normal, I get a blank zone name in the notification.

 

I considered trying to cache the zone name when the violation occurs to use it later in the notification, but I don't think that's currently possible.

 

The Elk tells me the zone violation that triggered the alarm when I disarm it, even it's been closed, so it clearly has that information stored.  Is there anyway to send a notification from the ISY at a later time that includes the zone that was violated when the alarm was triggered?

 

Hopefully that was reasonably clear, but I'll be happy to clarify anything that's confusing.

 

Thanks,

Rob

Posted

I don't have elk and I'm not clear about the issue but seems you could assign state variables to each zone and monitor that state including a wait period.

 

If

       Elk Area 'House' 'Alarm State' is Burglar Alarm

and

      s.ElkZone_1 is 1

or

     s.ElkZone_2 is 1

 

Then

      Wait 6 seconds  <<-- whatever period is required to clear the alarm

   

    Set Scene 'Scenes / Downstairs Lights' On  

    Send Notification to Email 'Prowl' content 'Alarm Zone Violated'

 

notification would include ${<variable name>}.

 

 

something along those lines...

 

 

Jon...

Posted (edited)

Thanks, that's an approach that I hadn't considered.  The problem is that the Burglar Alarm state and the zone violations may not occur simultaneously and the violation information is lost when the condition is reversed (someone opens and closes a door quickly, for instance).  The sequence is always Violation->Entry Delay->Burglar Alarm (if not disarmed), so I think I could do something with your concept.

 

Riffing on your idea, I think I could use one program per zone to set bits or separate zone integer variables, send the result as a notification when a burglar alarm occurs + reset the variables, and reset the variables if the system becomes disarmed.  I wouldn't need any delays in this method because I'm just caching the information and regurgitating it later.  The zone programs would only set bits (not clear them), so information wouldn't be lost if the condition changes later.

 

This would only store and report zone numbers, and converting those numbers into zone names would require a bunch more programs and customer notifications, I think.  Sometimes I feel like I'm swimming upstream :)

 

In any case, thanks for the advice.  For what it's worth, I can upgrade to the 5.0.x beta if this becomes easier there.  From the 5.0 wiki page, it's not clear that it does, though.  The more I think about it, the more I wonder if the ISY just isn't the best tool for this and I should look into ElkRP rules instead.

 

Rob

Edited by rccoleman
Guest
This topic is now closed to further replies.

×
×
  • Create New...