Arming HSM from Alexa

We have an Alexa routine called Good Night, and would like to set HSM to Arm-Home from this routine. The only way I could think of to do this is to add a virtual momentary switch that Alexa will turn on. But in HSM, I don't see an option to arm from a switch. There is an option to cancel alerts by turning on a switch. Would it be possible to add a switch option to arm as well?

I see I can set HSM to Arm-Home from Rule Machine so will do it that way for now, but would like to keep all the arming/disarming functionality in HSM if possible.

That's how you do it. Are you concerned the rule won't work when expected? I've been using a similar method with IFTTT and it's very reliable.

Not worried about the arming working...just would like to keep all the arming logic in one place.

I did what it seems like you're trying to do by creating a virtual switch called "Bedtime". I then used Rule Machine and set that switch as a trigger. When Alexa "turns on" Bedtime it runs everything I setup in Rule Machine (certain lights and fans off, certain lights and fans on, etc) including arming HSM and my AT&T Digital Life alarm.

@cstory777 I tried doing this, but I can't get HE to react to the virtual switch at all. It shows up in Alexa but when turn it on either from voice or the alexa app, nothing happens. Nothing comes up in the logs either.

Am I doing something wrong with RM?

You need to change your trigger's capability from 'physical switch' to just 'switch'.

@bjcowles yeah, pretty simple, I'm an idiot, thanks.

I have been looking around and have one additional question...

I've gotten the "bedtime" switch and RM to fire like @cstory777 mentioned above. Now, to disarm the HSM from Alexa, am I right in understanding that I can't just turn "bedtime" virtual switch off, I need to create a separate virtual switch to change the HSM to disarm the alarm part. Is that right?

Thanks again!

1 Like

Sure you can. Change your RM4 rule to trigger on "bedtime virtual switch changed" and then handle the logic for on/off in actions.

2 Likes

Ok, so I have been playing around with this and noticing some issues. I would love feedback on how I'm thinking about this...

Background:

  • I created a virtual switch called "bedtime" so that I can tell Alexa, "turn on Bedtime"
  • I tried handling this through RM... when bedtime switch turns on, turn off XYZ lights, and set HSM to armed Away (my alarm). I ran into a problem with this, as the virtual switch then stays on, which means lights can't be turned on. I'm sure there's a way to get it to turn off automatically, but I couldn't figure it out.
  • Also, I want my wife to have the ability to arm/disarm the alarm via Alexa as well. So, instead of the above, here's what I did...
  • I created another VS called "The Alarm" - then through RM I made two rules: Turn the VS on, sets the HSM to Armed Away; 2. Turning it off, disarms HSM.

Now, my assumption is that I can just fire the VS "The Alarm" switch via RM for "bedtime".

So,

  1. Does this make sense or am I thinking about it all wrong?
  2. How do I get the "Bedtime" VS to turn off after it runs through the RM that it triggered?

There should be an option to auto turn off your virtual switch in the device settings page. You can specify how many seconds to wait before it automatically turns off.

I saw that, though I probably made a bad assumption... In the "bedtime" RM if I put a delay on the actions, say delay turning the lights off for 3 minutes. Will every thing still work if the max auto shutoff time for the switch is 5 seconds?

If your trigger for the rule is the virtual switch turning on, then the switch auto turning off will not be a problem and your delayed actions will still run after your specified delay.

1 Like

I think you're going about it all wrong. The easiest way to do this is to have Alexa turn on the virtual switch and then have it turn off automatically (in the device settings). I do it with modes, but the execution is the same. Also, you can customize the phrase that you speak to Alexa in Routines. My wife and I switch between "time for bed", "bedtime" and "lights out". They all do the same thing. Further, why set your HSM manually? Setup geofencing through the Alexa app and when your's or your wife's phones leave, Alexa can automatically flip the alarm switch.

Lastly, instead of two rules, combine it into one rule and have it trigger on "The Alarm changed". Then you can handle the logic for both on and off in the actions portion of the rule.

Honestly... we have an 18-month old, so false alarms are the enemy. Plus the nanny, the cleaning lady, etc...

That makes sense.