vintlabs / fauxmoESP

Add voice control of your ESP32 and ESP8266 devices using Amazon Alexa
MIT License
379 stars 70 forks source link

ESP8266/ESP32 Not Found by Alexa #120

Closed lightbulb14 closed 3 years ago

lightbulb14 commented 3 years ago

Hi All, I'm trying to get FauxmoESP running on an ESP8266 with my Alexa and am having some troubles. The sample sketch compiles and appears to run alright (it connects to my home network) but when I try to discover via the Alexa app no new devices are found. Below is my configuration:

Alexa: Amazon Fire TV Cube (2nd Gen I think), connected to router via ethernet cable. Board: Adafruit Huzzah ESP8266 Breakout, connected to 2.4GHz WiFi Arduino IDE 1.8.13 (Windows Store 1.8.42.0) ESP8266 Core: 2.4.2 (also tried 2.7.4 with no luck) FauxmoESP V3.1.1 ESPAsyncTCP current as of 10/26/2020 lwIP variant set to "v1.4 Higher Bandwidth" For code, I started the sample fauxmoESP_Basic. I added #define DEBUG_FAUXMO Serial and removed 3/5 devices based on other peoples issues. Below is the serial output.

SDK:2.2.1(cfd48f3)/Core:2.4.2/lwIP:1.4.0rc2/BearSSL:6d1cefc      
[WIFI] Connecting to WiFi_SSID scandone      
..scandone      
state: 0 -> 2 (b0)      
state: 2 -> 3 (0)      
state: 3 -> 5 (10)      
add 0      
aid 4      
cnt       
connected with WiFi_SSID, channel 11      
dhcp client start...      
..................ip:192.168.1.241,mask:255.255.255.0,gw:192.168.1.1      
[WIFI] STATION Mode, SSID: WiFi_SSID, IP address: 192.168.1.241      
[MAIN] Free heap: 48464 bytes      
pm open,type:2 0      
[MAIN] Free heap: 47944 bytes      
[MAIN] Free heap: 47944 bytes      
[MAIN] Free heap: 47944 bytes      
[MAIN] Free heap: 47944 bytes

Thank you for any advice, Lightbulb14

Source Code:

#include <Arduino.h>
#ifdef ESP32
    #include <WiFi.h>
#else
    #include <ESP8266WiFi.h>
#endif
#include "fauxmoESP.h"

// Rename the credentials.sample.h file to credentials.h and 
// edit it according to your router configuration
#include "credentials.h"

fauxmoESP fauxmo;

// -----------------------------------------------------------------------------

#define SERIAL_BAUDRATE     115200

#define LED_YELLOW          4
#define LED_GREEN           5

#define ID_YELLOW           "yellow lamp"
#define ID_GREEN            "green lamp"

#define DEBUG_FAUXMO Serial

// -----------------------------------------------------------------------------

// -----------------------------------------------------------------------------
// Wifi
// -----------------------------------------------------------------------------

void wifiSetup() {

    // Set WIFI module to STA mode
    WiFi.mode(WIFI_STA);

    // Connect
    Serial.printf("[WIFI] Connecting to %s ", WIFI_SSID);
    WiFi.begin(WIFI_SSID, WIFI_PASS);

    // Wait
    while (WiFi.status() != WL_CONNECTED) {
        Serial.print(".");
        delay(100);
    }
    Serial.println();

    // Connected!
    Serial.printf("[WIFI] STATION Mode, SSID: %s, IP address: %s\n", WiFi.SSID().c_str(), WiFi.localIP().toString().c_str());

}

void setup() {

    // Init serial port and clean garbage
    Serial.begin(SERIAL_BAUDRATE);
    Serial.println();
    Serial.println();

    // LEDs
    pinMode(LED_YELLOW, OUTPUT);
    pinMode(LED_GREEN, OUTPUT);

    digitalWrite(LED_YELLOW, LOW);
    digitalWrite(LED_GREEN, LOW);

    // Wifi
    wifiSetup();

    // By default, fauxmoESP creates it's own webserver on the defined port
    // The TCP port must be 80 for gen3 devices (default is 1901)
    // This has to be done before the call to enable()
    fauxmo.createServer(true); // not needed, this is the default value
    fauxmo.setPort(80); // This is required for gen3 devices

    // You have to call enable(true) once you have a WiFi connection
    // You can enable or disable the library at any moment
    // Disabling it will prevent the devices from being discovered and switched
    fauxmo.enable(true);

    // You can use different ways to invoke alexa to modify the devices state:
    // "Alexa, turn yellow lamp on"
    // "Alexa, turn on yellow lamp
    // "Alexa, set yellow lamp to fifty" (50 means 50% of brightness, note, this example does not use this functionality)

    // Add virtual devices
    fauxmo.addDevice(ID_YELLOW);
    fauxmo.addDevice(ID_GREEN);

    fauxmo.onSetState([](unsigned char device_id, const char * device_name, bool state, unsigned char value) {

        // Callback when a command from Alexa is received. 
        // You can use device_id or device_name to choose the element to perform an action onto (relay, LED,...)
        // State is a boolean (ON/OFF) and value a number from 0 to 255 (if you say "set kitchen light to 50%" you will receive a 128 here).
        // Just remember not to delay too much here, this is a callback, exit as soon as possible.
        // If you have to do something more involved here set a flag and process it in your main loop.

        Serial.printf("[MAIN] Device #%d (%s) state: %s value: %d\n", device_id, device_name, state ? "ON" : "OFF", value);

        // Checking for device_id is simpler if you are certain about the order they are loaded and it does not change.
        // Otherwise comparing the device_name is safer.

        if (strcmp(device_name, ID_YELLOW)==0) {
            digitalWrite(LED_YELLOW, state ? HIGH : LOW);
        } else if (strcmp(device_name, ID_GREEN)==0) {
            digitalWrite(LED_GREEN, state ? HIGH : LOW);
        } 

    });

}

void loop() {

    // fauxmoESP uses an async TCP server but a sync UDP server
    // Therefore, we have to manually poll for UDP packets
    fauxmo.handle();

    // This is a sample code to output free heap every 5 seconds
    // This is a cheap way to detect memory leaks
    static unsigned long last = millis();
    if (millis() - last > 5000) {
        last = millis();
        Serial.printf("[MAIN] Free heap: %d bytes\n", ESP.getFreeHeap());
    }

    // If your device state is changed by any other means (MQTT, physical button,...)
    // you can instruct the library to report the new state to Alexa on next request:
    // fauxmo.setState(ID_YELLOW, true, 255);

}
cyyamazaki commented 3 years ago

My echo dots 2nd gen also are not detecting the esp8266. Last week they were ok.

Since the last update, last week, 658656720, detection stoped to work, but i tried the 2.4.4 version and it is ok (wemo version).

I'm brazilian and my echo dots can't be hacked to support portuguese anymore, since the same update.

The detected esps are still working, but i must not exclude them, anymore.

ddweber456 commented 3 years ago

My echo dot 3rd gen and 2nd gen have also stopped discovering new Alexa devices with my ESP8266 D1 mini 12F. I started seeing issues about 3 weeks ago, sorry I don't remember the exact time I first saw the problem. Previously echo discovered devices still worked just fine and appeared to be very stable. It has been just the new builds and devices that Alexa refuses to discover.

Using 2.7.1 FauxmoESP 3.1.1 (also saw the same issue with 3.1.0)

I have found a trick to get Alexa to discover the new devices with 3.1.1. If I power off/on my echo dot 3rd gen, alexa will discover the new devices. In fact, alexa discovered old smart home devices that were at one time connected to my network but at the time of the latest discovery, after the power off/on. Those devices at the time of the latest discovery were not connected to my network and apparently were never REMOVED from the Alexa app. The echo will only do 1 successful discovery per power off/on cycle.

I have not tried the power off/on with the echo 2nd gen.

Obviously this is not a solution but I am hoping this might help someone smarter than me figure out what is going on.

Let me know if I can provide additional information.

Freddy0031 commented 3 years ago

Confirming 2nd gen power on / off works, too...

I have had a similar problem. My code was running perfectly on ESP8266 and using FauxmoESP 3.1.0 some 7 months ago. Didn't do the device discovery for a while and was unable to get it work. It seems the FauxmoESP library was running fine as I was able to control ESP devices with the android app called Lampshade, but Alexa wouldn't discover any new devices.

It worked for me when removing all devices and unplugging my echo dot. After reboot, my echo dot 2nd gen discovered the devices and is able to control them perfectly. I can confirm what ddweber said above. I got some old devices listed, too, for whatever reason, but the main point is that it seems the echo will only do 1 successful discovery per power off/on cycle.

pvint commented 3 years ago

I can confirm that I'm having issues with this now too. Working on it and will report back.

pvint commented 3 years ago

(Edit: This is on ESP32 - I haven't tested on ESP8266, but it appears to be the same issue)

I've been experimenting a bit, and it seems as though the Echo does not like the response from Fauxmo, presently. (gen 2 and gen 3 behaving the same)

I'll have to look at this more tomorrow. Leaving a debug dump from a discover with one fauxmo device. (Edit: Discover was run from a Gen 2, in case it turns out to matter)

Paul

Debug dump of discovery ``` [MAIN] Free heap: 255768 bytes [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.6:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.6:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.6:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.6:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.6:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.6:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: ssdp:all MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.9:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.9:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] UDP packet received M-SEARCH * HTTP/1.1 HOST: 239.255.255.250:1900 ST: upnp:rootdevice MAN: "ssdp:discover" MX: 3 [FAUXMO] Responding to M-SEARCH request [FAUXMO] UDP response sent to 192.168.1.9:50000 HTTP/1.1 200 OK EXT: CACHE-CONTROL: max-age=100 LOCATION: http://192.168.1.15:80/description.xml SERVER: FreeRTOS/6.0.5, UPnP/1.0, IpBridge/1.17.0 hue-bridgeid: cc50e3b7a5d8 ST: urn:schemas-upnp-org:device:basic:1 USN: uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8::upnp:rootdevice [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /description.xml HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /description.xml [FAUXMO] Handling /description.xml request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: text/xml Content-Length: 763 Connection: close 10http://192.168.1.15:80/urn:schemas-upnp-org:device:Basic:1Philips hue (192.168.1.15:80)Royal Philips Electronicshttp://www.philips.comPhilips hue Personal Wireless LightingPhilips hue bridge 2012929000226503http://www.meethue.comcc50e3b7a5d8uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8index.html [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights [FAUXMO] Handling list request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: application/json Content-Length: 270 Connection: close {"1":{"type":"Extended Color Light","name":"yellow lamp","uniqueid":"cc50e3b7a5d8-1","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"}} [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights/1 HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights/1 [FAUXMO] Handling list request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: application/json Content-Length: 264 Connection: close {"type":"Extended Color Light","name":"yellow lamp","uniqueid":"cc50e3b7a5d8-1","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"} [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights [FAUXMO] Handling list request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: application/json Content-Length: 270 Connection: close {"1":{"type":"Extended Color Light","name":"yellow lamp","uniqueid":"cc50e3b7a5d8-1","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"}} [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /description.xml HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /description.xml [FAUXMO] Handling /description.xml request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: text/xml Content-Length: 763 Connection: close 10http://192.168.1.15:80/urn:schemas-upnp-org:device:Basic:1Philips hue (192.168.1.15:80)Royal Philips Electronicshttp://www.philips.comPhilips hue Personal Wireless LightingPhilips hue bridge 2012929000226503http://www.meethue.comcc50e3b7a5d8uuid:2f402f80-da50-11e1-9b23-cc50e3b7a5d8index.html [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights [FAUXMO] Handling list request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: application/json Content-Length: 270 Connection: close {"1":{"type":"Extended Color Light","name":"yellow lamp","uniqueid":"cc50e3b7a5d8-1","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"}} [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights/1 HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights/1 [FAUXMO] Handling list request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: application/json Content-Length: 264 Connection: close {"type":"Extended Color Light","name":"yellow lamp","uniqueid":"cc50e3b7a5d8-1","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"} [MAIN] Free heap: 252436 bytes [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights HTTP/1.1 Host: 192.168.1.15 Accept: */* Content-Type: application/json [FAUXMO] isGet: true [FAUXMO] URL: /api/2WLEDHardQrI3WHYTHoMcXHgEspsM8ZZRpSKtBQr/lights [FAUXMO] Handling list request [FAUXMO] Response: HTTP/1.1 200 OK Content-Type: application/json Content-Length: 270 Connection: close {"1":{"type":"Extended Color Light","name":"yellow lamp","uniqueid":"cc50e3b7a5d8-1","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"}} [FAUXMO] Client #0 disconnected [MAIN] Free heap: 255420 bytes [MAIN] Free heap: 255420 bytes ```
pvint commented 3 years ago

I got mine to work this morning on a Gen 2 Echo Dot - I have not tested heavily yet, but I had noticed that a couple times when I discovered it found an old device that was not even online, so I went to Amazon and deleted device history, here:

Amazon ca: Manage Your Content and Devices - Google Chrome_067

Please go to https://www.amazon.ca/hz/mycd/myx#/home/alexaPrivacy/deviceHistory (substitute .com .de or whatever in the URL for your location) and try deleting smart home devices history and retry discovery. (I don't know if it's relevant, but I rebooted my Echo before trying discovery)

Let me know Paul

ddweber456 commented 3 years ago

Could this have something to do with the EOS (End Of Support) for the Hue Bridge V1? https://www.philips-hue.com/en-gb/support/legal/end-of-support-policy#3

It looks like the Hue Bridge V2 is still supported, with no EOS at this time. Can FauxmoESP use V2? https://www.theverge.com/circuitbreaker/2020/3/6/21167813/philips-hue-bridge-hub-internet-connectivity-discontinued-cloud-updates

ddweber456 commented 3 years ago

@pvint , have you had any luck figuring out fix for this? Can I assist with testing or anything?

pvint commented 3 years ago

@ddweber456 I sure can use some help testing! Can you let me know if my experience from two posts up works for you? ;)

Anyone else too - I really would love some feedback on whether that works for others. Due to a recent move I'm not using fauxmo "in production" at the moment, but testing tells me that it fixed the issue for me, and I would love confirmation.

ddweber456 commented 3 years ago

@pvint Thanks for the reply. I did try the delete History in the Alexa Amazon app. That by itself did not make the discover new devices work. I can confirm that the power off/on of the Echo dot Gev3 does allow Alexa to find new devices but only one time per off/on cycle. I think it just a fluke that that the discover devices still works at all.

Maybe the real issue is the End of Support (EOS) for the Philip Hue Bridge 2012 the code is emulating. If I'm reading the 'templates.h' correctly, the JSON in the FAUXMO_DESCRIPTION_TEMPLATE[] is using the modelName and modelNumber of the Hue Bridge V1

"<modelName>Philips hue bridge 2012</modelName>" "<modelNumber>929000226503</modelNumber>"

The EOS for that Bridge was announced April 29, 2019 and was followed on by April 30, 2020 with no more updates to the Hue Bridge V1. See my posts of 2 days ago for the links to the EOS articles. About that time, April 2020, Amazon Alexa came out with a Gen 4 release with all their updates and just maybe FauxmoESP and the Hue Bridge V1 suffered in the aftermath.

FauxmoESP is not the only Library having this issue right now. Aircoookie/Espalexa https://github.com/Aircoookie/Espalexa is experiencing the same issues of NOT discovering new devices. It was thanks to @seriouz on Aircoookie/Espalexa that brought the EOS issue to my attention with his post on March 9, 2020.

Maybe we can use the Hue Bridge V2? I suspect the JSON format for the V2 is different than the V1.

I'm not going to be much help with the code, but I would be happy to help any other way.

cyyamazaki commented 3 years ago

I´m not a good developer. But i was looking for hue v2 information and searching for "\<modelName>Philips hue bridge" i found this project in python. I'll study this a little but I think there's a lot of better programmers than me here :): https://github.com/marcelveldt/hass_emulated_hue

cyyamazaki commented 3 years ago

@ddweber456 I sure can use some help testing! Can you let me know if my experience from two posts up works for you? ;)

Anyone else too - I really would love some feedback on whether that works for others. Due to a recent move I'm not using fauxmo "in production" at the moment, but testing tells me that it fixed the issue for me, and I would love confirmation.

On/Off procedure didn't work for me. Neither clean the History on Alexa App.

ddweber456 commented 3 years ago

Looking for some help.

This is going to sound a little crazy. But here it goes.

After power off/on (reboot) of my Echo Dot Gen3, if I wait more than 30 sec to start the discover new devices, the discovery fails. If I start the discover new devices within 30 sec of Echo reboot, the discover work every time.

If someone else could validate this strang finding that would be GREAT.

Freddy0031 commented 3 years ago

@ddweber456 Yes, timing seems to make a difference. I can confirm, it discovers after on/off only if doing discovery straight after reboot. After deleting all devices, and off/on, my Echo Dot 2G first round of discovery only detects the other Echos, but doesn't capture any response from FauxmoESP. Subsequently, a second round of off/on and quick discovery then picks up responses from FauxmoESP, but missing 1 device and still getting old devices.

Regarding the EOS for the Hue Bridge v1 back in April. This makes much sense to me and seems in line with timing of this problem for me. Things worked perfectly fine back in March and now my (unchanged) code causes issues with discovery. There must have been some change in the Alexa software during this time. However, my Android app Lampshade picks up all devices correctly and still works perfect with FauxmoESP.

@pvint Thanks for the idea with the smart home device history. I tried deleting all devices, deleting the history and doing the discovery. Still it lacks one new device and brings back some old device names. I feel less disturbed by the old devices than by not being able to discover the new ones.

I'm happy to do more testing or share insights, but my programming skills are very limited unfortunately.

lightbulb14 commented 3 years ago

I'm new to the fauxmoESP/Alexa stuff and have never got it working. I enabled Smart Home by Sinet Technologies in Alexa, but is there any particular Smart Home Skill that needs to be enabled? I have a LIFX bulb that Alexa controls okay. I've tried going to Devices>Add Device>Other>Discover Devices but this has not worked. I've also asked Alexa verbally to "Discover new devices" and this has not worked either. I've tried both of these within 30 seconds of powering on. I also tried adding the fauxmoESP via the "Phillips Hue V1 bridge (Circular shape)" hub option with no luck.

I'd be glad to help test some more, but I'm a bit uneducated at the moment.

Thank you, Lightbulb.

Freddy0031 commented 3 years ago

@lightbulb14 , you don't need any alexa smart home skill to make alexa discover fauxmoesp/it's Hue Bridge. Just discover devices should be sufficient. Lately, it seems to discover only after reboot and by quickly triggering the discovery - at least for some of us here. You may want to give it a try to first delete your smarthome devices, then reboot and discover - potentially repeating the reboot and discover again. Once discovered it works fine, but it seems alexa discovery became a bit tricky recently.

pvint commented 3 years ago

I finally got a good chance to dig into this this morning, and I think we have something:

It seems as though Alexa isn't liking the "uniqueid" string we are sending (which is just the MAC of the ESP device with the device number appended, ie: AABBCCDDEEFF-01), and simply stripping the "-01" off seems to work.

I've applied the change in the https://github.com/vintlabs/fauxmoESP/tree/discoveryIssue branch, so please test it out and let me know if it's working for you. (Edit: The discoveryIssue branch has been merged to master)

For reference, the changes are:

In fauxmoESP.cpp, change line 127 from:

device.name, mac.c_str(),

To:

device.name, mac.substring(6).c_str(), id,

and change templates.h line 46 from:

"\"uniqueid\":\"%s-%d\","

To:

"\"uniqueid\":\"%s%06d\","

(EDIT: Updated the changes to reflect the newer commit)

I have gone through a few cycles of deleting and re-adding devices, testing control etc, and it seems to be working fine so far, however further testing is needed. Also note: I have only tested with Gen 2 so far, and I did not need to reboot the device.

mcspr commented 3 years ago

I got a déjà vu from reading this…

Is this related to the issue & proposed changes from espalexa described here? https://github.com/xoseperez/espurna/issues/1904#issuecomment-529957777 https://github.com/Aircoookie/Espalexa/commit/9d57e2cbc706c503e71acc651ed47e6e09496614#diff-60d0a10c47ca0f0800ce9f6773faec4aR166

Resulting string is constructed as: uint32_t id = (mac[3] << 20) | (mac[4] << 12) | (mac[5] << 4) | (idx & 0xF);

Where the changed replaced uniqueid number with: mac last 3 bytes -dash- deviceId+1 (also note it’s encoded as decimal)

Not using Alexa to test / verify this, ESPurna just happens to use fauxmoESP since it was Xose’s project as well 😊

pvint commented 3 years ago

@mcspr Thanks for pointing that out. It actually concurs with what I was thinking... that the "uniqueid" not actually being unique could cause other issues.

I tested using the MAC with the device number (ie: "%s%d", without the "-") and it was still presenting discovery issues. I will change it to use the last the octets of the MAC as pointed out above.

pvint commented 3 years ago

I have changed it to now use the last 3 bytes of the MAC plus a 6 digit device ID (it seems to only work with at 12 digit uniqueid).

Example: The MAC of my ESP is a4cf123373b8, so the first device has uniqueid of 3373b8000000, the second 3373b8000001, etc

lightbulb14 commented 3 years ago

Thanks for the work everyone, but my Alexa is still unable to discover the fauxmoESP device. I downloaded the discoveryIssue branch and replaced the fauxmoESP.cpp and templates.h in my Arduino libraries folder with ones from the discoveryIssue download. Could me using an Amazon Fire Cube make a difference?

Also, the changes that pvint listed in the comment for templates.h should be changed to "\"uniqueid\":\"%s\","

pvint commented 3 years ago

Thanks for the work everyone, but my Alexa is still unable to discover the fauxmoESP device. I downloaded the discoveryIssue branch and replaced the fauxmoESP.cpp and templates.h in my Arduino libraries folder with ones from the discoveryIssue download. Could me using an Amazon Fire Cube make a difference?

@lightbulb14 I wouldn't think that using the fire cube would be an issue, but I don't have one to test.

Also, the changes that pvint listed in the comment for templates.h should be changed to "\"uniqueid\":\"%s\","

Thanks for pointing that out - I've updated that comment to reflect the latest change (commit eb9a055)

I'm curious to wait and see if others are having success with this change before we dig into your particular case too much, just in case it's an unrelated issue.

Freddy0031 commented 3 years ago

@pvint - the code you placed in the discoveryissue branch works for me. Great. Many thanks. Discovery worked without alexa reboot and all devices got discovered now. Will do a bit more testing, but wanted to give quick feedback and send my thanks to you!

cyyamazaki commented 3 years ago

@pvint - Basic example worked with discoveryIssue branch, only on Chinese Wemos D1 Mini. For Esp01s didn´t. 2nd Gen Echo Dot, Iwp 1.4 HB checked, both 2.4G, same wifi router, Board "Generic Esp8266 Module" for both tests. I tried several times with Esp01s without success. So, I switched to "Wemos" and it worked in the 1st try. I´ll keep testing.


I saw several lines like this in Wemos Debug. In Esp01, i noted once, just one time:

09:54:54.799 -> [FAUXMO] Client #0 connected 09:54:54.799 -> [FAUXMO] Handling /description.xml request 09:54:54.799 -> [FAUXMO] Client #0 disconnected 09:54:54.799 -> [FAUXMO] Client #0 connected 09:54:54.799 -> [FAUXMO] Handling list request 09:54:54.848 -> [FAUXMO] Client #0 disconnected 09:54:54.894 -> [FAUXMO] Client #0 connected 09:54:54.894 -> [FAUXMO] Handling list request 09:54:54.894 -> [FAUXMO] Client #0 disconnected 09:54:54.941 -> [FAUXMO] Client #0 connected 09:54:54.941 -> [FAUXMO] Handling list request 09:54:54.941 -> [FAUXMO] Client #0 disconnected 09:54:54.988 -> [FAUXMO] Client #0 connected 09:54:54.988 -> [FAUXMO] Handling list request 09:54:55.035 -> [FAUXMO] Client #0 disconnected

ddweber456 commented 3 years ago

In fauxmoESP.cpp, change line 127 from:

device.name, mac.substring(6).c_str(), id, To:

device.name, mac.c_str(),

@pvint what should it be? The original line is still in the discoveryissue branch fauxmoESP line 127.

pvint commented 3 years ago

@pvint what should it be? The original line is still in the discoveryissue branch fauxmoESP line 127.

I had them reversed in my comment above - sorry about that! I've fixed it, and the line should be:

device.name, mac.substring(6).c_str(), id,
pvint commented 3 years ago

I've merged the changes to master branch, and more feedback is much appreciated!

Paul

Freddy0031 commented 3 years ago

I'm running into discovery issues again. Earlier this afternoon, Alexa couldn't control one of my devices due to not having a unique name (for whatever reason). I decided to delete my devices and now I struggle discovering them again. Will do some more testing and revert.

pvint commented 3 years ago

@Freddy0031 Thanks for the info. I haven't had time for a proper test over the weekend, but I'll be doing some tomorrow.

And I'll repeat this: Anyone else's experience on this potential fix is appreciated!

Paul

sid4sal commented 3 years ago

I've merged the changes to master branch, and more feedback is much appreciated!

Paul

The updated code doesn't work for me. Discovery didn't work even after rebooting my echo. I'm using nodemcu-12e and echo 3rd gen.

pvint commented 3 years ago

I've been doing more testing, and the only time I've had any issue is when the ESP has crashed during the discovery - I've committed the change related to #115 and #118 that should address this. See #122 for details.

sid4sal commented 3 years ago

I've been doing more testing, and the only time I've had any issue is when the ESP has crashed during the discovery - I've committed the change related to #115 and #118 that should address this. See #122 for details.

I have ESP8266 Core 2.4.2, lwIP variant is set to "v1.4 Higher Bandwidth", port is set to 80 (for gen 3), But still alexa is not discovering the device.

pvint commented 3 years ago

I don't have any ESP8266 modules available to test at the moment, but I'm expecting more today or tomorrow and I'll be testing with them.

ddweber456 commented 3 years ago

@pvint I have some time today, what build do you want me to be testing? Master?

pvint commented 3 years ago

@ddweber456 Thanks David - yes, please test with master branch. If you can get it to fail, I'd love to see a log with #define DEBUG_FAUXMO_VERBOSE_TCP true set.

Going to check my mailbox shortly... hopefully my new 8266 modules are in so I can test with those as well.

pvint commented 3 years ago

I just got some more ESP8266 boards, and I can confirm after my first test that it it not working for me on the 8266 (Alexa Gen2 did not discover any new devices). I haven't had any issues with the ESP32 since the changes mentioned up above.

I'll keep digging...

pvint commented 3 years ago

I have found a difference when the discover is running, but I cannot explain it yet.

Everything looks the same when I run the discover on and ESP32 and an ESP8266, up until this point:

Host: 192.168.1.16


* On ESP32:

{"1":{"type":"Extended Color Light","name":"banana","uniqueid":"dacf0d000000","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"},"2":{"type":"Extended Color Light","name":"greenie","uniqueid":"dacf0d000001","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"},"3":{"type":"Extended Color Light","name":"bluebird","uniqueid":"dacf0d000002","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"},"4":{"type":"Extended Color Light","name":"apple","uniqueid":"dacf0d000003","modelid":"LCT007","state":{"on":false,"bri":0,"xy":[0,0],"reachable": true},"capabilities":{"certified":false,"streaming":{"renderer":true,"proxy":false}},"swversion":"5.105.0.21169"}} [MAIN] Free heap: 252288 bytes [FAUXMO] Client #0 disconnected [FAUXMO] Client #0 connected [FAUXMO] TCP request GET /api/2WLEDHardQrI3aaaTHoMcXHgEspsM8ZZRpSKtBQr/lights/1 HTTP/1.1



Not sure why the Amazon is sending a POST request at that point on the ESP8266 but a GET request when it's on an ESP32.

Going to have to get a full packet dump to try to see what's happening.
ddweber456 commented 3 years ago

I'm done a little testing and have not been able to get the ECHO Discovery process to fail in ways that I was not expecting.

ESP8266 D1 Mini 12F fauxmoESP - Master

1st Pass/Fail = New discovery 2nd Pass/Fail = Alexa Voice control after the discovery

test Echo Rev 2 - D1 Mini 12F - Test run in this chronological order Pass Fail Pass Fail
1 New UniquieID (1st D1 Mini 12F). New Device Name (name never used in the past) x x
2 Same UniquieID as previous discovery. Same Device Name as previous discovery, different sketch (a) x x
3 Same UniquieID as previous discovery. Different Device Name than previous discovery, did not delete the test2 devices (b) x x
4 Same UniquieID as previous discovery. Same Device Name as test3 previous discovery, after deleting test2 device names (c) x x
5 NEW UniquieID than previous discovery (2nd D1 Mini 12F). Different Device Name than test4 previous discovery (d) x x
6 Same UniquieID as previous test5 discovery (2nd D1 Mini 12F). Same Device Name as test4 above, after deleting device names from test5. Different UniquieID same Device Names. (You would never do this , but your users would.) x(e) x(f)

a.  Reused the same device names on the same D1, with a different sketch. b.  Did NOT delete the old device names in Alexa App. c.  Deleted the Divice Name in Alexa App d.  Did not delete the #4 Device Names in the Alexa App. e.  Discovery only found the 2nd fauxmoESP device (fauxmo 1st and 2nd is simply the order listed in the sketch).  The 1st fauxmoESP device was not found.

I think just stepped into the rabbit hole... I don't think this is a fauxmoESP issue. Maybe an enhancement.

f. The Echo discovery process got very confused with the same Device Name associated with difference UniquieID (8266). Alexa is now doing some weird things.

And, yes, I did fall deeper into the rabbit hole. If you think its relevant, @pvint , I will happily share the next set of observations.

(this was hard to write up, so if things could be made clearer, please help me out)

pvint commented 3 years ago

@ddweber456

Very helpful! Thank you for taking the time for a systematic test, and even moreso for documenting it like this.

I've been doing some testing as well, but it's more information gathering at this point (I have a bunch of packet captures to go through). I'm a bit wiped out after a long day - I'm going to revisit your results in the morning... I think I will actually use that to write up a Test Plan. Your post on your results is really great - I know how hard it is to write up things like this.

A couple days ago I thought we had this issue solved (and it seems to be, at least mostly, on ESP32). Tomorrow, I'll run through the same tests to verify consistency and figure out where to go then.

More observations are bound to be useful - if you have a bunch of stuff that you don't want to worry about formatting nicely feel free to email to me. I really think I will do a test plan tomorrow to help with testing on this and future issues.

Thanks!

Paul

pvint commented 3 years ago

I've been doing some more testing, and just to make things easier to decipher I set the sketch to only create one device, and I found that it was working perfectly on ESP12E. It also works with two or three devices, but not with four or more.

I set lwIP Variant to V2 Higher bandwidth and it now works fine (I tested with up to 8 devices). (This was previously noted in #94)

sid4sal commented 3 years ago

@pvint ,No luck. I created only one device and tested with both lwIP variant "V2 Higher bandwidth" and "V1.4 higher bandwidth" and set different Device Name (which was not previously discovered). And I also tested on both esp8266 core 2.4.2 and core 2.7.4. Its still not discovering.

ddweber456 commented 3 years ago

I'm using WiFiManager autoConnect, 0.15.0, in my sketch. I have to use the reset button after autoConnect to get the ESP in to STA mode. Just a thought...

pvint commented 3 years ago

(Edit: This is specifically for ESP8266 devices)

I'm unable to reproduce the issue now - no matter what I try. (Do need "Higher Bandwidth" setting for lwIP for 4 or more devices though)

For anyone still having issues, can you please try the following:

  1. In fauxmoESP.cpp at line 109, change from:
    client->write(headers);
    client->write(body);

To:

  int ret;
  ret = client->write(headers);
  Serial.printf("[FAUXMO] client-write(headers), size %d, returned %d\n", strlen(headers), ret);
  ret = client->write(body);
  Serial.printf("[FAUXMO] client-write(body), size %d, returned %d\n", strlen(body), ret);
  1. Delete your devices in the Alexa app
  2. Retry discovery.
  3. Report back on results, and paste in the serial output.

Thanks Paul

lightbulb14 commented 3 years ago

Hi Paul,

I made your recommended changes, deleted my Amazon devices, and ran discovery via Alexa App. The Serial output did not change at all (just more of the "Free heap:47640 bytes" message. My other device was discovered via the Alexa Discovery (Lifx bulb) but not Fauxmo.

.................ip:192.168.1.241,mask:255.255.255.0,gw:192.168.1.1

[WIFI] STATION Mode, SSID: SomeSSID, IP address: 192.168.1.241
[MAIN] Free heap: 48160 bytes
pm open,type:2 0
[MAIN] Free heap: 47640 bytes
[MAIN] Free heap: 47640 bytes
[MAIN] Free heap: 47640 bytes
[MAIN] Free heap: 47640 bytes
sid4sal commented 3 years ago

Hi Paul, I made the changes in fauxmoESP.cpp and deleted my devices but when I try to discover the esp8266, serial output doesn't give anything other than "Free heap".

13:12:09.126 -> [WIFI] Connecting to My_wifi ............
13:12:10.328 -> [WIFI] STATION Mode, SSID: My_wifi, IP address: 192.168.1.5
13:12:15.322 -> [MAIN] Free heap: 49944 bytes
13:12:20.318 -> [MAIN] Free heap: 49440 bytes
13:12:25.329 -> [MAIN] Free heap: 49440 bytes
13:12:30.315 -> [MAIN] Free heap: 49440 bytes
13:12:35.343 -> [MAIN] Free heap: 49440 bytes
13:12:40.324 -> [MAIN] Free heap: 49440 bytes
13:12:45.325 -> [MAIN] Free heap: 49440 bytes
13:12:50.336 -> [MAIN] Free heap: 49440 bytes
13:12:55.327 -> [MAIN] Free heap: 49440 bytes
ddweber456 commented 3 years ago

After I went down the rabbit hole in my post of 2 days ago with the results of the 6 tests. My echo dot Gen2 completely stopped making any successful discoveries on the same 2 D1 Minis used in the test 2 days ago. No matter what I did, I could not get the Gen 2 dot to discovery anything.

I connected my echo dot Gen 3 and that echo was able to discover all 4 of the fauxmo devices that the Gen 2 could not just a couple minutes earlier on the 2 D1s. At that point both the Gen 2 and Gen 3 could voice control all of the devices. Everything looks good! But, I still wanted to know if the Gen 2 dot was working correctly and able to discover correctly.

I deleted the 4 devices from the 2 Di Minis in the Alexa app, turned off the Gen 3 Dot. The Gen 2 dot was not able to discover the 4 previously deleted devices. After doing a factory reset on the Gen 2 dot, it was able to discover all 4 the devices correctly.

@pvint , if I can duplicate this, would the log with #define DEBUG_FAUXMO_VERBOSE_TCP true set give you what you need? Do you want something in addition to that?

lightbulb14 commented 3 years ago

I received an ESP32 dev board (from HiLetgo) this morning and attempted to setup fauxmo on that but still no luck. I ran the master code with the modified fauxmoESP.cpp changes. Below is a copy of the serial output. There were some new lines that I received once trying discovery, but fauxmo on ESP32 was not found. Hope this helps.

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8

[WIFI] Connecting to Some_SSID ..........
[WIFI] STATION Mode, SSID: Some_SSID, IP address: 192.168.1.234
[MAIN] Free heap: 247716 bytes
[MAIN] Free heap: 247716 bytes
[MAIN] Free heap: 247716 bytes
[FAUXMO] client-write(headers), size 83, returned 83
[FAUXMO] client-write(body), size 765, returned 765
[FAUXMO] client-write(headers), size 83, returned 83
[FAUXMO] client-write(body), size 765, returned 765
[MAIN] Free heap: 243700 bytes
[MAIN] Free heap: 247360 bytes
jenniferlee1818 commented 3 years ago

I had 15 fauxmo devices to discover. Before I read the most recent changes, I was able to reboot my dot (3rd gen), start discovery and I got the first 5 devices. I took those five off of my addDevice list, rebooted again and got nothing. Tried again, nothing. Tried again and got 5 more! But this time, the dot discovered the last 5 devices in my addDevice list. Now I have rebooted probably over 20 times and tried and tried again, but nothing. I'm not willing to delete all of the devices from my alexa app since I'm reading here that some are having trouble getting them back. Oh, and I was using fauxmo master during all of this. v2_Higher_Bandwidth. And of course, setPort(80). Since then, I have tried discoveryIssue with no success. I only have the ESP8266 (D1 Mini and NodeMCU-12E) to work with, but I'll be happy to do some testing. One more thing- I did see "GET /api/2WLEDHardQrI3aaaTHoMcXHgEspsM8ZZRpSKtBQr/lights/1 HTTP/1.1" several times in the debug output. ESP8266.

pvint commented 3 years ago

Ok, after another reading your experience @jenniferlee1818 I wondered about using more devices and I did some more tests, and I was able to get mine to fail. I did a couple packet captures to try to see what is going on, and I think it has really narrowed it down.

I first was trying with one device, then 5, then 16. When I got to 16 it failed for me repeatably, and I got a packet capture, and here's what I see coming from the ESP8266 when Amazon does a GET request to get device info:

First, a "good" response:

Frame 101: 405 bytes on wire (3240 bits), 405 bytes captured (3240 bits)
Ethernet II, Src: Espressi_a3:a1:2c (84:cc:a8:a3:a1:2c), Dst: AmazonTe_1b:bf:05 (cc:f7:35:1b:bf:05)
Internet Protocol Version 4, Src: 192.168.2.196, Dst: 192.168.2.100
Transmission Control Protocol, Src Port: 80, Dst Port: 59268, Seq: 1, Ack: 138, Len: 351
    Source Port: 80
    Destination Port: 59268
    [Stream index: 10]
    [TCP Segment Len: 351]
    Sequence number: 1    (relative sequence number)
    Sequence number (raw): 6521
    [Next sequence number: 352    (relative sequence number)]
    Acknowledgment number: 138    (relative ack number)
    Acknowledgment number (raw): 523843143
    0101 .... = Header Length: 20 bytes (5)
    Flags: 0x018 (PSH, ACK)
    Window size value: 5703
    [Calculated window size: 5703]
    [Window size scaling factor: -2 (no window scaling used)]
    Checksum: 0x1fb3 [unverified]
    [Checksum Status: Unverified]
    Urgent pointer: 0
    [SEQ/ACK analysis]
    [Timestamps]
    TCP payload (351 bytes)
Hypertext Transfer Protocol
JavaScript Object Notation: application/json
    Object
        Member Key: type
            String value: Extended Color Light
            Key: type
        Member Key: name
            String value: Hotdog 0
            Key: name
        Member Key: uniqueid
            String value: a3a12c000000
            Key: uniqueid
        Member Key: modelid
            String value: LCT007
            Key: modelid
        Member Key: state
            Object
                Member Key: on
                    True value
                    Key: on
                Member Key: bri
                    Number value: 254
                    Key: bri
                Member Key: xy
                    Array
                    Key: xy
                Member Key: reachable
                    True value
                    Key: reachable
            Key: state
        Member Key: capabilities
            Object
                Member Key: certified
                    False value
                    Key: certified
                Member Key: streaming
                    Object
                        Member Key: renderer
                            True value
                            Key: renderer
                        Member Key: proxy
                            False value
                            Key: proxy
                    Key: streaming
            Key: capabilities
        Member Key: swversion
            String value: 5.105.0.21169
            Key: swversion

0000  cc f7 35 1b bf 05 84 cc a8 a3 a1 2c 08 00 45 00   ..5........,..E.
0010  01 87 00 2a 00 00 ff 06 33 ce c0 a8 02 c4 c0 a8   ...*....3.......
0020  02 64 00 50 e7 84 00 00 19 79 1f 39 36 47 50 18   .d.P.....y.96GP.
0030  16 47 1f b3 00 00 48 54 54 50 2f 31 2e 31 20 32   .G....HTTP/1.1 2
0040  30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 54   00 OK..Content-T
0050  79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e   ype: application
0060  2f 6a 73 6f 6e 0d 0a 43 6f 6e 74 65 6e 74 2d 4c   /json..Content-L
0070  65 6e 67 74 68 3a 20 32 36 30 0d 0a 43 6f 6e 6e   ength: 260..Conn
0080  65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 0d   ection: close...
0090  0a 7b 22 74 79 70 65 22 3a 22 45 78 74 65 6e 64   .{"type":"Extend
00a0  65 64 20 43 6f 6c 6f 72 20 4c 69 67 68 74 22 2c   ed Color Light",
00b0  22 6e 61 6d 65 22 3a 22 48 6f 74 64 6f 67 20 30   "name":"Hotdog 0
00c0  22 2c 22 75 6e 69 71 75 65 69 64 22 3a 22 61 33   ","uniqueid":"a3
00d0  61 31 32 63 30 30 30 30 30 30 22 2c 22 6d 6f 64   a12c000000","mod
00e0  65 6c 69 64 22 3a 22 4c 43 54 30 30 37 22 2c 22   elid":"LCT007","
00f0  73 74 61 74 65 22 3a 7b 22 6f 6e 22 3a 74 72 75   state":{"on":tru
0100  65 2c 22 62 72 69 22 3a 32 35 34 2c 22 78 79 22   e,"bri":254,"xy"
0110  3a 5b 30 2c 30 5d 2c 22 72 65 61 63 68 61 62 6c   :[0,0],"reachabl
0120  65 22 3a 20 74 72 75 65 7d 2c 22 63 61 70 61 62   e": true},"capab
0130  69 6c 69 74 69 65 73 22 3a 7b 22 63 65 72 74 69   ilities":{"certi
0140  66 69 65 64 22 3a 66 61 6c 73 65 2c 22 73 74 72   fied":false,"str
0150  65 61 6d 69 6e 67 22 3a 7b 22 72 65 6e 64 65 72   eaming":{"render
0160  65 72 22 3a 74 72 75 65 2c 22 70 72 6f 78 79 22   er":true,"proxy"
0170  3a 66 61 6c 73 65 7d 7d 2c 22 73 77 76 65 72 73   :false}},"swvers
0180  69 6f 6e 22 3a 22 35 2e 31 30 35 2e 30 2e 32 31   ion":"5.105.0.21
0190  31 36 39 22 7d                                    169"}

Now a "bad" response:

Frame 28: 1514 bytes on wire (12112 bits), 1514 bytes captured (12112 bits)
Ethernet II, Src: Espressi_a3:a1:2c (84:cc:a8:a3:a1:2c), Dst: AmazonTe_1b:bf:05 (cc:f7:35:1b:bf:05)
Internet Protocol Version 4, Src: 192.168.2.196, Dst: 192.168.2.100
Transmission Control Protocol, Src Port: 80, Dst Port: 59188, Seq: 1, Ack: 136, Len: 1460
    Source Port: 80
    Destination Port: 59188
    [Stream index: 2]
    [TCP Segment Len: 1460]
    Sequence number: 1    (relative sequence number)
    Sequence number (raw): 6511
    [Next sequence number: 1461    (relative sequence number)]
    Acknowledgment number: 136    (relative ack number)
    Acknowledgment number (raw): 1829883715
    0101 .... = Header Length: 20 bytes (5)
    Flags: 0x018 (PSH, ACK)
    Window size value: 5705
    [Calculated window size: 5705]
    [Window size scaling factor: -2 (no window scaling used)]
    Checksum: 0xe73e [unverified]
    [Checksum Status: Unverified]
    Urgent pointer: 0
    [SEQ/ACK analysis]
    [Timestamps]
    TCP payload (1460 bytes)
    TCP segment data (1460 bytes)

0000  cc f7 35 1b bf 05 84 cc a8 a3 a1 2c 08 00 45 00   ..5........,..E.
0010  05 dc 00 12 00 00 ff 06 2f 91 c0 a8 02 c4 c0 a8   ......../.......
0020  02 64 00 50 e7 34 00 00 19 6f 6d 11 cf 43 50 18   .d.P.4...om..CP.
0030  16 49 e7 3e 00 00 48 54 54 50 2f 31 2e 31 20 32   .I.>..HTTP/1.1 2
0040  30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 54   00 OK..Content-T
0050  79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e   ype: application
0060  2f 6a 73 6f 6e 0d 0a 43 6f 6e 74 65 6e 74 2d 4c   /json..Content-L
0070  65 6e 67 74 68 3a 20 34 32 38 36 0d 0a 43 6f 6e   ength: 4286..Con
0080  6e 65 63 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a   nection: close..
0090  0d 0a 7b 22 31 22 3a 7b 22 74 79 70 65 22 3a 22   ..{"1":{"type":"
00a0  45 78 74 65 6e 64 65 64 20 43 6f 6c 6f 72 20 4c   Extended Color L
00b0  69 67 68 74 22 2c 22 6e 61 6d 65 22 3a 22 48 61   ight","name":"Ha
00c0  6d 62 75 72 67 65 72 20 30 22 2c 22 75 6e 69 71   mburger 0","uniq
00d0  75 65 69 64 22 3a 22 61 33 61 31 32 63 30 30 30   ueid":"a3a12c000
00e0  30 30 30 22 2c 22 6d 6f 64 65 6c 69 64 22 3a 22   000","modelid":"
00f0  4c 43 54 30 30 37 22 2c 22 73 74 61 74 65 22 3a   LCT007","state":
0100  7b 22 6f 6e 22 3a 66 61 6c 73 65 2c 22 62 72 69   {"on":false,"bri
0110  22 3a 30 2c 22 78 79 22 3a 5b 30 2c 30 5d 2c 22   ":0,"xy":[0,0],"
0120  72 65 61 63 68 61 62 6c 65 22 3a 20 74 72 75 65   reachable": true
0130  7d 2c 22 63 61 70 61 62 69 6c 69 74 69 65 73 22   },"capabilities"
0140  3a 7b 22 63 65 72 74 69 66 69 65 64 22 3a 66 61   :{"certified":fa
0150  6c 73 65 2c 22 73 74 72 65 61 6d 69 6e 67 22 3a   lse,"streaming":
0160  7b 22 72 65 6e 64 65 72 65 72 22 3a 74 72 75 65   {"renderer":true
0170  2c 22 70 72 6f 78 79 22 3a 66 61 6c 73 65 7d 7d   ,"proxy":false}}
0180  2c 22 73 77 76 65 72 73 69 6f 6e 22 3a 22 35 2e   ,"swversion":"5.
0190  31 30 35 2e 30 2e 32 31 31 36 39 22 7d 2c 22 32   105.0.21169"},"2
01a0  22 3a 7b 22 74 79 70 65 22 3a 22 45 78 74 65 6e   ":{"type":"Exten
01b0  64 65 64 20 43 6f 6c 6f 72 20 4c 69 67 68 74 22   ded Color Light"
01c0  2c 22 6e 61 6d 65 22 3a 22 48 61 6d 62 75 72 67   ,"name":"Hamburg
01d0  65 72 20 31 22 2c 22 75 6e 69 71 75 65 69 64 22   er 1","uniqueid"
01e0  3a 22 61 33 61 31 32 63 30 30 30 30 30 31 22 2c   :"a3a12c000001",
01f0  22 6d 6f 64 65 6c 69 64 22 3a 22 4c 43 54 30 30   "modelid":"LCT00
0200  37 22 2c 22 73 74 61 74 65 22 3a 7b 22 6f 6e 22   7","state":{"on"
0210  3a 66 61 6c 73 65 2c 22 62 72 69 22 3a 30 2c 22   :false,"bri":0,"
0220  78 79 22 3a 5b 30 2c 30 5d 2c 22 72 65 61 63 68   xy":[0,0],"reach
0230  61 62 6c 65 22 3a 20 74 72 75 65 7d 2c 22 63 61   able": true},"ca
0240  70 61 62 69 6c 69 74 69 65 73 22 3a 7b 22 63 65   pabilities":{"ce
0250  72 74 69 66 69 65 64 22 3a 66 61 6c 73 65 2c 22   rtified":false,"
0260  73 74 72 65 61 6d 69 6e 67 22 3a 7b 22 72 65 6e   streaming":{"ren
0270  64 65 72 65 72 22 3a 74 72 75 65 2c 22 70 72 6f   derer":true,"pro
0280  78 79 22 3a 66 61 6c 73 65 7d 7d 2c 22 73 77 76   xy":false}},"swv
0290  65 72 73 69 6f 6e 22 3a 22 35 2e 31 30 35 2e 30   ersion":"5.105.0
02a0  2e 32 31 31 36 39 22 7d 2c 22 33 22 3a 7b 22 74   .21169"},"3":{"t
02b0  79 70 65 22 3a 22 45 78 74 65 6e 64 65 64 20 43   ype":"Extended C
02c0  6f 6c 6f 72 20 4c 69 67 68 74 22 2c 22 6e 61 6d   olor Light","nam
02d0  65 22 3a 22 48 61 6d 62 75 72 67 65 72 20 32 22   e":"Hamburger 2"
02e0  2c 22 75 6e 69 71 75 65 69 64 22 3a 22 61 33 61   ,"uniqueid":"a3a
02f0  31 32 63 30 30 30 30 30 32 22 2c 22 6d 6f 64 65   12c000002","mode
0300  6c 69 64 22 3a 22 4c 43 54 30 30 37 22 2c 22 73   lid":"LCT007","s
0310  74 61 74 65 22 3a 7b 22 6f 6e 22 3a 66 61 6c 73   tate":{"on":fals
0320  65 2c 22 62 72 69 22 3a 30 2c 22 78 79 22 3a 5b   e,"bri":0,"xy":[
0330  30 2c 30 5d 2c 22 72 65 61 63 68 61 62 6c 65 22   0,0],"reachable"
0340  3a 20 74 72 75 65 7d 2c 22 63 61 70 61 62 69 6c   : true},"capabil
0350  69 74 69 65 73 22 3a 7b 22 63 65 72 74 69 66 69   ities":{"certifi
0360  65 64 22 3a 66 61 6c 73 65 2c 22 73 74 72 65 61   ed":false,"strea
0370  6d 69 6e 67 22 3a 7b 22 72 65 6e 64 65 72 65 72   ming":{"renderer
0380  22 3a 74 72 75 65 2c 22 70 72 6f 78 79 22 3a 66   ":true,"proxy":f
0390  61 6c 73 65 7d 7d 2c 22 73 77 76 65 72 73 69 6f   alse}},"swversio
03a0  6e 22 3a 22 35 2e 31 30 35 2e 30 2e 32 31 31 36   n":"5.105.0.2116
03b0  39 22 7d 2c 22 34 22 3a 7b 22 74 79 70 65 22 3a   9"},"4":{"type":
03c0  22 45 78 74 65 6e 64 65 64 20 43 6f 6c 6f 72 20   "Extended Color 
03d0  4c 69 67 68 74 22 2c 22 6e 61 6d 65 22 3a 22 48   Light","name":"H
03e0  61 6d 62 75 72 67 65 72 20 33 22 2c 22 75 6e 69   amburger 3","uni
03f0  71 75 65 69 64 22 3a 22 61 33 61 31 32 63 30 30   queid":"a3a12c00
0400  30 30 30 33 22 2c 22 6d 6f 64 65 6c 69 64 22 3a   0003","modelid":
0410  22 4c 43 54 30 30 37 22 2c 22 73 74 61 74 65 22   "LCT007","state"
0420  3a 7b 22 6f 6e 22 3a 66 61 6c 73 65 2c 22 62 72   :{"on":false,"br
0430  69 22 3a 30 2c 22 78 79 22 3a 5b 30 2c 30 5d 2c   i":0,"xy":[0,0],
0440  22 72 65 61 63 68 61 62 6c 65 22 3a 20 74 72 75   "reachable": tru
0450  65 7d 2c 22 63 61 70 61 62 69 6c 69 74 69 65 73   e},"capabilities
0460  22 3a 7b 22 63 65 72 74 69 66 69 65 64 22 3a 66   ":{"certified":f
0470  61 6c 73 65 2c 22 73 74 72 65 61 6d 69 6e 67 22   alse,"streaming"
0480  3a 7b 22 72 65 6e 64 65 72 65 72 22 3a 74 72 75   :{"renderer":tru
0490  65 2c 22 70 72 6f 78 79 22 3a 66 61 6c 73 65 7d   e,"proxy":false}
04a0  7d 2c 22 73 77 76 65 72 73 69 6f 6e 22 3a 22 35   },"swversion":"5
04b0  2e 31 30 35 2e 30 2e 32 31 31 36 39 22 7d 2c 22   .105.0.21169"},"
04c0  35 22 3a 7b 22 74 79 70 65 22 3a 22 45 78 74 65   5":{"type":"Exte
04d0  6e 64 65 64 20 43 6f 6c 6f 72 20 4c 69 67 68 74   nded Color Light
04e0  22 2c 22 6e 61 6d 65 22 3a 22 48 61 6d 62 75 72   ","name":"Hambur
04f0  67 65 72 20 34 22 2c 22 75 6e 69 71 75 65 69 64   ger 4","uniqueid
0500  22 3a 22 61 33 61 31 32 63 30 30 30 30 30 34 22   ":"a3a12c000004"
0510  2c 22 6d 6f 64 65 6c 69 64 22 3a 22 4c 43 54 30   ,"modelid":"LCT0
0520  30 37 22 2c 22 73 74 61 74 65 22 3a 7b 22 6f 6e   07","state":{"on
0530  22 3a 66 61 6c 73 65 2c 22 62 72 69 22 3a 30 2c   ":false,"bri":0,
0540  22 78 79 22 3a 5b 30 2c 30 5d 2c 22 72 65 61 63   "xy":[0,0],"reac
0550  68 61 62 6c 65 22 3a 20 74 72 75 65 7d 2c 22 63   hable": true},"c
0560  61 70 61 62 69 6c 69 74 69 65 73 22 3a 7b 22 63   apabilities":{"c
0570  65 72 74 69 66 69 65 64 22 3a 66 61 6c 73 65 2c   ertified":false,
0580  22 73 74 72 65 61 6d 69 6e 67 22 3a 7b 22 72 65   "streaming":{"re
0590  6e 64 65 72 65 72 22 3a 74 72 75 65 2c 22 70 72   nderer":true,"pr
05a0  6f 78 79 22 3a 66 61 6c 73 65 7d 7d 2c 22 73 77   oxy":false}},"sw
05b0  76 65 72 73 69 6f 6e 22 3a 22 35 2e 31 30 35 2e   version":"5.105.
05c0  30 2e 32 31 31 36 39 22 7d 2c 22 36 22 3a 7b 22   0.21169"},"6":{"
05d0  74 79 70 65 22 3a 22 45 78 74 65 6e 64 65 64 20   type":"Extended 
05e0  43 6f 6c 6f 72 20 4c 69 67 68                     Color Ligh

No.     Time           Source                Destination           Protocol Length Info
     29 0.271964       192.168.2.196         192.168.2.100         TCP      1514   80 → 59188 [PSH, ACK] Seq=1461 Ack=136 Win=5705 Len=1460 [TCP segment of a reassembled PDU]

Frame 29: 1514 bytes on wire (12112 bits), 1514 bytes captured (12112 bits)
Ethernet II, Src: Espressi_a3:a1:2c (84:cc:a8:a3:a1:2c), Dst: AmazonTe_1b:bf:05 (cc:f7:35:1b:bf:05)
Internet Protocol Version 4, Src: 192.168.2.196, Dst: 192.168.2.100
Transmission Control Protocol, Src Port: 80, Dst Port: 59188, Seq: 1461, Ack: 136, Len: 1460
    Source Port: 80
    Destination Port: 59188
    [Stream index: 2]
    [TCP Segment Len: 1460]
    Sequence number: 1461    (relative sequence number)
    Sequence number (raw): 7971
    [Next sequence number: 2921    (relative sequence number)]
    Acknowledgment number: 136    (relative ack number)
    Acknowledgment number (raw): 1829883715
    0101 .... = Header Length: 20 bytes (5)
    Flags: 0x018 (PSH, ACK)
    Window size value: 5705
    [Calculated window size: 5705]
    [Window size scaling factor: -2 (no window scaling used)]
    Checksum: 0xd742 [unverified]
    [Checksum Status: Unverified]
    Urgent pointer: 0
    [SEQ/ACK analysis]
    [Timestamps]
    TCP payload (1460 bytes)
    TCP segment data (1460 bytes)

0000  cc f7 35 1b bf 05 84 cc a8 a3 a1 2c 08 00 45 00   ..5........,..E.
0010  05 dc 00 13 00 00 ff 06 2f 90 c0 a8 02 c4 c0 a8   ......../.......
0020  02 64 00 50 e7 34 00 00 1f 23 6d 11 cf 43 50 18   .d.P.4...#m..CP.
0030  16 49 d7 42 00 00 74 22 2c 22 6e 61 6d 65 22 3a   .I.B..t","name":
0040  22 48 61 6d 62 75 72 67 65 72 20 35 22 2c 22 75   "Hamburger 5","u
0050  6e 69 71 75 65 69 64 22 3a 22 61 33 61 31 32 63   niqueid":"a3a12c
0060  30 30 30 30 30 35 22 2c 22 6d 6f 64 65 6c 69 64   000005","modelid
0070  22 3a 22 4c 43 54 30 30 37 22 2c 22 73 74 61 74   ":"LCT007","stat
0080  65 22 3a 7b 22 6f 6e 22 3a 66 61 6c 73 65 2c 22   e":{"on":false,"
0090  62 72 69 22 3a 30 2c 22 78 79 22 3a 5b 30 2c 30   bri":0,"xy":[0,0
00a0  5d 2c 22 72 65 61 63 68 61 62 6c 65 22 3a 20 74   ],"reachable": t
00b0  72 75 65 7d 2c 22 63 61 70 61 62 69 6c 69 74 69   rue},"capabiliti
00c0  65 73 22 3a 7b 22 63 65 72 74 69 66 69 65 64 22   es":{"certified"
00d0  3a 66 61 6c 73 65 2c 22 73 74 72 65 61 6d 69 6e   :false,"streamin
00e0  67 22 3a 7b 22 72 65 6e 64 65 72 65 72 22 3a 74   g":{"renderer":t
00f0  72 75 65 2c 22 70 72 6f 78 79 22 3a 66 61 6c 73   rue,"proxy":fals
0100  65 7d 7d 2c 22 73 77 76 65 72 73 69 6f 6e 22 3a   e}},"swversion":
0110  22 35 2e 31 30 35 2e 30 2e 32 31 31 36 39 22 7d   "5.105.0.21169"}
0120  2c 22 37 22 3a 7b 22 74 79 70 65 22 3a 22 45 78   ,"7":{"type":"Ex
0130  74 65 6e 64 65 64 20 43 6f 6c 6f 72 20 4c 69 67   tended Color Lig
0140  68 74 22 2c 22 6e 61 6d 65 22 3a 22 48 61 6d 62   ht","name":"Hamb
0150  75 72 67 65 72 20 36 22 2c 22 75 6e 69 71 75 65   urger 6","unique
0160  69 64 22 3a 22 61 33 61 31 32 63 30 30 30 30 30   id":"a3a12c00000
0170  36 22 2c 22 6d 6f 64 65 6c 69 64 22 3a 22 4c 43   6","modelid":"LC
0180  54 30 30 37 22 2c 22 73 74 61 74 65 22 3a 7b 22   T007","state":{"
0190  6f 6e 22 3a 66 61 6c 73 65 2c 22 62 72 69 22 3a   on":false,"bri":
01a0  30 2c 22 78 79 22 3a 5b 30 2c 30 5d 2c 22 72 65   0,"xy":[0,0],"re
01b0  61 63 68 61 62 6c 65 22 3a 20 74 72 75 65 7d 2c   achable": true},
01c0  22 63 61 70 61 62 69 6c 69 74 69 65 73 22 3a 7b   "capabilities":{
01d0  22 63 65 72 74 69 66 69 65 64 22 3a 66 61 6c 73   "certified":fals
01e0  65 2c 22 73 74 72 65 61 6d 69 6e 67 22 3a 7b 22   e,"streaming":{"
01f0  72 65 6e 64 65 72 65 72 22 3a 74 72 75 65 2c 22   renderer":true,"
0200  70 72 6f 78 79 22 3a 66 61 6c 73 65 7d 7d 2c 22   proxy":false}},"
0210  73 77 76 65 72 73 69 6f 6e 22 3a 22 35 2e 31 30   swversion":"5.10
0220  35 2e 30 2e 32 31 31 36 39 22 7d 2c 22 38 22 3a   5.0.21169"},"8":
0230  7b 22 74 79 70 65 22 3a 22 45 78 74 65 6e 64 65   {"type":"Extende
0240  64 20 43 6f 6c 6f 72 20 4c 69 67 68 74 22 2c 22   d Color Light","
0250  6e 61 6d 65 22 3a 22 48 61 6d 62 75 72 67 65 72   name":"Hamburger
0260  20 37 22 2c 22 75 6e 69 71 75 65 69 64 22 3a 22    7","uniqueid":"
0270  61 33 61 31 32 63 30 30 30 30 30 37 22 2c 22 6d   a3a12c000007","m
0280  6f 64 65 6c 69 64 22 3a 22 4c 43 54 30 30 37 22   odelid":"LCT007"
0290  2c 22 73 74 61 74 65 22 3a 7b 22 6f 6e 22 3a 66   ,"state":{"on":f
02a0  61 6c 73 65 2c 22 62 72 69 22 3a 30 2c 22 78 79   alse,"bri":0,"xy
02b0  22 3a 5b 30 2c 30 5d 2c 22 72 65 61 63 68 61 62   ":[0,0],"reachab
02c0  6c 65 22 3a 20 74 72 75 65 7d 2c 22 63 61 70 61   le": true},"capa
02d0  62 69 6c 69 74 69 65 73 22 3a 7b 22 63 65 72 74   bilities":{"cert
02e0  69 66 69 65 64 22 3a 66 61 6c 73 65 2c 22 73 74   ified":false,"st
02f0  72 65 61 6d 69 6e 67 22 3a 7b 22 72 65 6e 64 65   reaming":{"rende
0300  72 65 72 22 3a 74 72 75 65 2c 22 70 72 6f 78 79   rer":true,"proxy
0310  22 3a 66 61 6c 73 65 7d 7d 2c 22 73 77 76 65 72   ":false}},"swver
0320  73 69 6f 6e 22 3a 22 35 2e 31 30 35 2e 30 2e 32   sion":"5.105.0.2
0330  31 31 36 39 22 7d 2c 22 39 22 3a 7b 22 74 79 70   1169"},"9":{"typ
0340  65 22 3a 22 45 78 74 65 6e 64 65 64 20 43 6f 6c   e":"Extended Col
0350  6f 72 20 4c 69 67 68 74 22 2c 22 6e 61 6d 65 22   or Light","name"
0360  3a 22 48 61 6d 62 75 72 67 65 72 20 38 22 2c 22   :"Hamburger 8","
0370  75 6e 69 71 75 65 69 64 22 3a 22 61 33 61 31 32   uniqueid":"a3a12
0380  63 30 30 30 30 30 38 22 2c 22 6d 6f 64 65 6c 69   c000008","modeli
0390  64 22 3a 22 4c 43 54 30 30 37 22 2c 22 73 74 61   d":"LCT007","sta
03a0  74 65 22 3a 7b 22 6f 6e 22 3a 66 61 6c 73 65 2c   te":{"on":false,
03b0  22 62 72 69 22 3a 30 2c 22 78 79 22 3a 5b 30 2c   "bri":0,"xy":[0,
03c0  30 5d 2c 22 72 65 61 63 68 61 62 6c 65 22 3a 20   0],"reachable": 
03d0  74 72 75 65 7d 2c 22 63 61 70 61 62 69 6c 69 74   true},"capabilit
03e0  69 65 73 22 3a 7b 22 63 65 72 74 69 66 69 65 64   ies":{"certified
03f0  22 3a 66 61 6c 73 65 2c 22 73 74 72 65 61 6d 69   ":false,"streami
0400  6e 67 22 3a 7b 22 72 65 6e 64 65 72 65 72 22 3a   ng":{"renderer":
0410  74 72 75 65 2c 22 70 72 6f 78 79 22 3a 66 61 6c   true,"proxy":fal
0420  73 65 7d 7d 2c 22 73 77 76 65 72 73 69 6f 6e 22   se}},"swversion"
0430  3a 22 35 2e 31 30 35 2e 30 2e 32 31 31 36 39 22   :"5.105.0.21169"
0440  7d 2c 22 31 30 22 3a 7b 22 74 79 70 65 22 3a 22   },"10":{"type":"
0450  45 78 74 65 6e 64 65 64 20 43 6f 6c 6f 72 20 4c   Extended Color L
0460  69 67 68 74 22 2c 22 6e 61 6d 65 22 3a 22 48 61   ight","name":"Ha
0470  6d 62 75 72 67 65 72 20 39 22 2c 22 75 6e 69 71   mburger 9","uniq
0480  75 65 69 64 22 3a 22 61 33 61 31 32 63 30 30 30   ueid":"a3a12c000
0490  30 30 39 22 2c 22 6d 6f 64 65 6c 69 64 22 3a 22   009","modelid":"
04a0  4c 43 54 30 30 37 22 2c 22 73 74 61 74 65 22 3a   LCT007","state":
04b0  7b 22 6f 6e 22 3a 66 61 6c 73 65 2c 22 62 72 69   {"on":false,"bri
04c0  22 3a 30 2c 22 78 79 22 3a 5b 30 2c 30 5d 2c 22   ":0,"xy":[0,0],"
04d0  72 65 61 63 68 61 62 6c 65 22 3a 20 74 72 75 65   reachable": true
04e0  7d 2c 22 63 61 70 61 62 69 6c 69 74 69 65 73 22   },"capabilities"
04f0  3a 7b 22 63 65 72 74 69 66 69 65 64 22 3a 66 61   :{"certified":fa
0500  6c 73 65 2c 22 73 74 72 65 61 6d 69 6e 67 22 3a   lse,"streaming":
0510  7b 22 72 65 6e 64 65 72 65 72 22 3a 74 72 75 65   {"renderer":true
0520  2c 22 70 72 6f 78 79 22 3a 66 61 6c 73 65 7d 7d   ,"proxy":false}}
0530  2c 22 73 77 76 65 72 73 69 6f 6e 22 3a 22 35 2e   ,"swversion":"5.
0540  31 30 35 2e 30 2e 32 31 31 36 39 22 7d 2c 22 31   105.0.21169"},"1
0550  31 22 3a 7b 22 74 79 70 65 22 3a 22 45 78 74 65   1":{"type":"Exte
0560  6e 64 65 64 20 43 6f 6c 6f 72 20 4c 69 67 68 74   nded Color Light
0570  22 2c 22 6e 61 6d 65 22 3a 22 48 61 6d 62 75 72   ","name":"Hambur
0580  67 65 72 20 31 30 22 2c 22 75 6e 69 71 75 65 69   ger 10","uniquei
0590  64 22 3a 22 61 33 61 31 32 63 30 30 30 30 31 30   d":"a3a12c000010
05a0  22 2c 22 6d 6f 64 65 6c 69 64 22 3a 22 4c 43 54   ","modelid":"LCT
05b0  30 30 37 22 2c 22 73 74 61 74 65 22 3a 7b 22 6f   007","state":{"o
05c0  6e 22 3a 66 61 6c 73 65 2c 22 62 72 69 22 3a 30   n":false,"bri":0
05d0  2c 22 78 79 22 3a 5b 30 2c 30 5d 2c 22 72 65 61   ,"xy":[0,0],"rea
05e0  63 68 61 62 6c 65 22 3a 20 74                     chable": t

Note that the response with more devices becomes long and is split into two packets, but critically, it is truncated! Not only is it not complete, but that would also render the JSON string invalid so the Echo would simply discard it.

Now to figure out why...

jenniferlee1818 commented 3 years ago

@pvint Is there any way to make the device id random or to set that myself? I think I figured out why my 2nd successful discovery got the last 5 of my devices. And that is because the ids of the 5 before those were the same ids as the first 5 devices that were discovered. I know this sounds confusing, but it's a problem with the device ids being set programmatically. I'd rather set the device id myself to something I know hasn't been already used.