SHM *really* needs some delay settings, no?

(James) #1

I’m sure I’m not the only one trying to arm/disarm SHM through presence or some other automated trigger. The problem I run into (generally trying it disarm based on presence or another trigger) is that it literally becomes a race for wether ST actually disarms before triggering the alarm to go off. Often my disarm trigger is definitely logged first, but still the alarm goes off. And it’s LOUD. :confused:

It seems like some basic configurable delay for arm and alarm would really help smooth out usability, no? Or am I just cursed… :slight_smile:

(Ray) #2

Trust me. We have been begging ST for this option since the birth of SHM. Only alarm system I can think off without delay. Maybe they like false alarm :smile:

(Bernie H) #3

Smart Alarm has delays plus keypad support. And it works great. I had way to many issues with SHM and nne with SA


My solution to this was a man in the middle virtual alarm with a smart app running that relays its state based on a configurable delay. I have this virtual “Alarm Relay” device tied to SHM, which will receive the appropriate alarms, the smartapp watches for state changes and forwards them on to the actual hardware after some preset time.

The smartapp will instantly relay the “off” command so you’re not stuck with the alarm sounding if you disarm SHM. Additionally, there is a configurable setting to ignore the delay (and instantly sound) during specific modes.

Code for the smartapp is below. If you are trying to install it and have any issues/questions let me know.

 *  Alarm Relay
 *  Copyright 2016 SneakingBuffalo
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
    name: "Alarm Relay",
    namespace: "SneakBuff",
    author: "SneakingBuffalo",
    description: "This smartapp will relay the conditions of one alarm to another with a specified time delay in between.",
    category: "Safety & Security",
    iconUrl: "",
    iconX2Url: "",
    iconX3Url: "")

preferences {
	section("Preferences") {
    		input "parentAlarm", "capability.alarm", title: "Parent Alarm", multiple: false, required: true
		input "relayAlarm", "capability.alarm", title: "Relay Alarm", multiple: false, required: true
        	input "delayTime", "number", title: "Delay Seconds", description: "", required: true
        	input "modes", "mode", title: "Ignore Delay in mode(s)", multiple: true, required: false

def installed() {
	log.debug "Installed with settings: ${settings}"

def updated() {
	log.debug "Updated with settings: ${settings}"

def initialize() {
	state.delay = (delayTime != null && delayTime != "") ? delayTime : 5

	subscribe(parentAlarm, "alarm", "alarmHandler")

def alarmHandler(evt) {
	if(evt.value == "siren" || evt.value == "both" || evt.value == "strobe")
    	// If we're in an ignore mode, relay immediately
    	if(modes?.find{it == location.mode})
        	log.debug "Relay running now due to ignore delay mode: ${location.mode}"
        // Otherwise, schedule for later
            log.debug "Relay Scheduled in ${state.delay} seconds"
            runIn(state.delay, relayHandler)
    }else if(evt.value == "off"){
    	log.debug "Relaying Off Immediately"

def relayHandler() {
	def curState = parentAlarm.currentValue("alarm")
	if(curState != "off")
        if(curState == "strobe")
        	log.debug "Relaying Strobe"
        }else if(curState == "siren"){
        	log.debug "Relaying Siren"
        }else if(curState == "both"){
        	log.debug "Relaying Both"


Yes, it does

(James) #6

Very nice, I’ll definitely check this out this weekend. Thanks!