Blog - Ryan McLean
  • Portfolio
  • Linkedin

Using Amazon Alexa (even without an echo device) to control home automation devices through web hooks; IFTTT substitute

Feb 10, 2022
After several smoke-filled summers promising myself I would purchase a good air filter the next winter, I finally followed-through with the recent purchase of a Coway air filter. I went with the Coway Airmega 250S  (a discussion for another time) - the "S" stands for WiFi. Or Smart. Or Something. Like a lot of modern "smart" devices, this air purifier talks through WiFi to a cloud service, but frustratingly doesn't support any kind of easy local control out of the box (certainly not through a protocol like Zigbee or Z-Wave), only WiFi and only to Coway's proprietary app or into other ecosystems like Google Home or Amazon Alexa.

Usually I skip buying these devices or using the smart functionality altogether, but I made an exception this time.

Fortunately for this device I found a workaround that at least allows me to control the device with my home automation platform for free, through the use of simple webhooks, and Amazon's Alexa platform. I'm doing this without using or having an actual Echo device in my house.

Step 1 - Install the right skill through the Alexa mobile app
Amazon calls "apps" that work within the Alexa ecosystem "skills." You can find and install these skills through the Alexa mobile app. For this, I am using a skill called Voice Monkey. This skill provides two important functionalities:
 
  1. It can create "virtual buttons." These appear as "doorbells" within your Alexa home configuration.
  2. You can trigger (ring) these "doorbells" using a webhook.

There are a few other options out there, but I liked Voice Monkey because they give a very generous number of  "doorbells" in their free plan.

Step 2 - Setup virtual buttons / doorbells

Once you have setup Voice Monkey in the Alexa app, you can head over to the Voice Monkey website and begin creating the virtual buttons. Unfortunately you can't really pass parameters with the webhook, so you will need to create a virtual button for each discrete state you want to be able to put the controlled device in. This means that this technique will not scale well, but it works well enough for my limited application. In my case, I ended up needing 7 separate buttons to cover 4 fan speeds (including off), 2 automatic modes, and turning the control panel lights off. (More on that below, in "oddities.") 

Step 3 - Setup routines
In the Alexa app, map your virtual doorbells to the states you want your smart device to be in.

Step 3 - Setup webhooks
On the voicemonkey website, find and use the URLs provided to ring the virtual doorbells.

Use Cases
The smart mode on the Coway is actually very good, and that's the mode I leave the purifier in the majority of the time - but I like being able to override that based on conditions of my house such as:

  • Run the purifier on highest speed for 30 minutes when I wake up.
  • Run the purifier on highest speed for a few minutes when I return to the house after being away.
  • Turn the purifier off completely, if I am gone for more than 24h.
  • Turn the control panel lights off whenever the TV is on.

Coway specific oddities
The air purifier emits a chime every time it is remotely controlled. The chime is gentle and pleasant, but it's audible none-the-less, and I don't believe it can be disabled.

Setting any control other than "Lights off" causes the control panel lights to turn on.

You can set multiple combinations of states in the Alexa app (IE - speed 3 and lights off), but these are sent sequentially to the device and this appears to be according to the sequence you select the items in the app. I think this might apply to anything the Alexa service can control.  I had a situation where it was sending the lights-off command, and then the fan-speed command, such that the control panel lights were immediately turning back on. 

In my case, the "second thing" was always turning the control panel lights off, so I just handled the sequential operation within my home automation platform.

Doing more
The Voice Monkeys service has a "Pro" tier for a very reasonable $6 a year that also allows you to push "voice-to-text" notifications out to Echo devices, all through webhooks. These notifications can be complete with sound effects, options besides the default alexa voice, and even limited challenge-and-respond Yes/No interactions. If I had Echo devices in my home, this would bring a very nice capability to my home automation system. 

Other Options
There is a plugin out there for Homebridge to control the device - I may look into this in the future. 

https://github.com/aschzero/homebridge-airmega

 

Share on:

Facebook LinkedIn

Previous post:

Show Your Work

Next post:

Publishing a Portfolio with Publii - Part I or my history with web publishing.

Stay with us

Powered by Publii
  • Portfolio
  • Linkedin