patim
October 11, 2013, 11:52am
1
Hi There, I know I am still a N00b for this. I tried several days and can’t seem to get it working. Is there anybody that can explain it step by step with examples?
I have a motion sensor on door 1
When I arm that one and it is tripped. all the lights go on and an alarm
It also will be armed from 00:30 untill 06:00
When it is going to be armed and the door is allready tripped. It needs to giva a message that the door is open and have to bypass the arming of the door sensor. So you can close the door and arm it manually.
Is it possible that someone gives me a step by step for this example. Especially the logic in the conditions and the way to reset to bypass if a sensor is tripped at the moment that it is armed.
Thanks in advance.
If you do a search on the forum there are a lot of examples of motion sensors triggering lights, you should be able to get the basics at least from there
patim
October 11, 2013, 12:11pm
3
Hi Mikee,
I understand the basics. I can make that work fine. But I can do that in scenes too.
The problem I have is the complexity that it gives all together. I can’t see through the problem. Triggering lights with a motion sensor in PLEG. no problem. But now don’t arm the sensor if the device is tripped at the time of arming, give an alert that the device is tripped and that the alarm is not armed, and bypass the alarm again untill the tripped fase is solved. That is my problem.
You clearly left some information out of the description … so it’s hard to be complete …
Like what is causing the lights to go on and sound an alarm ?
Are you using Vera as an Alarm ? Are you interacting with an Alarm Panel ?
So here are some partial answers:
Trigger Inputs:
DoorMotion When an Armed door motion is detected.
TimerInput:
RequestArm Start at 12:30 AM End at 6:00 AM everyday
Conditions:
Warn RequestArm and DoorMotion and (DoorMotion;RequestArm)
AutoArm RequestArm and (Not DoorMotion) and (DoorMotion; RequestArm)
Add Action to Notify to condition Warn
Add Action to Arm the Alarm logic to condition AutoArm
patim
October 11, 2013, 4:02pm
5
Hi Richard,
Yup wasn’t complete.
The the triggering of the doorsensor will cause the alarm to go of (Vera). It is made in a scene now. There is no alarmpanel involved.
I have a remote that can arm and bypass the status of the sensor (also a scene through Vera)
I would love to have it all in the pleg all together. so the warn the schedule the trigger of the remote etc.
You describe it well but how do I put it down in pleg, just as you write it here?
Hope this is more clear to you.
patim
October 12, 2013, 12:08am
6
Ok, after trying all night here a new try to explain:
First all the devices I have.
Motion sensor 1 that needs to trigger light 1 when armed
Motion sensor 2 that needs to trigger light 2 when armed
Door sensor 1 that needs to trigger all the lights on and the alarm when armed
Door sensor 2 that needs to trigger all the lights on and the alarm when armed
Schedule that arms all the 4 sensors from 00:30 to 06:00
remote function 1 arms all 4 sensors
remote function 2 bypasses al 4 sensors
When I fire some scenes (Vera) like “Go to bed” the 4 sensors needs to be armed as well
When the door sensors are going to be armed and they are allready tripped, an alarm must be send (pushover) and the sensor(s) need to be bypassed.
Tried all kind of different approaches, but nothing seems to work. Also in “conditions” the logical operator “not” stays red as an unknown variable.
For me this is a very tricky pleg formula. It needs to have all inside of the pleg I guess cause I can’t call a Vera scene into the pleg.
If anybody can give me directions (with examples on how to put it in the conditions-tab) I would be very happy.
Hope this is clear enough ???
patim
October 12, 2013, 10:33am
7
Ok, this is what I have so far. Does anybody see something strange. Especially in comparison to my previous reply. Will it work like this???
===================================================
Program Logic Event Generator
Device ID: 802013-10-12 12:30:56.834 PLC Version: 5.1
Triggers
Name Description Last Trigger State
Door1Motion Door sensor 1 armed is tripped 0 false
Door2Motion Door sensor 2 armed is tripped 0 false
SensorFrontMotion Motion 1 armed is tripped 0 false
SensorBackMotion Motion Sensor 2 armed is tripped 2013-10-12 11:34:23.214 false
RemoteArm Remote: scene number 1 is activated 0 false
RemoteBypass Remote: scene number 2 is activated 0 false
Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
RequestArm Weekly 00:30:00 1,2,3,4,5,6,7 None Weekly 06:00:00 1,2,3,4,5,6,7 None false 0
Device Properties
Name Device Name Device Variable Last Change Value
AlarmOn AlarmOn/Off Status 2013-10-12 11:34:28.279 0
Conditions
Name Expression Last True State
Alarm_On AlarmOn == 1 2013-10-12 11:34:23.175 false
Alarm_Off AlarmOn == 0 2013-10-12 11:34:28.281 true
RemoteArm RemoteArm == 1 0 false
RemoteBypass RemoteBypass == 1 0 false
Door1 Door1Motion == 1 0 false
Door2 Door2Motion == 1 0 false
SensorFront SensorFrontMotion == 1 0 false
SensorBack SensorBackMotion == 1 0 false
Autoarm RequestArm and (not Door1Motion) and (not Door2Motion) and (RequestArm;Door1Motion;Door2Motion) 0 false
Warn1 Alarm_On == 1 and Door1Motion and (Alarm_On;Door1Motion) 0 false
Warn2 Alarm_On == 1 and Door2Motion and (Alarm_On;Door2Motion) 0 false
Actions
Actions for Condition: Alarm_On
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=1
Door sensor 2 SetArmed newArmedValue=1
Motion 1 SetArmed newArmedValue=1
Motion Sensor 2 SetArmed newArmedValue=1
Actions for Condition: Alarm_Off
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=0
Door sensor 2 SetArmed newArmedValue=0
Motion 1 SetArmed newArmedValue=0
Motion Sensor 2 SetArmed newArmedValue=0
Actions for Condition: RemoteArm
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=1
Door sensor 2 SetArmed newArmedValue=1
Motion 1 SetArmed newArmedValue=1
Motion Sensor 2 SetArmed newArmedValue=1
Actions for Condition: RemoteBypass
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=0
Door sensor 2 SetArmed newArmedValue=0
Motion 1 SetArmed newArmedValue=0
Motion Sensor 2 SetArmed newArmedValue=0
Actions for Condition: Door1
Immediate
Device Action Arguments
Keuken LED SetTarget newTargetValue=1
Schijnwerper achter SetTarget newTargetValue=1
Schijnwerper voor SetTarget newTargetValue=1
Siren And Strobe SetTarget newTargetValue=1
Strijklicht aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Tafellicht achter SetLoadLevelTarget newLoadlevelTarget=100
Vijverlicht SetLoadLevelTarget newLoadlevelTarget=100
Licht voorkant huis SetTarget newTargetValue=1
Aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Boekenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Servieskast licht SetLoadLevelTarget newLoadlevelTarget=100
Eetkamer SetLoadLevelTarget newLoadlevelTarget=100
Gang SetTarget newTargetValue=1
Hal SetLoadLevelTarget newLoadlevelTarget=100
Kamer hoofdlicht SetTarget newTargetValue=1
Laetitia SetLoadLevelTarget newLoadlevelTarget=100
Lamp tiffany SetLoadLevelTarget newLoadlevelTarget=100
Schilderij spot SetLoadLevelTarget newLoadlevelTarget=100
Keuken SetLoadLevelTarget newLoadlevelTarget=100
Keukenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Schuur licht SetTarget newTargetValue=1
Actions for Condition: Door2
Immediate
Device Action Arguments
Schijnwerper achter SetTarget newTargetValue=1
Schijnwerper voor SetTarget newTargetValue=1
Siren And Strobe SetTarget newTargetValue=1
Keuken LED SetTarget newTargetValue=1
Strijklicht aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Tafellicht achter SetLoadLevelTarget newLoadlevelTarget=100
Vijverlicht SetLoadLevelTarget newLoadlevelTarget=100
Licht voorkant huis SetTarget newTargetValue=1
Aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Boekenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Servieskast licht SetLoadLevelTarget newLoadlevelTarget=100
Eetkamer SetLoadLevelTarget newLoadlevelTarget=100
Gang SetTarget newTargetValue=1
Hal SetLoadLevelTarget newLoadlevelTarget=100
Kamer hoofdlicht SetTarget newTargetValue=1
Laetitia SetLoadLevelTarget newLoadlevelTarget=100
Lamp tiffany SetLoadLevelTarget newLoadlevelTarget=100
Schilderij spot SetLoadLevelTarget newLoadlevelTarget=100
Keuken SetLoadLevelTarget newLoadlevelTarget=100
Keukenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Schuur licht SetTarget newTargetValue=1
Actions for Condition: SensorFront
Immediate
Device Action Arguments
Schijnwerper voor SetTarget newTargetValue=1
Delay 10:00
Device Action Arguments
Schijnwerper voor SetTarget newTargetValue=0
Actions for Condition: SensorBack
Immediate
Device Action Arguments
Schijnwerper achter SetTarget newTargetValue=1
Delay 10:00
Device Action Arguments
Schijnwerper achter SetTarget newTargetValue=0
Actions for Condition: Autoarm
Immediate
Device Action Arguments
AlarmOn/Off SetTarget newTargetValue=1
Actions for Condition: Warn1
Immediate
Device Action Arguments
AlarmOn/Off SetTarget newTargetValue=0
Actions for Condition: Warn2
Immediate
Device Action Arguments
AlarmOn/Off SetTarget newTargetValue=0
Notifications
Name Description Users Last Sent
Door 1 Open Program Logic Event Generator has satisfied condition: Warn1 Patim 0
Door 2 Open Program Logic Event Generator has satisfied condition: Warn2 Patim 0
The following will be a problem.
(RequestArm;Door1Motion;Door2Motion)
You need to replace this with:
(Door1Motion;RequestArm) AND (Door2Motion;RequestArm)
The first one will only be true when the request is armed … then Door1 has motion … then Door2 has motion!
The second one will be true when you arm after … But if you have subsequent motion … than no motion … it will not re-arm.
patim
October 12, 2013, 11:45am
9
Ok, thanks.
I will change that.
I will test the rest later.
patim
October 12, 2013, 12:16pm
10
Changed some things and it seems to work better now. I changed the state of the Warn1 and Warn2 to switch of the alarm and lights etc.
Does this look better?
How can I take care that Warn 1 and 2 are triggering my pushover account (app push notification) instead of sending through VeraAlert?
======================================
Program Logic Event Generator
Device ID: 802013-10-12 14:12:36.733 PLC Version: 5.1
Triggers
Name Description Last Trigger State
Door1Motion Door sensor 1 armed is tripped 0 false
Door2Motion Door sensor 2 armed is tripped 2013-10-12 14:10:35.031 false
SensorFrontMotion Motion 1 armed is tripped 0 false
SensorBackMotion Motion Sensor 2 armed is tripped 2013-10-12 14:10:35.157 false
RemoteArm Remote: scene number 1 is activated 0 false
RemoteBypass Remote: scene number 2 is activated 0 false
Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
RequestArm Weekly 00:30:00 1,2,3,4,5,6,7 None Weekly 06:00:00 1,2,3,4,5,6,7 None false 0
Device Properties
Name Device Name Device Variable Last Change Value
AlarmOn AlarmOn/Off Status 2013-10-12 14:10:35.303 0
Conditions
Name Expression Last True State
Alarm_On AlarmOn == 1 2013-10-12 14:10:34.920 false
Alarm_Off AlarmOn == 0 2013-10-12 14:10:35.305 true
RemoteArm RemoteArm == 1 0 false
RemoteBypass RemoteBypass == 1 0 false
Door1 Door1Motion == 1 0 false
Door2 Door2Motion == 1 2013-10-12 14:10:35.036 false
SensorFront SensorFrontMotion == 1 0 false
SensorBack SensorBackMotion == 1 2013-10-12 14:10:35.164 false
Autoarm RequestArm and (not Door1Motion) and (not Door2Motion) and (Door1Motion;RequestArm) AND (Door2Motion;RequestArm) 0 false
Warn1 Alarm_On == 1 and Door1Motion and (Alarm_On;Door1Motion) 0 false
Warn2 Alarm_On == 1 and Door2Motion and (Alarm_On;Door2Motion) 2013-10-12 14:10:35.054 false
Actions
Actions for Condition: Alarm_On
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=1
Door sensor 2 SetArmed newArmedValue=1
Motion 1 SetArmed newArmedValue=1
Motion Sensor 2 SetArmed newArmedValue=1
Actions for Condition: Alarm_Off
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=0
Door sensor 2 SetArmed newArmedValue=0
Motion 1 SetArmed newArmedValue=0
Motion Sensor 2 SetArmed newArmedValue=0
Actions for Condition: RemoteArm
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=1
Door sensor 2 SetArmed newArmedValue=1
Motion 1 SetArmed newArmedValue=1
Motion Sensor 2 SetArmed newArmedValue=1
Actions for Condition: RemoteBypass
Immediate
Device Action Arguments
Door sensor 1 SetArmed newArmedValue=0
Door sensor 2 SetArmed newArmedValue=0
Motion 1 SetArmed newArmedValue=0
Motion Sensor 2 SetArmed newArmedValue=0
Actions for Condition: Door1
Immediate
Device Action Arguments
Keuken LED SetTarget newTargetValue=1
Schijnwerper achter SetTarget newTargetValue=1
Schijnwerper voor SetTarget newTargetValue=1
Siren And Strobe SetTarget newTargetValue=1
Strijklicht aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Tafellicht achter SetLoadLevelTarget newLoadlevelTarget=100
Vijverlicht SetLoadLevelTarget newLoadlevelTarget=100
Licht voorkant huis SetTarget newTargetValue=1
Aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Boekenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Servieskast licht SetLoadLevelTarget newLoadlevelTarget=100
Eetkamer SetLoadLevelTarget newLoadlevelTarget=100
Gang SetTarget newTargetValue=1
Hal SetLoadLevelTarget newLoadlevelTarget=100
Kamer hoofdlicht SetTarget newTargetValue=1
Laetitia SetLoadLevelTarget newLoadlevelTarget=100
Lamp tiffany SetLoadLevelTarget newLoadlevelTarget=100
Schilderij spot SetLoadLevelTarget newLoadlevelTarget=100
Keuken SetLoadLevelTarget newLoadlevelTarget=100
Keukenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Schuur licht SetTarget newTargetValue=1
Actions for Condition: Door2
Immediate
Device Action Arguments
Schijnwerper achter SetTarget newTargetValue=1
Schijnwerper voor SetTarget newTargetValue=1
Siren And Strobe SetTarget newTargetValue=1
Keuken LED SetTarget newTargetValue=1
Strijklicht aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Tafellicht achter SetLoadLevelTarget newLoadlevelTarget=100
Vijverlicht SetLoadLevelTarget newLoadlevelTarget=100
Licht voorkant huis SetTarget newTargetValue=1
Aanbouw SetLoadLevelTarget newLoadlevelTarget=100
Boekenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Servieskast licht SetLoadLevelTarget newLoadlevelTarget=100
Eetkamer SetLoadLevelTarget newLoadlevelTarget=100
Gang SetTarget newTargetValue=1
Hal SetLoadLevelTarget newLoadlevelTarget=100
Kamer hoofdlicht SetTarget newTargetValue=1
Laetitia SetLoadLevelTarget newLoadlevelTarget=100
Lamp tiffany SetLoadLevelTarget newLoadlevelTarget=100
Schilderij spot SetLoadLevelTarget newLoadlevelTarget=100
Keuken SetLoadLevelTarget newLoadlevelTarget=100
Keukenkast licht SetLoadLevelTarget newLoadlevelTarget=100
Schuur licht SetTarget newTargetValue=1
Actions for Condition: SensorFront
Immediate
Device Action Arguments
Schijnwerper voor SetTarget newTargetValue=1
Delay 10:00
Device Action Arguments
Schijnwerper voor SetTarget newTargetValue=0
Actions for Condition: SensorBack
Immediate
Device Action Arguments
Schijnwerper achter SetTarget newTargetValue=1
Delay 10:00
Device Action Arguments
Schijnwerper achter SetTarget newTargetValue=0
Actions for Condition: Autoarm
Immediate
Device Action Arguments
AlarmOn/Off SetTarget newTargetValue=1
Actions for Condition: Warn1
Immediate
Device Action Arguments
AlarmOn/Off SetTarget newTargetValue=0
Door sensor 1 SetArmed newArmedValue=0
Door sensor 2 SetArmed newArmedValue=0
Motion 1 SetArmed newArmedValue=0
Motion Sensor 2 SetArmed newArmedValue=0
Schijnwerper achter SetTarget newTargetValue=0
Schijnwerper voor SetTarget newTargetValue=0
Siren And Strobe SetTarget newTargetValue=0
Strijklicht aanbouw SetLoadLevelTarget newLoadlevelTarget=0
Tafellicht achter SetLoadLevelTarget newLoadlevelTarget=0
Vijverlicht SetLoadLevelTarget newLoadlevelTarget=0
Licht voorkant huis SetTarget newTargetValue=0
Aanbouw SetLoadLevelTarget newLoadlevelTarget=30
Boekenkast licht SetLoadLevelTarget newLoadlevelTarget=30
Servieskast licht SetLoadLevelTarget newLoadlevelTarget=30
Eetkamer SetLoadLevelTarget newLoadlevelTarget=40
Gang SetTarget newTargetValue=0
Hal SetLoadLevelTarget newLoadlevelTarget=40
Kamer hoofdlicht SetTarget newTargetValue=0
Laetitia SetLoadLevelTarget newLoadlevelTarget=30
Lamp tiffany SetLoadLevelTarget newLoadlevelTarget=30
Schilderij spot SetLoadLevelTarget newLoadlevelTarget=30
Keuken SetLoadLevelTarget newLoadlevelTarget=0
Keukenkast licht SetLoadLevelTarget newLoadlevelTarget=0
Schuur licht SetTarget newTargetValue=0
Actions for Condition: Warn2
Immediate
Device Action Arguments
AlarmOn/Off SetTarget newTargetValue=0
Door sensor 1 SetArmed newArmedValue=0
Door sensor 2 SetArmed newArmedValue=0
Motion 1 SetArmed newArmedValue=0
Motion Sensor 2 SetArmed newArmedValue=0
Schijnwerper achter SetTarget newTargetValue=0
Schijnwerper voor SetTarget newTargetValue=0
Siren And Strobe SetTarget newTargetValue=0
Strijklicht aanbouw SetLoadLevelTarget newLoadlevelTarget=0
Tafellicht achter SetLoadLevelTarget newLoadlevelTarget=0
Vijverlicht SetLoadLevelTarget newLoadlevelTarget=0
Licht voorkant huis SetTarget newTargetValue=0
Boekenkast licht SetLoadLevelTarget newLoadlevelTarget=30
Aanbouw SetLoadLevelTarget newLoadlevelTarget=30
Servieskast licht SetLoadLevelTarget newLoadlevelTarget=30
Eetkamer SetLoadLevelTarget newLoadlevelTarget=40
Gang SetTarget newTargetValue=0
Hal SetLoadLevelTarget newLoadlevelTarget=40
Kamer hoofdlicht SetTarget newTargetValue=0
Laetitia SetLoadLevelTarget newLoadlevelTarget=30
Lamp tiffany SetLoadLevelTarget newLoadlevelTarget=30
Schilderij spot SetLoadLevelTarget newLoadlevelTarget=30
Keuken SetLoadLevelTarget newLoadlevelTarget=0
Keukenkast licht SetLoadLevelTarget newLoadlevelTarget=0
Schuur licht SetTarget newTargetValue=0
Notifications
Name Description Users Last Sent
Door 1 Open Program Logic Event Generator has satisfied condition: Warn1 Patim 0
Door 2 Open Program Logic Event Generator has satisfied condition: Warn2 Patim 2013-10-12 14:10:35.054
patim
October 13, 2013, 10:05am
11
based on what I did ysterday.
The RequestArm triggered the AlarmOn/Off at exactly 00:30 hours. However it didn’t bypass it this morning at 06:00???
I think that the AutoArm condition is wrong for that, but I can’t find the problem.
Help would be appreciated.
You did not code up an AutoDisarm …
Maybe you want:
AutoDisarm Not RequestArm
patim
October 13, 2013, 10:22am
13
I thought it should be something like that, but as RequestArm is a schedule I imagined that the off state will come in automatically as with the schedules in Vera.
Off topic: how is it going with the integration vera alerts with push notification? Mine I can’t get to work.
patim
October 13, 2013, 10:56am
14
Sorry, Not RequestArm stays True all the time ???
patim
October 13, 2013, 11:54am
15
Made a workaround, by setting a RequestDisarm as schedule.
Schedules
Name Type Time Days Random On Delay Off After Type Off Time Off Days Random Off Delay State Last Schedule
RequestArm Weekly 00:30:00 1,2,3,4,5,6,7 None None None false 2013-10-13 13:47:00.100
RequestDisarm Weekly 06:00:00 1,2,3,4,5,6,7 None None None false 2013-10-13 13:49:00.100