Arm/Disarm HSM via "Alexa" - Virtual Switch?

I attempted to set this up from Rule Machine as a Virtual Switch but it isn't working as I intended.. I would like to tell Alexa to "Arm Night" or "Arm Home" which works sometimes but it seems like I have to "turn arm home off" before "turning arm night on" and I am no good with the "if" rule stuff.. Or perhaps I need to set it as something other than an on/off switch? :frowning: help! :slight_smile:

Actually I think I say, "turn arm home on" because it is a "switch". So I think what it is doing right now is requiring me to turn the switch off before turning it to something else.. unsure..

I created a virtual switch, gave it a name, exposed it to Alexa via Alex Skillz.
I then;

  1. Set a routine on Alexa to turn this switch on

  2. Turn on "auto-off" with a 2 second delay on the virtual switch device

  3. And then set this RM:

This is specific to me saying "Alexa, Goodnight" and her putting us into Sleep mode (which in turn triggers HSM intrusion-night).

You should be able to easily do the same thing for "Home", and you could probably use the same switch of off/on.

1 Like

Soooo.. Still no clue what I am doing... lol.. Attempted to follow your instructions Sounders but I think I failed. I will see if my routine works tonight with what I have.. I looked for another App named Alex Skillz as I feel like this is perhaps my issue right now, but I am too newb to find it apparently.. :expressionless:

I went a slightly different direction.

I created a virtual switch called "Switch - Day". I exposed it to Alexa via the Amazon Echo Skill app. It's one of the built in apps.

In the Alexa app on my phone, I created a routine that turns the Day switch off when I go to bed:

I have a similar routine in Alexa that turns the Day switch on when I wake up.

Back in HE, in Mode Manager I used the "set mode with switches" section to change the mode when the switch goes on or off.

Then, one last step, in HSM I Configure Arming/Disarming/Cancel Options using modes to arm or disarm.

No Rule Machine required and works great. I've had this set up for a long time and it's never failed as long as Alexa was on line.

1 Like

I deleted my post because what I had described was pretty much what @jabecker laid out above. The thing with Hubitat is that there is always several ways to solve a problem.


Lots of different ways to accomplish this indeed! What I did worked as it changed mode to night and armed ASM night when I ran my Goodnight Alexa routine! So I guess I have more questions.. Some of you were saying to use my modes to arm and disarm ASM. Why do you prefer to do so? I currently have ASM arm Away via a time rule. 6:15am it switches to Arm Away because I typically walk out the door to work before 6:05am. Then I have geofencing set for our phones to switch ASM to Arm Home when we arrive. Same with Arm Night, I had it set for like 10pm via rule machine.

TBH I don't fully understand what modes are for our how they can/should be used.

I also purchased a Samsung button and when it is pressed I would like Alexa to make an announcement. Can I do this with the built in apps or is this where I have to install a second party app like this Alex Skillz app? And if so how do I find the code?

Modes are used for setting more than just the alarm. For example I have my away mode set the alarm, lock all doors, set the thermostat and other devices to away. Modes are an easy way to automate what you want to happen when you are away or at night or just at home during the day.

Good to know you got this to work!
Up to you on Modes. I like them as a mode to me helps set the 'tone' for what I can expect. Since it's a native concept as well, you can use it as a check across most customer and built in apps.

e.g. For my motion sensor lights, if the mode is sleep, then movement doesn't turn them on, or I could and do it more in a dim as a night-light.

It's very powerful, but not required for what you are trying to do, just a good practice for when you start automating more and more, having modes and scenes help reduce the tweaking you have to do as your setup grows.

You can use modes any way you want. You can call them anything you want. Modes are very flexible and powerful. There's no particular way they "should" be used. There are lots of ways they can be used. You need to think about your own use cases and whether modes would help to simplify what you want to automate.

I'm of the "hands off automation" school. I like things to just happen without having to push buttons, although I don't mind yelling at Alexa from time to time. I'm retired and don't keep a strict schedule. I use modes to simplify automations by sort of grouping them into types.

I have 4 modes: Home, Evening, Away, Asleep.

Home: set via switch or via geofence (multiple methods combined for accuracy). HSM is disarmed, outside lights are off, inside lights are automated via motion as necessary according to lux levels.

Evening: set at sunset. HSM is disarmed, outside lights are on, kitchen lights stay on, other lights are automated via motion.

Away: set via geofence (multiple methods). HSM is armed. Lights are out. Door is locked.

Asleep: set via switch. HSM perimeter is armed. Outside lights are on. Door is locked. Inside lights are automated via motion at 30%.

Having modes also simplifies some things in RM. For example, if it's sunset and mode is Away, a light is turned on for the dog. If geofence triggers Home but it's after sunset, Mode is changed to Evening.

do the % signs cause HS to tell you which door is open? HOw do you get the code into the interface?