Kick off a rule with Alexa


#1

I am traveling and not with my home :slight_smile: ... was just thinking and thought I would ask after a bit of searching.

How do I kick off a rule with an Alexa command? Do I use a virtual switch for that?


#2

You can. If you create a virtual switch, you can use that as a trigger or condition for a rule and then have the switch auto-off itself after a second or two within the virtual device.


#3

Virtual switches are what I use to integrate rules with Alexa.


#4

If I might bug you guys again about this a bit.

I guess I want to tell Alexa to turn off ALL the lights in the house. "Alexa, turn off all the lights".

Obviously I can easily set up a rule that turns off all the lights but I still am not exactly sure how to kick that rule off.

Do I create a virtual switch and just pick some random device like generic zigbee switch? Having typed this now... I think I'll just try that! LOL


#5

If you want to do that, you can do it several different ways. You should be able to tell Alexa to turn off all lights and it should turn off all the lights that are connected to it. Do you have your lights connected to Alexa? Do you have the alexa/HE integration set up yet?


#6

Oh are you saying that Alexa understands "all lights" ?

Yeah I can turn on and off individual lights by the "device name" -- "Alexa turn on the living room lights".

I have some legacy hue bridge junk going on that I need to shut off... then I will try to see if Alexa can just shut them "all off" by saying that... I thought I would have to have the phrase "all lights" map to a rule or something....


#7

all lights

I do that by setting up a group in alexa named "all lights" and selecting all the switches I want it to control.


#8

That is what I used to do but have found that Alexa will understand 'all lights' without groups- as long as the device's type, in the Alexa app, is set as 'light' or the name contains the word 'light'.


#9

Yep!!! You are right... "all lights" works! Sweet. Now one question though @bjcowles, do you know how I can tell Alexa that one particular device is not a light? I have an air compressor that is showing up as a "light" and I'd rather not have that thing spool up when I say "turn on all the lights"... Alexa doesnt seem to let me change whether or not a device is a light or something else.


#10

Nope....you only thing you can do is assign it to a different room and then only turn off based on the room.


#11

Yup. If you do "all lights" it will do anything it thinks is a light, and there is no way to re-assign/change type (same as Google).

So if you want to use "all lights" you need to NOT add the other devices you don't want to turn on/off to Alexa. Or not use "all lights" and then it will do it based on room assignment of the Alexa and the devices in that room.


#12

I wonder what my devices expose that others don’t. I can switch types with all of my GE switches and all of my plugs.
This is an Iris plug


And a GE on/off switch


#13

Interesting!!!


#14

It's possible that this is different now with the Alexa skill vs other implementations. Evidently the ability to modify this is controlled by the integration. So, it is all-together possible that this editing was not available before but was added at some point. This is definitely a leg-up over Google.


#15

Yeah, that is news to me... I certainly do not remember it working that way in the past!

I also agree that is a very powerful capability that Google doesn't have right now.

I just checked, and I can change my device type in Alexa too. Very cool!


#16

I was in the same boat...back when I was evaluating which one to go "all-in" with, it was the same for both.


#17

That really has to make me think a little... I prefer Google Assistant to Alexa in general, but for HA this could make me actually start using Alexa more. Interesting. Need to think on this...


#18

Another interesting feature Amazon is rolling out is Alexa Guard. I mention this only because I'm using @Ryan780's great driver with my WyzeCams. Alexa will listen for glass breaking and smoke/CO alarms and send notifications. I'm hoping those events will be able to be used as triggers for other actions in Alexa routines.


#19

Send notifications where? I would think that the Smoke alarm alone would be enough notification at home. I'm assuming push notification to mobile devices?


#20

Correct. Mobile notifications