Question on Using Modes and Scenes as an alarm

I would greatly appreciate community feedback here. i have a Go-Control Two button switch in my system. I would like to use that to Arm and Disarm my system as an alarm. I have set this up but have a couple issues, perhaps someone could give some feedback on. There are two components.
My HOME mode sets all door sensors to disarm mode. My AWAY mode sets all door sensors to arm mode. My modes is set to allow 30 seconds to change modes.
My switch has button 1 to set mode to HOME and Button 2 to set mode to AWAY.
I have a scene which is basically “If any of the armed sensors are tripped, turn on my siren after a 5 second delay”.
My theory is that whenI press AWAY, I have now 30 seconds to get out the door before mode AWAY is activated.
Once I return, however, I only have 5 seconds to press the button for HOME mode. Here’s my issue, since there is a 30 second delay to set HOME mode, the 5 seconds on the scene will pass and the alarm will turn off. Unless Vera knows that if it is waiting on a mode change to not activate a scene?
Does this make sense? Has anyone else accomplished this simple setup in a way that works better than this?

Thank you!

The only way I could setup my alarm was to use the Count Down Timer plugin and three scenes.

The first scene “Burglar Alarm” it’s device triggers are if an armed door or window sensor is opened.

This scene also starts the Count Down Timer which is 60 seconds.

I then have a second scene “Burglar Alarm Delayed”. Its device trigger is the Count Down Timer “Timer completes while not muted”.

If the 60 second timer completes for example and I have not disarmed the alarm then the siren with go off.

I then have a “Home” Scene when this scene is run it cancels the Count Down Timer, thus stopping the “Burglar Alarm Delayed” Scene.

And then in this “Home” scene I have some LUA code to switch Vera into Home mode.

So this gives me 60 seconds after opening an armed door to run my “Home” scene to stop the siren going off.

I never figured out how to do a count down timer in PLEG. You could probably use Reactor more easily.

I’m sure there are better ways to set this up, but this is how I set it up many years ago and it still works today.

Switching to HOME has no delay in the system, unless you configured it in the scene for button 1, it should change immediately.

I have a basic alarm system in Reactor that I’ve meant to make into a video for some time, but my lab where I film has been such a mess that I haven’t done it. It’s a long config, but I don’t think too difficult to understand for anyone who has spent a little time with Reactor.

The first thing I did was make a group called “Logic Elements” that’s NUL. This is a container for some logic sub-functions.

To my “Logic Elements” group, I first added three “zone” subgroups. I called them “Z1 Smoke Detectors”, “Z2 Perimeter”, and “Z3 Interior”. These are all OR groups. The Z1 group gets all of my smoke detectors (“thanks, Captain Obvious”). The Z2 Perimeter group gets those door sensors (or locks or whatever) that should have a delay before causing an alarm when tripped. These are your entry/exit doors, typically. The Z3 Interiors group gets my motion sensors (more on this at the end). The conditions in these groups are generally of the form: sensor device Tripped is TRUE (or lock Status is FALSE, for unlocked if you are using a lock as a sensor). Remember these must be OR groups, so any sensor tripping makes the group go true. Easy enough so far.

The first “Active” logic subgroup is “Away Mode Breached”, created as a child of “Logic Elements”:

Group: Away Mode Breached - AND

  • Condition: House Mode in Away, Vacation
  • Group: Away Zone Rules - OR
    • Group Interior Zone Muted - AND
      • Condition: Group State “Z3 Interiors” is TRUE
      • Condition: Group State “Z2 Perimeter” is FALSE
    • Group Perimeter Delayed - AND, sustained for 15 seconds (or whatever entry delay)
      • Condition: Group State “Z2 Perimeter” is TRUE

This group goes true in away or vacation mode when either the Z3 Interior or Z2 Perimeter groups go true. The interiors are gated by the perimeter, so that if the perimeter group is true, the interiors are muted — when you enter, it’s often the case that a door sensor trips first (perimeter) followed by an interior (motion sensor as you come in); this structure prevents the motion sensor from overriding the delay and immediately triggering the alarm.

Onward… we use night mode to mean what many alarm systems call “stay”, the mode in which interiors are not considered but perimeters are (so you can secure the house but still be in it). This subgroup is also created as a child of “Logic Elements”:

Group: Night Mode Breached - AND

  • Condition: House Mode is Night
  • Group: Night Zone Rules - OR
    • Condition: Group State “Z2 Permimeter” is TRUE

This should be simple enough: if the perimeter is breached in night mode, the group goes true. Notice there are no delays here: breaching the perimeter at night is an immediate alarm.

Finally, we add “Home Mode” to “Logic Elements”: This group simply tests if we’re in home mode; there are no zone tests:

Group: Home Mode - AND

  • Condition: House Mode is Home

OK. Now the big business. The “In Alarm” group, which should be created under root (top) determines if the system should be in alarm:

Group: In Alarm - OR

  • Condition: Group State “Away Mode Breached” is TRUE
  • Condition: Group State “Night Mode Breached” is TRUE

Easy, right? If either of our “breached” conditions is true, the system should be in alarm. Now let’s make some noise. The last group “Sound Siren” should be created under root:

Group: Sound Siren - OR

  • Condition: Group State “Z1 Smoke Detectors” is TRUE
  • Group Breach Hold - AND
    • Condition: Group State “In Alarm” is TRUE, pulse mode output, 240s one time
    • Condition: House Mode is Away, Night, Vacation

(The last condition could also be: Group State “Home Mode” is FALSE)

Here we check if the smoke detector zone is tripped, because we always sound alarms when smokes are tripped, regardless of house mode or any delays. The “Breach Hold” subgroup checks “In Alarm” for true while in away, night, or vacation house modes. If smokes are tripped or Breach Hold is true, the true activity for this group can turn on a siren, send messages, turn on lights, whatever. The false activity can turn them off. Notice that the Breach Hold group is pulse output for 4 minutes (240 seconds) — that limits the amount of time a siren will sound to 4 minutes, which is common in the US for alarm systems to prevent a false alarm (e.g. broken perimeter sensor) from sounding the alarm indefinitely.

This is intended to just be a starting point, and a demonstration of using groups to isolate functional logic. There are lots of alarm features you could add; for example, this simple model doesn’t address that some perimeter zones should not have a delay when tripped. For example, you may have a side- or basement door that you don’t normally use for entry/exit; this should cause an immediate alarm when tripped and the system is active. It’s not appropriate to add those sensors to Z3 Interiors because they would be ignored in Night mode. I leave it as an exercise for the reader to add the necessary logic (spoiler/hint: it should be easy to create another group for them “Z4 Perimeter Immediate” and add conditions to the “Rules” groups for the various house modes).

5 Likes

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules