Control ESP with Alexa

Last Updated on 26 September 2025 by Suffocation

Beim Stöbern im Netz bin ich auf eine interessante Bibliothek gestossen. Die Fauxmo Bibliothek ist zur Anbindung des ESP8266/32 an eine Alexa gedacht. Die Bibliothek simuliert ein Philips Hue Device, welches direkt über die Alexa gesteuert werden kann. Es bedarf keiner zusätzlichen Services oder anderer Skills.

Here's the link to the library

https://bitbucket.org/xoseperez/fauxmoesp/src/master/

Abhängigkeiten

Je nach Controller wird eine der folgenden Asynchronen Libs benötigt:

ESP8266: ESPAsyncTCP

ESP32: AsyncTCP

ESP Programme

Here's my flashing variant, Alexa only controls the built-in LED here:

https://gist.github.com/sfambach/287b4e5e5b9058da4cfb677d4625418f

Load code onto the controller, check if the network connection is established.

Then it continues with Alexa...

Alexa

Sagen: „Alexa suche neue Geräte“

The Alexa should then find the blue light.

With

„Alexa, switch on blue lamp.,
„Alexa, turn off blue lamp“

Can the LED on the ESP be controlled?.

Conclusion

Die Bibliothek ist leicht einzubinden und erledigt ihre Arbeit zuverlässig.

Ähnliche Beiträge

Sources

https://bitbucket.org/xoseperez/fauxmoesp/src/master/

https://github.com/originallyus/node-red-contrib-alexa-local

https://github.com/me-no-dev/AsyncTCP

https://github.com/me-no-dev/ESPAsyncTCP

DateChangeAuthor
22.03.2020Post createdSuffocation

11 thoughts on “ESP mit Alexa steuern

  1. Thank you very much, that's exactly what I was looking for.
    I know I'm 3 years too late.
    But I can't find the link to your example project (Blue Lamp / Built-in LED).

    1. Hello Michael,

      The time isn't that important ;). Apparently the GIST plugin isn't working anymore. I've linked the Gist code directly.
      Greetings Stefan

  2. Hello,
    Excellent explanation, thank you!
    It worked straight away.
    What happens when I flash multiple ESPs in this way?
    Do the IDs then always have to have different names, or can I make them generic (ID1, ID2, ID3…) and rename them later in Alexa?
    And: how many devices can be managed with ONE ESP in this way.

    1. Hello,
      Glad it worked out.,
      To be honest, I've only tried it with one. But I think different names/IDs have to be assigned. However, I've read that it can lead to problems.
      Greetings Stefan

  3. Hello,
    First of all, thank you for the excellent explanation.
    I'm trying to get the sketch to work on a NodeMCU V2. The Wi-Fi connection is also working, but Alexa isn't finding any devices. I'd be grateful for any suggestions.
    LG

      1. Hello,
        Alexa doesn't recognise the device for me.
        The ESP32 is on the same Wi-Fi but isn't being detected. I've also tried your libraries and the latest Fauxmoesp. I think it's no longer detectable because of Alexa.

        I would really appreciate a suggestion for a solution.

      2. Same problem here. What do you mean by same subnet?
        Alexa is connected to the same Wi-Fi as the NodeMCU, i.e. the ESP32. In the router menu, the ESP is recognised as connected.

  4. Hello,

    Very nice explanation 🙂
    However, I have a question: if I turn on a Philips Hue light in my network via Alexa, does the relay connected via ESP32 also turn on at the same time? Is there already any knowledge about what causes this bug, or is there already a fix for it?

    1. I had that problem too... they then coincidentally had the same designation. The solution is then to re-learn the Hue lamps to the Bridge.
      LG

Leave a Reply

Your email address will not be published. Required fields are marked *