“Alexa, Make My ESP8266 Do Something”

The Amazon Echo and its diminutive Dot cousin have the handy feature of being able to control some home automation devices. If you own the right manufacturer’s hardware you can bend your home to your will using the power of your voice alone.

The trouble is, if your hardware isn’t on the list of supported devices or if you make your own, you’re out of luck.

[Xose Pérez] had been sidestepping this problem by using a server running a set of scripts emulating a Belkin WeMo device, which Echo supports. The server could issue commands to his microcontrollers, but he wanted more. Why not cut out the middle man to incorporate the WeMo emulation directly on the ESP8266 that did the work?

He took the Fauxmo Python WeMo emulator he had been using, and ported it to an ESP8266 library that can be incorporated in existing code to make it appear to the world as a WeMo device. With the code itself he has provided full instructions on its BitBucket page as well as on the page linked above.

He admits that he is not the first person to have achieved this aim, and points to this earlier project. However his requirement for a library to be incorporated in another piece of software were not satisfied by it, hence his work.

We like this project, but it’s probably worth reminding readers that Alexa does have an SDK in the form of the Alexa Skills Kit. You can use it to do all sorts of clever things with your Echo or Dot… or you can make it the brains of a Big Mouth Billy Bass novelty ornament.

27 thoughts on ““Alexa, Make My ESP8266 Do Something”

    1. Eventually, someone will stop wishing for a stand alone, local, voice recognition algorithm, that actually works and will actually get around to creating one.
      Sadly unless you live off grid, in a cave, half a mile down, strangers will be filming you whilst they text in public. [ I sware that’s why they have cameras on both sides ] you can’t escape it. I expect they already know when your lights are on and how often you flush the toilet anyway :D
      Feel special, they show an interest in you :D

    2. You can use the cloud based voice to text services to help train a local FOSS voice to text system and then cut the cord if you feel the effort is justified. You send your audio to 2 or more online services and to your local code, then train your local code based on the majority interpretation.

    1. If you’ll post an issue on that project with a network packet captures of the SSDP being sent, I can take a look at it. It *should* be discoverable by echo, but if you tried it more than 6 months ago, I’ve made significant progress in that time.

  1. For a similar project that emulates a Hue bridge instead: https://github.com/probonopd/ESP8266HueEmulator

    It supports SSDP discovery and is compatible with most 3rd party apps as well as the 1st gen official Hue app (the second gen app does things differently). One downside to the Hue ecosystem is that apps and devices tend to support only a single bridge at a time, so it may not be quite as useful as emulating the WeMo ecosystem.

  2. There was/is a FOSS project called Saera to do offline and online voice function similar to Siri on the Nokia N900 (Maemo Linux, 600 MHz ARM Cortex-A8 CPU typically overclocks between 900-1200mhz with CSSU-thumb), it uses Sphynx voice recognition and I think plugged into Wolfram Alpha for answering questions. As I recall a few tries from early on was that it was nearly unusable, Sphynx and the scripting for Saera might have gotten better since ~2010-11 though, but I decided I didn’t need to learn how to talk to my phone like that.
    https://talk.maemo.org/showthread.php?t=84753

  3. I have a bunch of esp8266 based microcontrollers which are driven by Alexa via Node red and MQTT. There are plenty of resources on how to do this and it means I can easily use other things to control them also.

    1. Me too. Actually I say that in the post. I have quite a few devices sending and receiving MQTT messages and I manage them from Node-RED. I had the fauxmo script running on the same server as Node-RED acting as an Alexa-MQTT bridge. It works and it’s pretty easy to do once you have the whole infrastructure running.

      That said, I think one of the reasons the ESP8266 is so popular it’s because it can be deployed “in the wild”, once it’s connected to your network you can use a lot of different means to control it: MQTT for sure, a web interface, a custom app, Blynk, Imperihome, Alexa via emulation,… and soon with the ESP32 BLE too.

      Not everyone has an MQTT broker running at home, you know.

  4. “or you can make it the brains of a Big Mouth Billy Bass novelty ornament”

    Still waiting for someone to tell us lazy folks how to do it. My Billy looks like he’s getting really tired of singing the same two songs. I have a spare Echo Dot (they sure got cheap for Black Friday…) that I’m willing to hack up for the purpose, but it’s kind of a black box. Would it be easier to do this with a Raspberry Pi?

  5. Awsome, the Alexa cost is tiny when you consider the work which is done in the cloud .Then you can add a £2 wifi board to action your words specifically and exactly. Tomorrow I buy an Echo Dot. Saturday I will open the kitchen door for the cat without leaving the keyboard. I am in awe of the contributors to Open source, Hackaday and instructables , thank you guys, Its amazing what can be achieved.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s