Hubitat, Alexa, and virtual switches

I am trying to put a button on Sharptools to turn a group of lights on. The lights are on wifi outlets controlled by Alexa. I made a virtual switch in HE that Alexa sees, but I can't make a routine to control it because Alexa doesn't see any DEVICE to start a routine with. What am I missing?

1 Like

Edit: apparently everything I posted below is completely false :blush:
Feel free to disregard and skip top the next post.


Alexa routines only work with devices that are directly integrated like Ring cameras and locks paired directly with their hubs. It currently cannot be used to monitor all the devices in your device list. Hopefully that is something that will change one day, but for now it doesn't work with any 3rd party integrations (at least that I know of).

What type of wifi outlets are they? You never know someone may have made custom drivers for them in Hubitat. Otherwise, you may be able to tie them to a service like IFTTT which Hubitat also supports.

I'm not sure I understand this correctly, but Alexa does, indeed, let you use third-party devices (virtual or otherwise) as part of an Alexa "Routine" (and for device control, etc. in general). However, the Hubitat skill specifically does not support this. If you have a SmartThings account, you can put your Hubitat device on ST using the Other Hub community-created integration, then add the SmartThings skill to Alexa and authorize this device there since the ST skill lets you do this. (OK, I haven't actually tried with a switch, but it lets me use contact and motion sensors; I imagine it would be the same. Hubitat doesn't support these senors on Alexa at all, and switches only support control, not monitoring, a relatively new Alexa feature.)

IFTTT or the chance that there might be a custom driver/DTH that works with them are also good options, particularly if you don't have or want to use an "other hub" account for this (though it's all cloud and should work without the actual hub). :slight_smile:

1 Like

I was not aware of this. Thanks for letting us know. Hopefully this gets added to HE soon.

Honestly, I had to double-check myself. I use Alexa routines only as a last resort where a "native" Hubitat automation isn't possible, but I knew I had some virtual sensors in there as part of some automations. Turns out it was through ST (and ultimately Hubitat through the Other Hub app and DTHs).

Thermostat support is a bit higher on my wishlist (or at least it will be until winter here ends), but I wouldn't complain about this either! :slight_smile:

My Alexa telnet driver can trigger Alexa routines directly. Which means it can respond to any device in hubitat.

They are Etekcity outlets, using the VeSync app on Alexa. Here's the link... https://www.amazon.com/gp/product/B074GVPYPY/ref=oh_aui_detailpage_o06_s01?ie=UTF8&psc=1

I was able to do what I wanted with IFTTT, I added a virtual device in Hubitat, then linked that to Alexa through IFTTT. I put it on my dashboard screen in Sharptools, and it works fine, slight delay but not a problem.

2 Likes

I have several of these. It would be great to see direct integration!

Convert this to groovy:

Was there any progress on getting this ported/working?

I create a virtual contact sensor in Hubitat and use that to trigger Alexa Routines. Saves having to go through Smartthings.

Note you will need to make sure that you add that contact sensor to the native Amazon Echo Skill so that Alexa can see it.

I have a seperate rule that resets contact sensors after 30 seconds so that it works next time. Otherwsie the Alexa Routine wont trigger again because the virtual contact sensor is set to on.

1 Like

Hi Darren, i like this idea.
i am new to this, can you please explain how you make the reset rule...
i have had a few attempts but get a bit lost.
I made the sensor and can see it in the alexa app, i can toggle it in my device screen, just don't know how to activate on my dashboard..
i want to use a shutdown that does lights tv ac fans etc with one click.
thanks a lot, rob

Hi @robhawleyemail. My rule isn't particularly elegant. I simply have each contact sensor as a trigger when it opens, with an action to close each contact sensor on a 30 second delay afterwards.

1 Like

hi again Darren, thanks very much for replying.
I did find a way myself, but i thought it was kind bitsy.
i did what you suggested, created a virtual contact sensor than made a rule to close itself after 10 secs.
i then created a virtual button to toggle the sensor and it worked!
now i can create a good night button on my dashboard and turn off all sorts.
i think the more i get used to rule machine the easier this will become, bloody loving it though.
Thanks for your AWESOME idea mate! it worked.