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.
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
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)
In IDE SmartApps: Install routine SHM Delay TrueExit from repo or code
Set Routine to monitor for execution to: Goodbye-Delay (or your name)
Set number of seconds to delay: 10-120
Set “Then execute this routine” to: Goodbye! or whatever routine you use
In whatever you are using to currently execute “Goodbye” change it to “Goodbye-Delay”
Test your system
There is one module associated with the app:
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)
Click ‘Save’, then in ‘My Smart Apps’ click 'Update from repo",
select the ARNBNE SmartThingsPublic repository then install and publish SHM Delay TrueExit
in the Phone App tap on add a Smartapp, install SHM Delay TrueExit and set paramaters
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.
Lock the door. Have this trigger the goodbye routine.
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.
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.)
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.
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.
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.
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.
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.
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.
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.
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.
Do not monitor the sensor in Smarthome
Disconnect the sensor
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?
SmartHome is armed, a SHM Delay app monitored door opens, and entry delay time is active
Turn off SmartHome. The fatal flaw may be here, if another sensor triggers before alarm can be turned off by ST/SHM
In user defined entry delay time: If alarm status unchanged by user (note user setting system off again is a status change)