Author Topic: Warn if doors / windows are open when arming (Night or away)  (Read 1765 times)

Offline oscar

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Warn if doors / windows are open when arming (Night or away)
« on: September 13, 2015, 02:34:25 pm »
Hi!

Currently I have a tasker profile (on android) that checks if any doors or windows are open when arming the house, if so I get a warning message.

Could the same functionality be done using veras scenes?

/Oscar

Offline hellovn

  • Full Member
  • ***
  • Posts: 217
  • Karma: +19/-46
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #1 on: September 13, 2015, 03:10:08 pm »
you can use the scene option "run in mode (night/away)" when the door is open.

Offline mvzut

  • Sr. Newbie
  • *
  • Posts: 32
  • Karma: +1/-4
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #2 on: September 15, 2015, 05:42:53 am »
You can set the alarm mode in a scene using luup commands, e.g.
Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","SetHouseMode", {Mode = 3}, 0)
sets it to "Away". You could use this command as part of a conditional statement  (if...then) in the lua script part of your scene. As condition you can use the "tripped" state of your doors, which you can check using
Code: [Select]
luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","Tripped",11)
where 11 is the device number, to be replaced with your own number. Best is to repeat this for al your doors, and put the tripped states into local variables:

Code: [Select]
local door1 = luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","Tripped",11)
local door2 = ...

You can then use if/and statements to set the alarm as follows:

Code: [Select]
if (door1 == "0") and (door2 == "0") then
   luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","SetHouseMode", {Mode = 3}, 0)
end

This is how I did it, hope it helps!
« Last Edit: September 15, 2015, 11:23:30 am by mvzut »
Vera Edge - 5 x Zwave module (switch/door/water/siren) - RFXtrx interface - ~30 KAKU modules (switch/PIR/smoke) - Netatmo - 6 x Philips Hue - P1 Smart Meter - Opentherm Gateway - Logitech Harmony Hub - 2 x Foscam R2 - 2 x Hikvision DS-2CD2132F-I - Imperihome

Offline tomhe

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #3 on: October 21, 2016, 12:29:22 am »
Currently I have a tasker profile (on android) that checks if any doors or windows are open when arming the house, if so I get a warning message.

Could the same functionality be done using veras scenes?

I would expect Vera to warn me when arming the system if any sensor is tripped. I mean, what's the point of switching to away mode if a sensor is tripped? It will set of the alarm right away.

How come this is not how Vera works?

Offline Jamr

  • Hero Member
  • *****
  • Posts: 586
  • Karma: +17/-8
    • 007 Systems
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #4 on: October 22, 2016, 03:09:02 pm »
Currently I have a tasker profile (on android) that checks if any doors or windows are open when arming the house, if so I get a warning message.

Could the same functionality be done using veras scenes?

I would expect Vera to warn me when arming the system if any sensor is tripped. I mean, what's the point of switching to away mode if a sensor is tripped? It will set of the alarm right away.

How come this is not how Vera works?

I use Imperihome to arm my alarm. It instantly shows if any of the zones I have previously selected are open with a red lock icon. A green lock icon is shown when all zones are closed.
If I click on the icon it brings up a list of the zones and show which ones are open and the last time and date they were opened.
It is very handy.

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9720
  • Karma: +737/-136
    • RTS Services Plugins
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #5 on: October 22, 2016, 04:02:21 pm »
When my Garage Door closes (I always leave through the garage)  it warns me if either of my partitions are not READY ... meaning they can't be armed.
They are actually armed by me leaving the Geo-Fence zone.

I am typically still in the driveway when the door closes ... so I do not have to far to turn around.
I use H@l to ask the active status ... which informs me of zones that are not in a ready state.
Or I can decide to leave knowing the alarm is not on.


Offline tomhe

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #6 on: October 22, 2016, 06:22:45 pm »
Quote
I use Imperihome to arm my alarm.

Thanks, will try that app.

Offline homeuser

  • Jr. Member
  • **
  • Posts: 61
  • Karma: +2/-0
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #7 on: October 25, 2016, 10:44:06 pm »

Quote

I use Imperihome to arm my alarm. It instantly shows if any of the zones I have previously selected are open with a red lock icon. A green lock icon is shown when all zones are closed.
If I click on the icon it brings up a list of the zones and show which ones are open and the last time and date they were opened.
It is very handy.

Good idea. I've been using Imperihome for a while and wish I would have thought of that.

Offline bucko

  • Hero Member
  • *****
  • Posts: 586
  • Karma: +26/-6
    • Travel and Living in China
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #8 on: October 26, 2016, 07:16:09 pm »
Currently I have a tasker profile (on android) that checks if any doors or windows are open when arming the house, if so I get a warning message.

Could the same functionality be done using veras scenes?

I would expect Vera to warn me when arming the system if any sensor is tripped. I mean, what's the point of switching to away mode if a sensor is tripped? It will set of the alarm right away.

How come this is not how Vera works?

I use Imperihome to arm my alarm. It instantly shows if any of the zones I have previously selected are open with a red lock icon. A green lock icon is shown when all zones are closed.
If I click on the icon it brings up a list of the zones and show which ones are open and the last time and date they were opened.
It is very handy.

How did you set up Imperihome to show violated zones before arming? I also use Imperihome and it will show not ready. Then I have to go to mt other page to see which zones are violated. However even with it not ready I can still arm my system if I do nothing. I must automatically bypass violated zones.

I would like it to show these zones first like you explain if I go to arm. Can you explain more?
Vera 3, 40+ Fibaro relays & dimmers, IPUX cams, Elk M1 Gold, M1XEP, M1SP, XVOR, M1RB, Elk124, Monoprice HDMI matrix & 6 zone amp, Denon AVR, Panasonic A8000, BI DV,On Controls

Offline Jamr

  • Hero Member
  • *****
  • Posts: 586
  • Karma: +17/-8
    • 007 Systems
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #9 on: October 26, 2016, 11:35:37 pm »
Currently I have a tasker profile (on android) that checks if any doors or windows are open when arming the house, if so I get a warning message.

Could the same functionality be done using veras scenes?

I would expect Vera to warn me when arming the system if any sensor is tripped. I mean, what's the point of switching to away mode if a sensor is tripped? It will set of the alarm right away.

How come this is not how Vera works?

I use Imperihome to arm my alarm. It instantly shows if any of the zones I have previously selected are open with a red lock icon. A green lock icon is shown when all zones are closed.
If I click on the icon it brings up a list of the zones and show which ones are open and the last time and date they were opened.
It is very handy.

How did you set up Imperihome to show violated zones before arming? I also use Imperihome and it will show not ready. Then I have to go to mt other page to see which zones are violated. However even with it not ready I can still arm my system if I do nothing. I must automatically bypass violated zones.

I would like it to show these zones first like you explain if I go to arm. Can you explain more?

The security composite widget shows you if any zones are open. Tapping on it shows which zones are open. Just put one next to your Alarm Arm/disarm widget. Then you can instantly see if your alarm system is ready and a tap later, you can see which zone is open and closed.
Here is how;
Create a composite security widget with all of the zones you want next to your alarm arming widget. This new composite will be either red or green. Red (image appears unlocked) if any of the zones are open and green (image appears locked) if they are all closed.
Tap on that new composite icon will bring up the list of zones you have selected. It will also show in red which zone is open and the last time and date the zone was opened.

Your alarm system should not arm if any perimeter zones are violated (open) and not bypassed. This can cause problems obviously.
If you arm in away mode, the zones set up as interior motions will automatically be bypassed.
Are you bypassing your alarm zones from Imperihome?

I believe the OP was asking for a scene to warn them when any of the zones were open while arming their alarm.  This composite widget gives you all of the information on your zones instantly.

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1246
  • Karma: +7/-2
    • Phaze1 Digital
Re: Warn if doors / windows are open when arming (Night or away)
« Reply #10 on: November 03, 2017, 11:03:25 am »
Hi

I am currently in the process of setting this up, I've not completed it yet but here is what I have so far. Also I am not an expert in PLEG so there may well be other better ways of setting this up.

I used a combination of the MultiSwitch (Virtual Switches) plug-in and PLEG.

First I created a button on the MultiSwitch (Button 2) called "Safe to Arm" This will be my virtual switch I will program my Alarm Arming logic around. If the button is ON then its NOT safe to Arm as one or more door or window sensors is tripped / opened. If the button is OFF then it is safe to Arm as all the door and window sensors are not tripped / closed.


In PLEG I created the following:

1. Logic Inputs -> Device Properties

In here I created four new device properties to monitor the status of the door and window sensors for TRIPPED

FrontDoor_TrippedStatus
PatioDoor_TrippedStatus
MasterBedWindow_TrippedStatus
KidsBedWindow_TrippedStatus

See screen shot DeviceProperties-FrontDoor.png for example.

2. Conditions (Automation Logic)

I created two new conditions with repeats

Condition Name: cArmSafe_Tripped   
Options: Repeats   
Logic Expression: FrontDoor_TrippedStatus==1 or PatioDoor_TrippedStatus==1 or MasterBedWindow_TrippedStatus==1 or KidsBedWindow_TrippedStatus==1

If any of the door or window sensors are tripped then the condition cArmSafe_Tripped = TRUE

Condition Name: cArmSafe_NotTripped   
Options: Repeats   
Logic Expression: Frontdoor_TrippedStatus==0 and PatioDoor_TrippedStatus==0 and MasterBedWindow_TrippedStatus==0 and KidsBedWindow_TrippedStatus==0

If all of the door and window sensors are NOT tripped then the condition cArmSafe_NotTripped = TRUE

3. Logic Actions

Then under Logic Actions I created two new actions against the two new conditions I created.

cArmSafe_Tripped - Condition is True with Repeats - Action: Turn on button 2 on the MultiSwitch

cArmSafe_NotTripped   Condition is True with Repeats - Action: Turn off button 2 on the MultiSwitch

See the screen shot called LogicAction-cArmSafe_Tripped.png for an example of the logic action to turn on the multiswitch

Optional if using ImperiHome app

I also added a Read Only / Status Only button in to Imperihome for the MultiSwitch Button 2.

So when the icon is GREEN / LOCKED then its safe to Arm the house as all the door and window sensors are not tripped.

If the icon is RED / UNLOCKED then its NOT safe to Arm the house as one or more door or window sensors are tripped / opened.

See Imperihome screen shots

PLEG or Vera Scene Logic to check the status of the Virtual Switch before arming the house

Now I could never figure out how to setup my Alarm, Arming / Disarming the house logic in PLEG as parts of it seemed broken at the time and I could not figure out timers.

So all my alarm logic is done in Vera scenes. I have scenes I run to change the Vera house modes, HOME / NIGHT / AWAY / VACATION etc

I also have Vera scenes to Arm or Disarm the house and my burglar alarm entry timer is setup using the CountDownTimer plugin.

This is the part I now need to figure out, as I haven't got that far yet.

Basically for my AWAY scene for example which normally just turn on the AWAY mode of Vera. I now need to add extra LUA code to check the status of the Virtual Switch.

A. If Virtual Switch is turned ON then abort setting AWAY mode and give some kind of notification via TTS that a sensor is tripped / open.

B. If the Virtual Switch is turned OFF then carry on setting AWAY mode of Vera, as its safe to arm the sensors etc.

Currently my Away scene only has this LUA code to turn on the AWAY mode in Vera

Code: [Select]
luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1","SetHouseMode", {Mode = 2}, 0)
When Vera switches to AWAY mode, it is this that changes the door and window sensors to ARMED, via the setup in the Vera Dashboard area My Modes etc.

EDIT: I can see one potential problem with this, the front door / exit door. That could be opened whilst we are leaving and pressing the button on the RFID alarm panel to run the Vera Away scene. So I either have to ensure the door is closed whilst running the Away scene or totally exclude the front door from this logic, which might be better for other family members.
« Last Edit: November 03, 2017, 12:53:56 pm by cw-kid »