Generation 2 devices support

Issue #39 new
Xose Pérez
repo owner created an issue

Current fauxmoESP code is not 100% compatible with Gen2 devices like the Echo Plus. There have been several issues discussing the topic. This issue is meant to centralize development on this line.

Comments (28)

  1. Jezz

    Bibi's update was the only one that worked perfectly on my Echo plus (2nd Gen) with out any other Echo's on the network. Now have it working nicely with 144 WS2813B LEDs and the FastLED library on a nodeMCU clone too.

  2. ThorC

    Hi everybody! I've found a way to get it to work after reading a lot of issues online.

    I have the newest Echo Dot, purchased it less than a week ago from Amazon.

    Use the latest version of fauxmoESP. Then, you'll want to go into your Board Managers in the Arduino IDE, and remove the esp8266 boards, and reinstall version 2.3.0.

    Doing this, the Echo Dot is able to natively find it without requiring the installation of the WeMo skill.

  3. SaucedCowboy

    I got the latest version of fausmoESP, removed the esp8266 boards, installed board version 2.3.0, compiled and ran the fauxmoESP_Basic sketch. The sketch does log onto my network but my Amazon Echo V2 will not find the “switch one” that the sketch creates. It just keeps repeating “[MAIN] Free heap: 46472 bytes” in the serial monitor and never responds to the probes from the Amazon Echo.

  4. Jezz

    @SaucedCowboy

    Try rebooting your Echo, if that don't work, Try resetting the echo. I found some times after many attempts to discover devices it failed to even discover Philips hue stuff until i reset it.

    Bibi's fixed worked perfectly on my Echo plus (Gen 2)

  5. ejlane

    Nothing else was working for me. I had a heck of a time going round and round with many different versions and trying all kinds of things. Finally resorted to resetting the Echo (first gen, I'm pretty sure) and after another couple tries, it showed up and is now working perfectly! Thanks!!!

  6. Jezz

    @ejlane. 1st Gen Dot has 2 buttons and a volume ring, 2nd Gen Dot has 4 buttons and no volume ring. 1st Gen Echo, is all plastic with a volume ring. 2nd Gen Echo usually has a fabric sides and no volume ring, Echo plus (which is a Gen 2) looks like the Gen 1 Echo with a volume ring, but has the power socket on the back, with an 3.5mm Audio out jack and a built in Zigbee (Philips Hue) hub, The Gen 1 Echo has the power socket underneath with no 3.5mm Audio out and no built in Zigbee hub.

    Hope this helps...

  7. György Fenyvesi

    I purchased a Zolo Halo. This is the Anker version of Echo Dot, Amazon doesn't deliver to Hungary where I live. The exact differences between Echo Dot and Zolo is not known.

    Anyway the fauxmoESP program doesn't recognize the fauxmo. (Arduino esp8266 2.3.0). I checked the local network traffic and didn't see any discovery action related to this device. I have the feeling that it is controllable only through skills. (Skills work.) To check the idea I tried discovery through browser and see a suspicious content in the outgoing traffic: SUPPORTS_CONNECTED_HOME_CLOUD_ONLY If I understand it correctly, then the local discovery is not able to work.

    It would be good to know what is this parameter in case of working and not-working other devices. If anybody would be so kind to check I'd be happy.

    Thanks. George

    Firefox, Web Console, Network, one of the GETs The whole capability list:

    accountName George's Halo appDeviceList [] capabilities […] 0 ### # SUPPORTS_CONNECTED_HOME_CLOUD_ONLY ### #

    1 SLEEP

    2 GOLDFISH 3 AUDIBLE 4 TUNE_IN 5 CHANGE_NAME 6 PEONY 7 TIMERS_AND_ALARMS 8 PERSISTENT_CONNECTION 9 I_HEART_RADIO 10 KINDLE_BOOKS 11 AUDIO_PLAYER 12 AMAZON_MUSIC 13 DEREGISTER_DEVICE 14 REMINDERS ### charging null clusterMembers [] deviceAccountId AIJNT1E6U65QB deviceFamily UNKNOWN deviceOwnerCustomerId A34LRNB6EAPENZ deviceType A1P31Q3MOWSHOD deviceTypeFriendlyName Halo essid null language null macAddress null online false parentClusters [] postalCode null registrationId null remainingBatteryLevel null serialNumber 45a317f3d53f4ca4bf3b3a95293b9db0 softwareVersion 0

  8. Martin Doubek

    I have tried using version 2.4.0 and 2.4.2 together with 2.3.0 version of Arduino Core. Neither did work with my Echo Gen2. It is the only device I have, so I hope it can be fixed and will be fixed soon.

  9. Mayur Patel

    Hi frnds.. i was also trying the same thing with my Echo dot v2. but was not showing my devices. after as i read above @bibi and all others, i just downgraded my library from 2.4.0 to 2.3.0 and thats all... recompiled and on the next move i saw my devices in alexa app.. i dont know what makes it incompatible with the new 2.4.0. That we have to find out..

  10. Mopheus

    Hi, I've been gettings Issue #35 (that has been mark as duplicated and redirected to this one, but I'm using a GEN 1 Echo DOT... so, is it possible this is expanding to all generations ?

    In my case my main problem is that after some random times, Alexa just say's SWITCH ONE is not responding, you wait about 10-20 seconds, try again and works perfectly fine.

    I have created an android APK to work with this library, that basically sends SOAP messages to the ESP and the weird thing is that when Alexa says the switch is not responding, the APK works perfectly fine... so it's something with the Alexa - Fauxmo relationship I think (not an specialist, just wondering).

    Thanks.

  11. Mopheus

    Not sure if this can help, but this is the link of a Fauxmo for RPi3 (Python) version that is a fork of the original Fauxmo and it's currently working fine with Gen2 devices (although I actually have problems with Gen1 too). I've already asked the owner for some info, but I'm not good at this so, maybe someone smarter can find a solution looking there.

    https://github.com/n8henrie/fauxmo

  12. uDude

    @Mopheus, that python lib is a more complete SSDP implementation. I only have gen 1 devices or I'd sniff the traffic and find the issue. This library may be missing (ok is in at least the instance I'll quote) some basic error checking.

    Where _udp.beginMulticast() is called to start a multicast igmp group for SSDP it returns 1 on success and 0 failure. These return values are not checked.

    A quick glance at that section of the code tells me that two people with differing philosophies of where to start the multicast group have been used. One person does it in the constructor and the other in the begin function. This code could use someone overseeing consistency to make it easier to update (and no I am not volunteering and I am generally not in a position to perform the function successfully due to an extended illness leading to a seriously messed up brain much of the time -- you caught me on a relatively good couple of hours right now.)

    Enjoy --- hopefully someone will implement some #DEBUG statements to serial for you to test with and discover where you are not reaching in the code as well as add in missing error checking.

    The Arduino UI will allow you to set DEBUG at compile time so you can control turning it on when you want [normally off is the recommendation].

  13. fdfdsfsd fdfdsfds

    Doesn't work in 2.4.2 or 2.3.0 with echo dot and echo gen 2 .

    In 2.3.0 I have some trace in debug console like this :

    HTTP/1.1 200 OK
    CACHE-CONTROL: max-age=86400
    DATE: Mon, 22 Jun 2015 17:24:01 GMT
    EXT:
    LOCATION: http://192.168.1.52:52000/setup.xml
    OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
    01-NLS: 4445569995DF00
    SERVER: Unspecified, UPnP/1.0, Unspecified
    X-User-Agent: redsonic
    ST: urn:Belkin:service:basicevent:1
    USN: uuid:Socket-1_0-4445569995DF00::urn:Belkin:service:basicevent:1
    

    in 2.4.2 I have nothing shown.

    Thank for your library

  14. Patrick Harrer

    I have tested a bit with an eco dot gen 2 and version 2.4.2 of the library and came to the conclusion:

    • You have to downgrade the Arduino Core for the esp8266 to version 2.3.0

    When I used version 2.4.0 or 2.4.1 of the Arduino Core the eco dot wouldn't detect any smart home devices but when the devices were already detected they still work

    • onGetState() has to be defined correctly

    When I defined onGetState() incorrectly the eco dot only detected the last virtual device. I think the eco dot checks the device state when it detects it and when there is no or a false respond the eco dot ignores it.

    I also include my modified example sketch

    #include <Arduino.h>
    
    #ifdef ESP32
        #include <WiFi.h>
    #else
        #include <ESP8266WiFi.h>
    #endif
    
    #include "fauxmoESP.h"
    #include "credentials.h"
    
    #define SERIAL_BAUDRATE                 115200
    
    fauxmoESP fauxmo;
    
    bool testswitch[3]= {false, false, false};
    
    void wifiSetup() {
    
    // -----------------------------------------------------------------------------
    // Wifi
    // -----------------------------------------------------------------------------
    
      // Set WIFI module to STA mode
      WiFi.mode(WIFI_STA);
    
      // Connect
      Serial.printf("Verbindungs zu %s wird aufgebaut ", WIFI_SSID);
      WiFi.begin(WIFI_SSID, WIFI_PASS);
    
      // Wait
      while (WiFi.status() != WL_CONNECTED) {
        Serial.print(">");
        delay(100);
      }
      Serial.println("");
    
      // Connected!
      Serial.printf("Verbunden! SSID: %s, IP Adresse: %s\n", WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());
    
    }
    
    
    void callbackSetState(unsigned char device_id, const char * device_name, bool state){
       Serial.printf("[MAIN] Device #%d (%s) state: %s\n", device_id, device_name, state ? "ON" : "OFF");
       testswitch[device_id] = state;
      }
    
    bool callbackGetState(unsigned char device_id, const char * device_name){
      return testswitch[device_id];
    }
    
    
    void setup() {
    
      // Init serial port and clean garbage
      Serial.begin(SERIAL_BAUDRATE);
      Serial.println();
      Serial.println("Nach dem Verbinden, sage 'Alexa, schalte <Gerät> 'an' oder 'aus'");
    
    
      // Wifi
      wifiSetup();
    
      // You can enable or disable the library at any moment
      // Disabling it will prevent the devices from being discovered and switched
      fauxmo.enable(true);  
    
      // Geräte Definieren
      fauxmo.addDevice("switch one");   //ID0
      fauxmo.addDevice("switch two");   //ID0
      fauxmo.addDevice("switch three"); //ID0
    
      // Calback
        // fauxmoESP 2.0.0 has changed the callback signature to add the device_id,
        // this way it's easier to match devices to action without having to compare strings.
      fauxmo.onSetState(callbackSetState);
      fauxmo.onGetState(callbackGetState);
    }
    
    
    void loop() {
    
      // Since fauxmoESP 2.0 the library uses the "compatibility" mode by
      // default, this means that it uses WiFiUdp class instead of AsyncUDP.
      // The later requires the Arduino Core for ESP8266 staging version
      // whilst the former works fine with current stable 2.3.0 version.
      // But, since it's not "async" anymore we have to manually poll for UDP
      // packets
      fauxmo.handle();
    }
    
  15. Tom Broeger

    Hi, i did some research on the Issue with Echo V2 Devices. I enabled debugging in fauxmo and it seems that the GetState and SetState Messages sent by the Echo are getting cut off. See this Log, that is what Echo is sending after i say "Switch on Lamp":

    [FAUXMO] Client #0 connected [FAUXMO] Device #0 /upnp/control/basicevent1

    This is the answer of the Echo V2:

    POST /upnp/control/basicevent1 HTTP/1.1 SOAPACTION: "urn:Belkin:service:basicevent:1#SetBinaryState" Content-Type: text/xml; charset="utf-8" Accept: User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.1.1; AEORD Build/LVY48F) Host: 192.168.0.18:52000 Connection: Keep-Alive Accept-Encoding: gzip Content-Length: 299

    <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:servic

    (As you can see this ends with 'urn:Belkin:servic' <---the rest is missing!!!!! Echo says 'Content-Length: 299' but we get only 215!!)

    [FAUXMO] Client #0 disconnected

    But with an Echo Dot V2 everything is fine:

    [FAUXMO] Client #0 connected [FAUXMO] Device #0 /upnp/control/basicevent1

    This is the answer of the Echo Dot V2:

    POST /upnp/control/basicevent1 HTTP/1.1 SOAPACTION: "urn:Belkin:service:basicevent:1#SetBinaryState" Content-Type: text/xml; charset="utf-8" Accept: User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.1.1; AEORD Build/LVY48F) Host: 192.168.0.18:52000 Connection: Keep-Alive Accept-Encoding: gzip Content-Length: 299

    <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetBinaryState xmlns:u="urn:Belkin:service:basicevent:1"><BinaryState>1</BinaryState></u:SetBinaryState></s:Body></s:Envelope>

    [FAUXMO] Client #0 disconnected

    As you can see nothing is cut off and it works fine. That cut off issue has nothing to do with the fauxmo library!!!! The error must be somewhere in the 'ESPAsyncTCP' library as the async client used in fauxmo already sends back the cut off data!! I wasted hours on checking the ESPAsyncTCP lib, but thats out of my skill. So if someone is interested, that may be a hint to go further.

    PS: On the ESP32 with the corresponding 'AsyncTCP' lib thre is also no cut off and everyting is working.

  16. ivan

    Using Arduino IDE, changing ESP8266 version to 2.3.0 worked for my recently purchased (July 2018) Echo Dot (2nd Generation). Previously using the latest (i think 2.4.x) did not allow me to discover the device. Using a NodeMCU 1.0.

  17. Thibault Marrannes

    My Echo gen 2 still can't find devices. I'm using version 3.0.0 and ran the example code on a Nodemcu. Anything we need to do? Does it still only work with ESP8266 version set to 2.3.0?

  18. RanTalbott

    Also using Wemos D1 mini and Echo Dot Gen 2. Arduino IDE 1.8.4, ESP8266 2.3.0

    I've been trying for almost a year, off and on, to get this to work. back in January, I got some intermittent results: devices would come and go. Sometimes they would work even though the didn't show up in the Android Alexa app. Sometimes they wouldn't.

    More recently, I've tried versions 2.3.0, 2.4.4 (or maybe 2.4.5: the version numbers in the source files are inconsistent) and 3.0.0.

    Neither the Dot nor the Alexa app can discover either the basic examples or my own code. Neither can gssdp-discover on Linux. The debug messages on the D1 never show it got any kind of request during discovery attempts. With 3.0.0, I do sometimes get debug messages saying it's responding to M-SEARCH requests, but I can't tell whether they're from the Linux gupnp-universal-cp app, or from the Belkin router, which also does UPNP queries at seemingly-random times.

    I've tried doing some WIreshark captures of various apps doing discovery, but it appears that it's not capturing everything on the WiFi like it does on Ethernet.

    An suggestions for debug tools (preferably Linux-based) would be appreciated.

  19. Carlos Yz

    I was using esp8266 core 2.3.0 and fauxmoESP 2.4.0 with Bibi´s patch and it was ok. The only way it worked.

    I have only an Echo Dot 2nd Gen.

    Then I had a clue at #58, thanks to Andrew D. When I set Tools/"IwIP variant" to "v1.4 Higher Bandwidth" with core 2.4.2, all examples worked to me. I tested fauxmoESP 2.4.4 and 3.0.2 with original examples, changing just credentials.h and uploaded it. Discovery, turns on/off and "set light one to fifty", etc. worked fine.

    I used IDE 1.8.5, generic ESP-12E as "NodeMCU 1.0" board, Witty USB-Serial base.

    And sorry for my English.

  20. Log in to comment