Aren't Hubitat devices (switches, lights, etc) supposed to function as triggers in Alexa Routines?

I'm using the Alexa Skill, and would like to turn on an Alexa-connected device when a Hubitat-paired switch exposed to the Alexa Skill turns on.

I'm unable to create that routine. When I go to create a routine, the only two Hubitat devices that show up are my locks (see below):

Anyone know why the rest of my Alexa Skill exposed devices (switches, bulbs etc.) aren't showing up as triggers for routines.

On the line with Alexa tech support but hoping someone here has an answer.

Thanks!

HE switches/ bulbs have never been able to trigger Alexa routines. Many use virtual contact/motion devices as triggers.

2 Likes

The only thing that shows up as routine triggers for me are sensors - motion, etc. By making a virtual sensor and activating it with rule machine you can achieve what you want.

1 Like

Blame Amazon. Only contact sensors, door locks and maybe some motion sensors (although for me only one that's paired with my Hue hub), are exposed as triggers. Definitely not switches or bulbs.

Virtual contact sensors work, though, and that's what I use.

2 Likes

@bjcowles @jabecker @SmartHomePrimer

My virtual contact sensors aren't showing up either .....

Use this code

I use the built-in virtual contact driver. Also make sure the device has an open or closed state, otherwise Alexa will not discover them.

2 Likes

Boom! I'll bet you that's the issue. I am going to try this in the next 5 minutes.

@bjcowles @SmartHomePrimer

The issue continues. I can get the virtual sensors (Virtual Contact; Virtual Motion with Switch; Virtual Contact with Switch) to show up as "triggers" in Alexa Routines.

But when I try to select any of them, I get this message:

Edit: The virtual contact sensor is the system device. The virtual motion with switch is the one linked to by @SmartHomePrimer, and I modified it slightly to make Virtual Contact with switch.

I use motion sensor. Seems to trigger better for some reason. Then I just link them back to whatever I want in RM.

I can't get past the "This device is not currently supported" in the Alexa app. Any thoughts on that?

Could you check the settings for devices and make sure they are enabled?

This is one I just created.

No sorry. I just tried setting up a new one and it's working fine in my account. These are already exposed though. I'm out, but I'll login to my system, create a new one and see if it gives me grief.

They're all enabled.

Really perplexing. I also tried disabing and re-enabling them.

I found a similar issue in the SmartThings forum. Will try it after feeding the cats over the weekend. Too much else to do tonight.

I just tried creating a new one, and it worked.

This is the exact code I'm using. Looks the same, but just in case I'm missing something...

If this doesn't work, get on the horn with Amazon.

metadata {
	definition (name: "Virtual motion with Switch", namespace: "cw", author: "cwwilson08") {
		capability "Sensor"
		capability "Motion Sensor"
        capability "Switch"
	}   
}

def on() {
    sendEvent(name: "motion", value: "active")
    sendEvent(name: "switch", value: "on")
    runIn(12, off)
}

def off() {
    sendEvent(name: "motion", value: "inactive")
    sendEvent(name: "switch", value: "off")
}

def installed() {
}

I think I read just motion and contact sensors work. Good luck, I never got Alexa routines to trigger, even when Alexa saw them. Tracking this to see if anyone has ideas

1 Like

@bjcowles @SmartHomePrimer

Okay - here's the solution.

I did the following in sequence:

  1. Deleted Alexa app cache & data
  2. Uninstalled Alexa app
  3. Reinstalled Alexa app
  4. Logged in again

Contact/Motion sensors are recognized now. Simply doing steps 2, 3, & 4 was insufficient. Step 1 was needed.

4 Likes

I was playing around and found that I couldn't trigger routines with virtual contact, real contact, or real motion sensors. I'm going to try cleaning house with your instructions and see what happens.

Just for fun, I just did a few to confuse my wife.

Random phrases from Alexa triggered by doors opening and closing. She was not amused.

No switches or lights available as triggers in routines. My virtual garage door switch is the only "switch" there.