Controlling an Alexa device from Hubitat

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.

What exactly are you trying to accomplish? I have no idea how local endpoints as a RM Rule Trigger play any role without more context of what you're trying to accomplish?

Alexa can be used to control Hubitat devices, like switches, dimmers, color bulbs, and locks in Alexa Routine ACTIONS.

Hubitat Motion Sensors, Contact Sensors, and Locks can be used to TRIGGERS for Alexa Routines.

With those building blocks available, what would you like to accomplish? I am missing the point of the RM URL Endpoint as a RM Rule Trigger... :thinking:

Hmmm everything sets up in Alexa ok using a virtual contact, but not a virtual switch but nothing happens when I open or close the contact in Hubitat

1 Like

I was just use local endpoint as an arbitrary chioce -- I just want an example of how to trigger an Alexa action.

Separately my test virtual switch isn't being discovered by Alexa but I don't want to confuse the two directions. First I want Hubitat ==> Alexa to work so I can write a program to control Alexa via Hubitat (or Google Home but that doesn't seem to be supported yet).

test1 now works.

Hubitat web apps need to be upgraded to automatically save and/or warn. There are too my update buttons and save buttons that are easy to miss. This is why browsers have a feature to catch page exits.