I have a couple Sengled bluetooth bulbs connected to Alexa as dimmers, Alexa controls them just fine as individual bulbs or in a group
Would like to either control them directly via HE (haven't found a solution yet), or create an Alexa routine that uses HE virtual switches as a trigger (When this happens) to turn off the group with the Sengled bulbs in it
I can't see the virtual switches in an Alexa routine (when this happens) either as a VS or when placed into a group.
Alexa Routines can only be triggered by a Motion or Contact sensor, not a switch. This is an Alexa issue, not a Hubitat issue.
To get around this limitation, you could use my Virtual Motion-Switch driver. It allows you to use the Switch on/off commands in Hubitat, while using the Motion active/inactive states as triggers in an Alexa Routine.
No matter what I do, I can't get Alexa to do anything. Driver installed, new V-Device created and using your driver. The v-switch has been added to Alexa Echo Skill and is visible on the Alexa side
I created an Alexa routine when the v-switch is on, turn on a light, nothing happens. I can play the routine from Alexa and it works fine.
Every once in a while Alexa will get forgetful... Try removing the switch from the Alexa Echo Skill app, save and exit (this should invalidate the rule on Alexa also). Go back into the app and re-add the switch, then go into Alexa and re-point the routine to the switch.
Finally got it working to turn the light on via an Alexa Routine, however the v-switch-motion device (using the driver suggest above by @ogiewon) doesn't stay active, since it goes inactive with a few seconds, so Alexa turns the lights off right away
Here is what I have, a simple V-Switch gets turned on, RM Rule then turns on the new v-Switch-Motion which is passed to Alexa, she turns the light on,
Sorry, not following, the driver creates a v-motion with Switch, are you suggesting to use the built in HE v-contact switch and not the driver mentioned above?
Create a new driver using the code I posted and use it instead. Alexa will respond to either a motion sensor (your first implementation) or a contact sensor. A motion sensor by definition will eventually go from active (switch on) to inactive (switch off), A contact switch can stay open or closed until some other action changes it.
Ahhh...sorry about that. I actually use it in the reverse fashion...Amazon turns on the switch, which triggers a motion event in Hubitat momentarily. My driver automatically resets itself to be read for the next event...
You’re wanting to go the opposite way, and the driver posted by @thebearmay should do the trick.
I apologize for being pedantic, but I want to to confirm that you did the following steps while using @ogiewon's driver to create a device that can be used to trigger Alexa routines.
Save @ogiewon's driver as a user driver on your Hubitat
Create a new virtual device and under "Type" select @ogiewon's driver ("Virtual Motion with Switch").
Save the new device, and confirm that it is both a switch and a motion sensor from the Hubitat device page.
Open the Hubitat Amazon Echo Skill and add the new device (so it is now exposed to Alexa).
Confirm that this device appears as a switch and motion sensor to Alexa.
Create a new routine that uses this device as a trigger.
Evaluate from the Hubitat page for this device whether turning this device on triggers your new Amazon routine. It should also show the state of the device to change in the Alexa app.
Just use a Hubitat Virtual Switch. Make sure to enable the “Auto Off” option on the virtual switch. Share that switch with Alexa and simply “turn it on” in an Alexa Routine based on a voice phrase trigger. Then, in Hubitat, use that virtual switch as a trigger in RM to run your Hubitat automation.
NOOB here.
I have installed the Virtual Motion with Switch driver, Created a new device for it and it works from the Device app. The problem is I cannot get the device to show in Alexa, I have removed and re-selected it several times but it refuses to display either on PC or tablet. Is it related to this worrying line ? " If you include a device that isn't compatible with Alexa it will just be ignored and not sent to Alexa."
Several times. Removed it from the list, closed the app, reopened and added it back. Closed and reopened Alexa several times
Turned on the options in the Echo Skill app. Nothing makes a diference.
Toggle the virtual motion/switch device on and off, then add it to the Amazon Echo Skill app. Also, please show a screenshot of the virtual device. Sometimes the clues are more obvious in a picture.
Also, please confirm that you are using the “Amazon Echo Skill” app on your hub, and not the older, deprecated Amazon Echo integration. Only the Echo Skill supports contact and motion sensors.