Virtual Switches and Alexa App

Morning group, running into some issues which should be simple here. I'm looking to add a simple virtual switch and virtual motion detector to set off a routine in the Alexa app. Problem is, I can't seem to find the virtual switch or virtual motion detector in the Alexa app. I've given it enough time and tried to search manually and have Alexa "discover devices." Am I missing something simple here?

Thanks

I think the trick you need is to use a virtual contact switch.
I wrote a custom switch that ties open/closed contact to on/off which works perfect for me.

I should note, I have already ensured the devices are connected via the Amazon Echo Skills app.

On second thought - it could be your Alexa isn't picking them up because your not identifying to Alexa your sharing it?
make certain its listed :slight_smile:

Yeah I've already added the virtual contact switch, just can't seem to discover it on Alexa. I've got numerous physical devices that cross over from Habitat to Alexa, this is my first attempt with a virtual device.

Yes, can confirm that each virtual device I've tried to add is shared under the Amazon Echo Skills app.

I'm still sleepy - but I recall something about contact switches having a problem. just for now, try using this as the driver.

You can quick install that from HPM - the contact is tied to the on/off like my other driver.

This comes up from time to time, and the issue is that only certain types of devices can be used as triggers for Alexa routines.

This thread discussed the same issue and includes a code snippet for a combined virtual contact sensor+switch.

It’s also possible to find similar virtual device drivers in Hubitat Package Manager.

1 Like

That's what I use.

I use a virtual combined motion-sensor and switch that was created by Ernie Miller and I found in the forums. It has worked fine for me.

The strategy of using a virtual contact with switch (or virtual motion with switch) has been around for years as the standard answer for making an event on the Hubitat side trigger an Alexa routine.

I and others have discussed in another thread that Alexa lately has occasionally been unreliable in triggering when it is a dual capability device like that. As I've encountered these, I've changed them to be just a virtual contact and they haven't failed since. That said, I still have a few contact/switch ones that have never failed either. Go figure.

1 Like