Simple, reliable virtual triggers for Alexa Routines without custom skills or cloud middleware.
Now available on HPM - search for truittchris
This app simplifies the process of triggering Alexa Routines from Hubitat by creating "Alexa-friendly" virtual contact sensors. It handles the "open-and-auto-close" logic automatically, ensuring your routines fire reliably every time.
Key Features
Single Triggers: Create a virtual contact sensor that Alexa sees as a trigger.
Trigger Groups (Advanced): Fire multiple Alexa routines in a controlled sequence with a single Hubitat command.
Built-in Debouncing: Includes an "Ignore repeated triggers" setting to prevent accidental double-fires.
Customizable Delays: Adjust the "Reset" timing and the delay between group triggers (crucial for Alexa's processing speed).
100% Local Device Control: Works directly with the built-in Hubitat Amazon Echo Skill.
How It Works
The app creates a virtual contact sensor in Hubitat.
You expose that sensor to Alexa via the Amazon Echo Skill.
You create an Alexa Routine that triggers when that sensor "Opens."
Hubitat opens the sensor, Alexa runs the routine, and the app automatically closes the sensor after a few seconds so it's ready for the next run.
Installation
Drivers: Install the three required drivers (Virtual Contact, Child Contact, and MultiTrigger Controller) in Drivers Code.
App: Install the app in Apps Code, then add it via the User Apps menu.
Connect: Use the built-in Amazon Echo Skill to share the new virtual devices with Alexa.
Nice work! This would make it much easier for people to use contact sensor triggers for Alexa.
I used to use that method, but I found runRoutineID from Echo Speaks to be more reliable, and it needs no additional virtual devices added if used directly.
I also made a simple routine trigger app that just reacts to a virtual switch to run routine IDs.
So you choose the switch in the app, and then add the "on" routine ID as a setting, and the "off" routine ID as a setting. The app subscribes to the virtual switch, and when it is flipped, it sends Echo Speaks the runRoutineId(routineID) command for the on or off routine based on the switch state.
The only problem with that is it requires Echo Speaks to be installed and working.
I don't want to hijack this thread, but I would like more detail or an example of how you do this. PM if you want. Most of the time, I use my Echos to flip virtual switches for webcore pistons because I am usually doing multiple things that I don't think ES can do with a routine.
I will post it here with apologies to @Chris.T, this is not to highjack the thread, but it seems to be on topic to the title.
Echo Speaks can be a pain for people to setup, so this is just another option to the Routine Trigger app of this thread, for those who do use Echo Speaks.
I don't use them much anymore since I added HA and I use the TUYA integration and HADB to control IoT devices, instead of using Alexa's access to them though skills.
I was going to make the app create the switches as child devices, but never got around to it. Each app instance can control two switches, but you can make as many instances as you want and name them different with the title setting.
Edit: Oh yeah, there is also another way to command devices directly using Echo Speaks without even needing routines, with the voiceCmdAsText() command.
This app translate a dimmer state into voice commands, to control a dimmer device in Alexa by building voice commands to set dim levels based on the virtual dimmer in Hubitat.
I’ve been playing with Homey Self Hosted Server and found a community app that can trigger Alexa routines directly. No need to make a trigger device, share it with Alexa and then add it as the routine trigger on Alexa. You can simply execute the Alexa routine’s action from Homey.
That is what the Echo Speaks runRoutineId() command does. You just don't get to select from a list of routines, you have to get the actual ID from the Echo Speaks Routine Testing section and run the command from RM, Webcore, or a custom App.
Understood, but installing and configuring Echo Speaks is a bit involved. The app on Homey is one click to install, then just choose your Amazon Echo Routine while you are building your automation.
An app could be built on Hubitat that creates a linked momentary virtual switch when an existing Alexa Routine is selected. The linked momentary virtual switch would then be used in Rule machine or other Hubitat apps as the action. Similar idea to what you are saying, but easier execution from installation through to execution.
That is exactly the problem that this app and driver was made to solve - Echo Speaks can be challenging to install and setup. I used it for a while myself but was looking for an eaiser way to accomplish the same thing. Different methods, same outcome - a routine is triggered.
I agree. You built upon what is the most commonly used method for routine triggering without Echo Speaks, so I would expect someone would like to use this, who is still using that method without the enhancements you provide for that method.
I would love to see Echo Speaks be able to authorize from Hubitat itself, and even become a built-in app, instead of using a separate cookie refresh server, but guess that is not possible the way the hub and Echo Speaks is designed.
Developer Choice/API Constraints: The author of Echo Speaks developed the application to interact with Amazon's existing cloud services in a way that bypasses Amazon's official (and more restrictive) Alexa Skill API. This "unofficial" method relies on mimicking a web browser session to grab and maintain the necessary access credentials.
Discussing VoiceCmdAsText. How do I use this command in the Alexa app? I use the Sleep Sounds skill that DID play a custom sound (custom one) when I would say "Alexa, custom one." Now, Alexa+ does not recognize "custom one."