Controlling an Alexa device from Hubitat

I can find a way to allow me to control Hubitat devices from Alex but is there a way to do the opposite? I know I could rig up text to speech but that's a hack too far.

1 Like

Can you give an example of "the opposite"? What do you want to control?

I just want to invoke an Alexa skill. One example would be controlling a non-hubitat device. Or maybe asking it to play music on a particular speaker as part of a rule.

One example is a Schlage Wi-Fi lock (BE489WB)

I think you can do the following. I have never tried this with a lock. Can those be added to routines, not sure???

  • Create a virtual switch in Hubitat. Name it Lock or whatever.
  • Then make a routine in Alexa that when the Lock switch is on, to lock the Schlage.

If that works, you should be able to do a second routine for unlock when Lock switch is off.

1 Like

You can set up a virtual switch that tells Alexa to run a custom routine. Alexa custom routines can issue “voice” commands to the Alexa device. For example the Custom command can tell Alexa, “Alexa open Schalge lock with code xxxx” (all locks require a code to open from Alexa).

2 Likes

Virtual/Physical Switches and Dimmers cannot trigger Alexa Routines. However, virtual/physical contact sensors, motion sensors, and locks can be used to trigger Alexa routines.

2 Likes

Geeze, I always mix those up. Thanks for clarifying.

1 Like

Thanks WRT to voice -- do you have a URL that explains how? (Hokey but I can experiment it).

Same for virtual switches - URL to doc? Thanks.

@Bob.ma This may help.

Quick related question -- is there a simple way to get the URL to trigger a rule (and provide parameters)? Ideally, it would be shown in the rule settings so I could copy it.

I did look at the instructions but when I look I don't see an AppID and using the name didn't work.

An alternative would be to list the rule in the Maker API which does present simple sample URLs.

You can use the Cloud Endpoint trigger type as shown below. Local Endpoint is another trigger type, if desired to keep traffic local.

Take a look at Echo Speaks, too... that does some of what you want to do.

1 Like

Thanks. I'm embarrassed because I tried it but missed that I could copy the URL from image

I knew I'd done it before. :wink:

It appears that you can use a virtual device now with the new customised option in Alexa routines

Are you suggesting that a Hubitat Virtual Switch, shared to Alexa via the Amazon Echo Skill app, can now be used as a Trigger for an Alexa Routine?

That would be news...

Where you see add action scroll to the bottom to customised And type in what you want alexa to do

I think you're misunderstanding the point of my earlier clarification... Virtual Switches, nor any type of switches or dimmers for that matter, can currently be uses to TRIGGER an Alexa Routine at this time. Motion Sensors, Contact Sensors, and Locks can be used to Trigger Alexa Routines from Hubitat.

Yes, it is possible to turn on/off switches as Alexa Routine ACTIONS. And with the new Custom Actions, anything you can say to Alexa can now become an Action. But these are not the TRIGGERS that execute Alexa Routines... (Well, of course the Alexa Custom Action could be used to trigger another Alexa Routine, but we still need something to trigger the original Alexa Routine... :wink: )

Unless I am still misunderstanding what you're trying to share?

1 Like

Hang on I'll try something

Perhaps an example helps. A screenshot of a rule that is triggered using a local endpoint and turns on an Alexa device? I'm close but missing something that should be obvoius.

The converse would be useful too -- but that's more about Alexa and having it invoke a URL.

Thanks for all the help.