Monday, December 19, 2016

Amazon's Echo DOT 2 controls ESP8266


Since Amazon's Echo Dot 2 can control the Belkin's WeMos why not emulate it with this Esp8266 .

ESP after is connected to the WiFi network will start an UDP server on address 239.255.255.250 port 1900 and an HTTP server on its own IP address and port 80. Alexa on "Alexa, discover my devices " will send UDP on multicast address/port and the ESP will reply with its configuration (IP/PORT). 

Echo Dot 2 will get the setup.xml from ESP on provided IP and Port.

From now on the Echo cand send SendBinaryState command that will end up in trigger a GPIO.

SSDP protocol is used in the discovery part.




And a video controlling 2 GPIOs with on one ESP8266.




9 comments:

  1. Great job !!! Could you share at github or at my email the esp8266 code?Thanks a lot

    ReplyDelete
    Replies
    1. https://github.com/bcatalin/arduino-esp8266-alexa-multiple-wemo-switch

      Delete
  2. Hi great scetch, issue is I have a Arduino Uno WiFi which needs the library #include . Still I'm a beginner in Arduino im not able to change your scetch to the different wifi. Can you give me some help?

    ReplyDelete
    Replies
    1. Just change the lines
      const char* ssid = "YOUR_WIFI_NAME";
      const char* password = "YOUR_WIFI_PASSWORD";

      Delete
    2. thx Catalin for your fast responce,
      the issue is I can't use on this board the include ESP8266WiFi.h
      for the UNO WIFI, I have to use the library UnoWIFIDevEd.h

      Delete
    3. You are missing the ESP8266 ( http://arduino.esp8266.com/stable/package_esp8266com_index.json) from your Arduino IDE.

      Go to this blog post https://myesp8266.blogspot.nl/2016/11/esp8266-esp201-step-by-step-guide.html and read from "Now click File menu and then select Preferences. It will look like this:"

      Delete
  3. Thanks for a great article. It's really amazing. I think it's helpful for everyone.

    ReplyDelete
  4. The code was helpful. Just added a WiFi connection loop - else if the wifi router is not started before turning on the ESP then ESP never connects.

    ReplyDelete