Arming Hubitat HSM with Alexa voice command

I know Alexa works with some Hubitat devices ( I have them set up) but is it possible for Alexa to ARM Hubitats HSM by voice command? I have Alexa voice command working with Blink cameras to arm and disarm with a pin and just wondering if HSM could be made to do the same.

Maybe with a virtual switch/Lock

Yes, with a virtual switch.

  1. Create a virtual switch in HE and don't have it auto-turn off. For ease of use, you could name it "Arm Hubitat".
  2. Share it with Alexa (via the skill).
  3. Create a rule in RM with a trigger on the virtual switch you created. As part of the true actions (switch is on), arm HSM and in the false actions, disarm HSM.
  4. Tell Alexa to discover devices.
  5. Tell Alexa "Turn on Arm Hubitat" and the system should arm. Turning off the virtual switch ("Turn off Arm Hubitat") should disarm the system.
  6. For even easier, more natural language, create an Alexa routine with the phrase "Arm Hubitat" and turn on the virtual switch there and another Alexa routine with the phrase "Disarm Hubitat" to disarm the system.

However, I must note that using a virtual switch in this context leaves you open to security issues. You could also achieve the same with a virtual lock (which Alexa requires a pin code to unlock).

2 Likes

I use a lot of virtual switches to integrate with Alexa. You could use a switch named something like 'Security' and tell Alexa 'Turn on Security' or 'Turn off Security'. Otherwise you can name it anything you want and set up one routine in the Alexa app that triggers using a custom phrase of your choice, then have the routine turn on the switch (vice versa to turn off the switch).

1 Like

FANTASTIC! Now the virtual lock is that done in Alexa app? Would definately want a pin to be used. Also, with virtual switches, is there anything that must be done special when creating a virtual switch or you just make one, label it and make the rule to be used? Thanks for everyone's input

The virtual lock is created in HE as a virtual lock type. All the steps I presented earlier are the same with the change being using a virtual lock instead of a virtual switch.

In the Alexa app (once you have created the virtual lock and shared it with Alexa), you'll need to go into the new Lock's settings (Devices > Locks -> gear icon) and enable unlock by app and unlock by voice which will trigger Alexa to require a pin code.

Once you have that completed, just create the rule in RM and you should be good to go.

[EDIT]: I just tested this whole setup and it works pretty well UNLESS you are using other means of arming/disarming HSM. Then you might run into some race conditions unless you use the lock as a condition in those other rules.

For a virtual switch:

  1. Create the virtual switch and label it in HE.
  2. Add it to the Amazon Echo Skill in HE. This should cause Alexa to discover the new switch.
  3. Create Alexa on/off routines (if you're using custom phrases).
  4. Create a rule in HE to arm/disarm using the on/off state of the virtual switch.
1 Like

Wow, thank you soooo much! Pretty new to Hubitat and your directions are great. Appreciate all your time and testing

1 Like

Has anyone given it thought that this would be giving too much control via Alexa?

If someone knew the name of the virtual switch they could turn it off and turn off your alarm.

I only plan to use alexa to turn on the alarm, but would be curious to anyone's approach/thought.

I was actually about to link this thread because if the virtual lock trick works, you could hook into "locking" and "unlocking" so that arming and disarming needs a verbal password, which would help the security concerns.