Alexa Echo Button

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...

  1. Create virtual contact sensor
  2. Share contact sensor with Alexa
  3. Use Rule Machine to change the contact sensor on your button push (or whatever you want to trigger it)
  4. 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:

Pressing the Sonoff button...

  1. 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)
  2. Turns on the Brown Noise Alexa skill
  3. Will eventually turn on the heater, when I get either a dumb heater or alexa-enabled heater

Pressing it again...

  1. Turns off the humidifier
  2. Turns off the brown noise
  3. 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).