Activate siren if switch/light left on for X minutes


(Phil) #1

So the big hurdle for me switching to SmartThings Smart Home Monitor for my home security system is the lack of a warning beep or grace period before full on activating the siren when someone enters the home. I thought one way around this would be to tell SmartThings to turn on a light or switch for X minutes if the security system is tripped (ideally a zwave plug that didn’t actually connect to anything). If you disarm the alarm, the switch turns off and there’s no problem. But if the switch stays on for 1 or 2 minutes, then a separate smartapp sees that and activates the siren. It’s a poor man’s way around this limitation (how they haven’t addressed this by now is beyond me, but whatever).

Anyhow, what are your thoughts? Does this seem like a reasonable workaround, or do you have a better workaround that my Google-fu failed to reveal? I know there’s another smartapp alarm (Smart Alarm, I think) that allows for this functionality, but I really like the integration with my D-Link and Samsung cameras by using SmartThings smart home monitor setup.


(Robin) #2

Here is how I set a delay:

If you are not familiar with CoRE you can get installation instructions here (post 1):


(Phil) #3

Love how customizable CoRE is. I recreated your piston with a few modifications, but my problem now is that the IF statement doesn’t seem to be working. When I open one of my doors, my open/closed sensor properly changes to OPEN, yet it doesn’t change my IF statement to TRUE in CoRE. I have it selected as ANY sensor for my 2 sensors, and have tried both “OPEN” and “open” in the value field. Not sure what else to try for that. These are Z-wave door/window sensors from Monoprice. They seem to be working fine. When I check the SmartThings IDE, it’s showing value as “open” or “closed”, so I’m not sure what’s keeping it from working.

I’m only troubleshooting the IF portion, by looking at the piston setup while it gives the current state of false or true. I’m assuming my THEN statements are OK, but I’m not positive (I changed them from yours a bit). I made my first THEN statement wait 30 seconds, then check if SHM is still armed, and if it is, proceed with activating the siren.

Any ideas?

Edit: I guess with the restriction of only running when SHM is armed, I probably don’t need the piston to check if it’s still armed after the 30 second wait, as it should stop whole thing if SHM is disarmed, right?


(Robin) #4

If you’re monitoring the true / false statements within CoRE itself whilst opening / closing the doors, that won’t work.

CoRE sets the statement when you first add / alter a condition, but then it only updates the view when you exit (by clicking done) and go back in.

It won’t show real time updates in the CoRE app itself.

Write a simple test piston:

IF
Door Contact changes to open
THEN
turn on light

Click done to exit CoRE and THEN test

I’m interested in how you setup the second IF check… May also be a cause of issues.

Can you post a screenshot of you piston.

You can view (and screenshot) a more compact layout of the piston by clicking on ‘CoRE Dashboard’ at the top of the CoRE main page.

Dashboard also gives you realtime updates and countdowns, showing exactly what each piston is doing… Helps a lot with de-bugging!

You need to enable oAuth in the IDE for the dashboard view to work… Let me know if you’re not sure how to do this.


(Robin) #5

Correct, also turn on this switch at the bottom of the restrictions section:

This will prevent already scheduled tasks from firing after the ‘wait’.


(Phil) #6

I had the IF condition set for Sensor instead of Contact Sensor. Wouldn’t have thought it would make a difference like that, but once I switched that around it worked. Here’s my new setup:

I did have to add another piston to turn off the siren if SHM is changed to Disarmed, because my alarm delay piston didn’t seem to turn off after I disarmed SHM (it did prevent it from turning on if I disarmed SHM though). Even if it’s redundant, I’d still rather make sure the siren turns off if we have a friend/family member stopping in to do something rather than it go off for 5 minutes and me have to try to explain over the phone how to turn it off manually. With that though, everything is working great! Now this means I have to actually get around to installing my Nexus 7 as an ST controller on the wall, which requires me to redo my frame so it’s actually square, heh.

Right now, I have all the lights still turned on and notification sent via SHM when it’s first triggered. If when I switch to using ST for my alarm, I get annoyed with too many notifications for false alarms, I can always change CoRE to turn on the lights and send notification after the delay instead. Right now it shouldn’t go off very often since mine and my wife’s presence sensors (phones) should disarm the system when we get home to keep it from being triggered in the first place. It should only go off if a friend enters and has to disarm at the tablet or if an actual intruder comes in.

Thank you for your help!


(Robin) #7

Good news… Well done!!

Unless you want the video recording feature (which only works for a very limited range of cameras anyway) I suggest you just use SHM as an empty shell (for setting alarm state only) and let CoRE do all the backend work sending notifications etc. Basically leave all the SHM actions blank.

To stop SHM triggering all the time (it won’t send notifications anymore but still goes red), go into the SHM security settings and remove all but one of the sensors (you have to leave at least one sensor otherwise SHM arm / disarm buttons dissapear). Pick a sensor that never gets tripped by accident, like an upstairs window (or even a virtual contact sensor if you don’t mind cluttering up your ‘things’ list).


(Robin) #8

Bonus fact… if you enable ‘expert mode’ in CoRE you can combine loads of separate pistons into one.

In expert mode it lets you set ‘if true’ and ‘if false’ actions against every trigger individually!

For example, I have a great little button device with 8 buttons, each can be pressed once, twice or held, so it effectively has 24 buttons.

Using core I have programmed all 24 button actions into one piston:

Here is a screenshot of the first 5-6 buttons taken from a very very long piston:

What you can’t do in this scenario is mix conditions and triggers (black dots and hollow dots).

You also don’t get the ‘prevent already scheduled tasks from executing’ toggle when setting individual restrictions, so your silence alarm piston will need to remain separate (to avoid clashing with the sound alarm delay).


(Robin) #9

Oh… And I went for the simple tablet mounts…

Handy to take tablet off wall and use it normally sometimes (One day I’ll pull the USB through the wall cavity… So many jobs!!)


(Phil) #10

All my tech needs to meet a minimum WAF (wife acceptance factor) if it’s installed in a visible location, hence the frame. :grinning: I want to get the opening for the screen into proper square, instead of its current “rustic” square, as I prefer to think of it.

It was pretty easy to build. But I figure I might as well redo it since while I’m at it, I can put a backing on it to make it easier to mount. Hard to beat the simplicity and ease of the mount you have though. If I had that, I might have mounted the stinking thing a year ago like I had planned! My excuse for not doing it was the lack of a delay for the alarm, but now that excuse is no longer valid.

Like you said, so many jobs!