Delay SHM from using Motion Detectors when Armed(Away)

I have my lock integration set to automatically run my “Goodbye” routine when I lock the door. The Goodbye routine switches Smarthings Home Monitor to “Armed(Away)” which would trip if the motion detectors go off. Occasionally, as I leave, I guess my motion detector closer to the door still reads “motion” as I exit so when I lock the door, and Goodbye Runs, setting SMH to Armed(Away), the motion detector reading active trips SMH into thinking there is a problem (and then all my lights turn on and I get texts, etc.).

I wish there was a way to delay reading motion detectors for a configurable or even a hard set amount of time before they are allowed to trip SMH when it is turned on, like your normal home alarms.

Please send this request to Support@SmartThings.com

@vlad has helpfully reminded the Community that contacting Support is the best way for SmartThings to measure interest in a feature request and allocate resources.

… even though this is the most common feature request in the Community, it needs to get directly sent to Support.

https://community.smartthings.com/search?q=Shm%20delay

2 Likes

One possible method:

  1. Setup a dummy goodbye routine let’s call it goodbye-delay, that does nothing.
  2. execute goodbye-delay when locking the door instead of goodbye
  3. Setup a Smartapp or perhaps webcore logic to [monitor when goodbye-delay is executed](http://docs.smartthings.com/en/latest/smartapp-developers-guide/routines.html?highlight=hello%20home)
  4. execute the real goodbye routine in nn seconds, where nn is a number of your choice
3 Likes

After posting the “One Possible Method” solution, I thought this may be useful in my SHM Delay app, so I created a demo app SHM Delay TrueExit to try it out, and it works for me. If you try it, please let me know if it works for you.

Quick Setup Guide

  1. In the Phone App Automation->Routines: create a new dummy routine with no mode, no alarmstate, no actions, name it: Goodbye-Delay (or whatever you want)
  2. In IDE SmartApps: Install routine SHM Delay TrueExit from repo or code
  3. Set Routine to monitor for execution to: Goodbye-Delay (or your name)
  4. Set number of seconds to delay: 10-120
  5. Set “Then execute this routine” to: Goodbye! or whatever routine you use
  6. In whatever you are using to currently execute “Goodbye” change it to “Goodbye-Delay”
  7. Test your system

Installation

There is one module associated with the app:

  1. SHM Delay TrueExit.
    To install via the repository, add the following to the IDE Settings (or copy code below)
    Owner: arnbme (in upper case that is ARNBME)
    Name: SmartThingsPublic
    Branch: Master
  2. Click ‘Save’, then in ‘My Smart Apps’ click 'Update from repo",
  3. select the ARNBNE SmartThingsPublic repository then install and publish SHM Delay TrueExit
  4. in the Phone App tap on add a Smartapp, install SHM Delay TrueExit and set paramaters
4 Likes

Maybe I am wrong. However, in my SmartAp Automation “Leave Home”, I select Everyone Leaves. and get the below screen. Does this do what you are discussing?

Awesome!!! I will give it a try.

I did contact support about making that a feature request for this delay and they added it to their feature requests.

It’s easy to do this if you think of it the other way around – – rather than trying to delay the motion sensors, just delay arming of smart home monitor.

You can set this up as a daisy chain using the official features.

  1. Lock the door. Have this trigger the goodbye routine.

  2. instead of having the goodbye routine change the smart home monitor armed status, just have it turn on a virtual switch which will act as a countdown timer.

  3. using the official smart lighting feature and power allowance, have the virtual switch turn itself off after one minute. (You can’t set these for less than one minute using the official smartlighting feature. If you really wanted it just to be seconds then you would do the whole thing in webcore instead.)

  4. have another routine which starts when that virtual switch is turned off. Have that routine change the smart home monitor armed status

And there you have it: a one minute delay after you lock the door until smart home monitor is activated. :sunglasses:

You can see the details on how to do this in the “how to create a virtual timer for a light” article in the community – created wiki. The difference is that article is about turning the light off, and you instead are going to have a routine automatically run, but the timer procedures are very similar.

http://thingsthataresmart.wiki/index.php?title=How_to_create_a_virtual_timer_for_a_light

There are many other ways to do this. Web core, obviously, or the smart app already mentioned in this thread.

I did just want to point out that if you think of it as a delay in arming smart home monitor rather than anything to do with the sensors themselves it’s pretty easy to set up. :stopwatch:

As to why the official smart home monitor doesn’t include an exit delay feature, I have no idea. I asked that question on the first day it was released. But since it doesn’t, you have to choose one of the workarounds.

2 Likes

I think that is delaying the app to start 10 minutes after the presence sensor shows out of the area. The front door app I am using triggers the Goodbye routine as soon as I hit the lock, and that is where I am getting that problem because of the motion sensor.

The delay app @arnb created (and THANK YOU!!!) looks for when a routine is called, then waits a programmable amount of seconds, then triggers a different routine. I set my lock app to trigger a dummy routine that does nothing and after 30 seconds, the app @arnb created changes it to the actual Goodbye routine.

2 Likes

Action delay time works well, but it is only available if you are using a presence option. In this particular thread, the OP is basing everything off of the lock being locked. So “action delay time” is not an available parameter for that. It’s also not available if you’re just using a switch.

I suppose you could have locking the door turn on a virtual presence sensor but at that point you’re using the same kind of chain as I described, just with a different set of devices.

So you’re right that option exists, but it only exists for Geopresence.

1 Like

My app is now released and fully documented at SHM Delay TrueExit.

The app is fully compatible with, and may be used with the SHM Delay app.

1 Like

Any thoughts on an entry delay for the motion sensors as well? I have a wired motion sensor directed at the front door that would be difficult to move. For my kids, or in case I or my wife forget our phones, I have a tablet mounted on the wall as an alarm pad, but the motion sensor will also catch movement towards the tablet on entry or exit. Your delay trueExit app will help with an exit delay, so we can turn on the alarm from the tablet and leave the house, but when we come home, the door will delay, but the motion sensor will trigger the alarm.

1 Like

I understand your issue and what you want to do. In many alarm systems when a delayed sensor, such as an entry door is tripped in away mode, other normally non delayed sensors also are delayed. I don’t want to confuse the people who left out simple entry and exit delays from SmartHome, but this would be high on my list of things to include in the next SH version.

Until then here are some suggestions.

  1. Do not monitor the sensor in Smarthome
  2. Disconnect the sensor
  3. Use WebCore or a Smartapp to delay the motion sensor.

Just a thought, but it may be possible to do this with SmartHome as an option in SHM Delay app. It’s actually quite simple, but radical in how it would work and slow Cloud processing may be a fatal flaw.

I feel @journey may use this, anyone else feel this would be worthwhile?

  1. SmartHome is armed, a SHM Delay app monitored door opens, and entry delay time is active
  2. Turn off SmartHome. The fatal flaw may be here, if another sensor triggers before alarm can be turned off by ST/SHM
  3. In user defined entry delay time: If alarm status unchanged by user (note user setting system off again is a status change)
    trigger intrusion

I’m not a programmer, so this may be a dumb question… But I’m assuming it’s not possible to set up a virtual sensor for the motion sensors in the same way you do it for the contact sensors?

Btw, thanks for being so responsive. I’m new to ST, but I really love the community.

There no dumb questions, just dumb answers.

Yes you can set up a differant simulated virtual sensor or use an existing virtual sensor that is already monitored by SHM.

Thank you for your positive feed back, very much appreciated!

BTW Would you be available to beta test my idea for a full true entry delay should it get to that point?

Absolutely, I will beta test! Thanks for all your help.

1 Like

Feel free to try it, now available as an alpha module. Currently it always runs in True Entry Delay mode but will be an option when it goes live.

  1. When monitored door opens in Alarm State Away or Stay not using the instant true night option, the alarm state is set to Off
  2. Does nothing for user defined entry delay seconds giving time to turn off alarm (for real) by any method desired.
  3. When Alarm state remains unchanged (user did not set off again or did not rearm): Alarm System is rearmed to Away and intrusion set by opening simulated contact sensor.

As I said the fatal flaw may your motion sensor kicking in exactly at the same time the door opens. Kindly post your testing results.

The code is in Github Repo ARNBME SHMDelay trueentrydelay or at this link
https://github.com/arnbme/SHMDelay/tree/trueentrydelay/smartapps/arnbme/shm-delay-child.src

Install module SHM Delay Child, do not publish. other modules are unchanged
Should you want to revert, reinstall SHM Delay Child from ARNBME SHMDelay master

Thanks for the update. I’m out of town for the day, but will test when I get back in and let you know how it works.

I’ve updated to the alpha. I’ll let you know how it works after I get home tonight and try it out.

Also, I was curious about whether I can add other actions to the goodbye delay dummy routine or does that cause problems with the smh true delay routine?

Should be OK as long as the Alarm State and Mode are empty (null).