I wanted to be able to trigger an Alexa routine from a Z-wave button, but that isn't supported by Alexa. Thought I'd share a reliable work-around I figured out last week...
Alexa routines can be triggered by some smart home things, but not a button. One of the things it can be triggered by is a contact sensor (door/window). So, to trigger an Alexa routine with a z-wave device...
- Create virtual contact sensor
- Share contact sensor with Alexa
- Use Rule Machine to change the contact sensor on your button push (or whatever you want to trigger it)
- Set your Alexa routine to trigger on that contact sensor
I absolutely loved figuring this out. We have a baby, and I wanted to be able to have the whole room go into naptime with the push of a button. Unfortunately, most smart humidifiers and smart room heaters are made for Alexa. Now, those can be controlled with my smart button. My setup:
- Hubitat C7
- Aqara Temperature and Humidity Sensor
- Miroco Cool Mist Humidifier
- Kasa Smart Plug Power Strip
- Sonoff Zigbee Wireless Button
- Standard room heater (this needs to be upgraded)
- Echo Dot 2nd gen
- Brown Noise skill for Echo Dot
Pressing the Sonoff button...
- Turns on the Humidifier controller virtual switch, which controls the Kasa plug the dumb humidifier is plugged into dependent on the humidity sensor (Rule Machine turns on the humidifier if <50% humidity, and turns off the humidifier if >55% humidity)
- Turns on the Brown Noise Alexa skill
- Will eventually turn on the heater, when I get either a dumb heater or alexa-enabled heater
Pressing it again...
- Turns off the humidifier
- Turns off the brown noise
- Turns off the heater, and then turns it back on 5 seconds later (the heater won't actually turn back on when power is restored).