newb PLEG plea for help with alarm scenario

Hi everyone-

I"m a PLEG newbie asking for some help with a scenario. i’ve searched but i can’t seem to find any examples to help get me started- although i’m sure i can’t be the only one to try this before. forgive me if this has been covered- but i searched on “alarm” and relevant topics, and read through dozens of pages trying to find a similar request.

I’m basically trying to mimic the behavior of an alarm system. i’d like to be able to use the virtual switch to put it into an “armed” state- and then if motion or door is triggered- set off a siren and notify me…

the system is comprised of-

1- two door sensors (the Schlage, which i just set up and seem great- very small, nicely designed, trigger instantly)
2- 1st Gen HSM-100 multi sensor for motion
3- Fotrezz siren/strobe. (also like it quite a bit- i bought the outdoor model, which is huge and incredibly loud.)

i’ve updated my Vera 3 to the beta/latest firmware, (1622?), PLEG/Logic 4.5 and i need some help or hopefully even some examples to get started.

Here goes with some stupid questions…

i’m assuming that i won’t need to do any associations at all between the devices- like siren and door sensor- but rather i bind them all with PLEG logic?

should i follow the approach of arming and disarming with the virtual switch? i imagined that i could use it to arm all the components in the scene- motion, and door sensors…but i don’t know if this is an extra step that’s unnecessary.

Any and all help deeply appreciated.

regards-


quick update-

i got a rudimentary alarm working by setting the basic triggers for doors and motion, and tying them to the condition i created called alarm_tripped, which sets off the siren and turns on some lights…and let me just reiterate how loud that fortrezz outdoor siren is, holy cow…makes my testing fun for the neighbors, lol.

i cannot thank richard enough for creating this great plug-in and supporting the vera community. the whole thing took me five minutes.

now this experiment has led me to ask for any advice in how i could refine my PLEG and add some additional features…please bear with me for another series of stupid questions.

  • i’d like to have an “arm” and “disarm” state with buttons that my wife would feel comfortable using on her phone. i envisioned that hitting arm would arm all the sensors and maybe also the activate the PLEG plug in- although that might be a stretch. i though perhaps that the virtual switch might be the answer here, but it seems like that needs to inherit properties from other devices- so i’m not sure if this is the right approach.

  • would creating a scene be a better answer?

  • if anyone else has done this before- would it be interesting to bring the day/night or gcal plug-ins into play?

  • could someone offer some advice in how to maybe disable the siren after a set period? i think i could muddle through this using some of the lighting examples i’ve seen, but any help appreciated.

thanks again


ok, yet another update. i created a scene that armed the sensors as well as PLEG. for some reason this didn’t work as expected- even when i tripped a door sensor the siren wouldn’t go off. i’m wondering if my syntax is incorrect with my PLEG condition. i’m using-

Condition Name- Siren_On Expression- (front_door_tripped) OR (back_door_tripped) OR (hall_motion_tripped)

should i lose the parens?

help appreciated.


ok- 3rd update- for anyone still patient enough reading along.

i figured out what went wrong with my scene- there were dupe triggers that i had set up that were notifying me when doors opened. those apparently were messing up the triggers used by PLEG. so deleted them, and everything seems ok- BUT- my first gen HSM100 still triggers the alarm despite the fact that i have the motion sensor disarmed!? as long as PLEG is armed, and i walk near the motion sensor, it fires the siren.

can anyone advise me if -

this is just a quirk of this particular version of hsm100? should i replace it with an AEON- or can i logic my way around this in PLEG?

thanks!

Sorry for the delay … when you update a thread … it does not broadcast so others see the update … I just happened to be looking through the various threads.

The problem your are having is that disabling a Motion sensor does not necessarily disable it as a trigger.

There are two types of triggers available for a motion sensor:

  1. When Motion is Triggered
  2. When an Armed Motion Sensor is Triggered.

It sounds like you set PLEG using the first type when you really want the second. Just delete the trigger and create the appropriate one.

richard-

thanks very much. that was indeed the case. but, heres’ my new connundrum. as you know, door sensors do not feature that condition, and only send that they’re tripped. so what i’m trying to do is to create a switch or scenes that i can use to basically arm the sensors, and turn the alarm “scene” on and off.

but, i’m not sure how to implement this in PLEG. when i look at my inputs, i see something called a scene controller. so i thought “great- i’ll use that and create a scene called “alarm armed” that enables all the sensors…” but i can’t seem to find any documentation for it, and the scene controller asks for a “scene number” which i can’t seem to find indicated anywhere in the GUI…

i also thought i could use the virtual switch plug-in and use that as a condition or input somehow, but i’m not sure how to invoke it, because it’s not listed as an input in the PLEG drop down.

thanks for your help again-

The evaluator. In think that could be easily acomplished by creating a virtual switch. then add to your conditions that the virtual switch has to be on. if it is off, the condition would return false. So that switch is your armed or disarmed alarm status,

i also thought i could use the virtual switch plug-in and use that as a condition or input somehow, but i'm not sure how to invoke it, because it's not listed as an input in the PLEG drop down.
After installing the [b]VirtualSwitch[/b] plugin, you will need to click [b]Save/Reload[/b] and refresh your browser page before it will show up under [b]PLEG[/b] [i]Triggers[/i].

Now you should be able to create an Input Trigger as is turned on. Give it a suitable name e.g. ArmSensors. Now add and ArmSensors to your condition expression.

thanks for your reply!

that did the trick, but i’m still struggling with trying to get the basic scenario to work, and i’m concerned that my editing may have corrupted stuff. for example- i suspect that i have a phantom trigger for my back door sensor that never deleted properly- although i don’t see it in the scenes tab, if i try to delete and recreate it, PLEG appends a 1 to the name of the trigger- and it doesn’t seem to fire properly.

which brings me to my next question- is there a best practice for cleaning up stuff cleanly in PLEG and making sure there isn’t any corrupt logic? my scenario is simple enough that i’m happy deleting everything and starting clean. i tried using status and report, and they both come up blank- which based on previous posts seems like some stuff might be munged up.

here’s what i have for the alarm scenario…

triggers-
front door tripped
back door tripped
hall motion tripped
office motion tripped
alarm armed (virtual switch)

Actions-
Alarm On - sets off siren and turns on various lights

Conditions
Siren_On -front_door_tripped OR hall_motion_tripped OR office_motion_tripped OR back_door_tripped1
Alarm_Armed -Armed

because i’m such a newb, i’m not sure if there is a more elegant way to do this- but i have a scene called “Arm Alarm” that i hit that arms all the various sensors, and turns the virtual switch to signify the alarm state is armed. but the back door trigger does not seem to be working, and the whole thing seems to not trigger correctly sometimes.

any help or tips deeply appreciated.

thanks!

You will probably need to re-enter the data.
Before you do … if you can issue the following and send me the info to my email address
That would allow me to see what may have caused the problems.

There is a possibility that the file contains passwords to things like camera or other passwords you saved with Vera (but not your Vera Password ID) … If so you may want to delete it …

http://Your.Vera.IP.Address:3480/data_request?id=user_data

hi richard, just send you a PM/email with the requested info- thanks for your help.

i patched 5.0 and deleted and recreated my scenario from scratch, but i still can’t seem to get anything to trigger actions.

richard, i sent an email with a dump and screenshots of my scenario, but if anyone else has any advice, i’m all ears. i attached a couple of screenshots as well with inputs and conditions.

basically, i’m trying to get any armed motion or door sensor tripped to turn on lights and turn on the siren. very basic, but it’s proven to be a frustrating exercise over the past couple of weeks. oh the joys of being a vera owner.

unfortunately, nothing seems to trigger any actions, and it appears that maybe PLEG got corrupted somehow?

You are missing the parenthesis.

armed AND (FD OR BD OR HM OR OM)

thanks for that- i added the parentheses (doh) and finally figured out the main problem, which was that several of the devices had notifications set on them at the individual (notification tab) device level. i had never realized that this would step on PLEG triggers, which apparently it does.

so the good news is that i started over, and figured i would implement notifications in PLEG- which is no big deal for such a simple scenario- but, now my latest problem is my stupid Aeon 4 in 1, which is triggering false motion events every time it wakes up from sleep. i’ve updated the latest firmware, played with the advanced config based on threads i’ve seen, and still no luck. ah well- that’s life with vera. i know it’s blasphemy, but i wish fibaro would finally start selling in the us just so i could try another platform that might do better interop and compatibility testing. of course- the grass is always greener, etc…they might very well be worse.

I have notifications on lots of things that I also uses as triggers for PLEG.
There is no interaction.