Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alexa can't discover devices #166

Open
gabriel-lando opened this issue Mar 14, 2021 · 79 comments
Open

Alexa can't discover devices #166

gabriel-lando opened this issue Mar 14, 2021 · 79 comments
Assignees

Comments

@gabriel-lando
Copy link

gabriel-lando commented Mar 14, 2021

I was using the latest version (v3.2) for a while (since February 8th, 2021) and it has been working very well so far (also, the devices continue to work with Alexa).

Today, I decided to add a new light and Alexa couldn't detect this device.

I tried using my custom code and it didn't work (it did last month). So, I tried with the example fauxmoESP_basic from the library and I had the same result: Alexa cound't find any new device.

So, I tried with the version 2.4.4 (an implementation of the Wemo Switch that I already used on the past) and it worked using the basic example: Alexa could find a "switch one" smart switch device.

So, I tried with the version 3.1.1 (from de same repository, latest before the migration for GitHub) and I had the same issue.

Apparently, Alexa can't discover devices using the Philips Hue implementation.

Also, I tried using the latest commit on master and the result was the same :(

My Echo devices:

  • 1x Echo Dot 2nd Gen
  • 1x Echo Dot 3rd Gen

I tried with both Echo devices and they can't find this device.

Also, I tried removing one of my working devices from the Alexa app and tried to discover this device again and Alexa couldn't detect it.

My upload configuration:
Board: Wemos D1 R1
Upload Speed: 921600
CPU Frequency: 80 MHz
Flash Size: 4MB (FS:2MB OTA:~1019KB)
Debug port: Disabled
Debug Level: None
lwIP Variant: v1.4 Higher Bandwidth
VTables: Flash
Exceptions: Legacy (new can return nullptr)
Erase Flash: Only Sketch
SSL Support: All SSL ciphers (most compatible)

OBS: Also, on the basic example, I tried to remove all devices and keep only the "yellow lamp" (as I saw in other issue #149 ) and the result was the same :/

Edit: ESP8266 Core version: 2.7.4

@gabriel-lando
Copy link
Author

Hey, I'm adding some fauxmo logs

I've uncommented this line #define DEBUG_FAUXMO Serial and changed these two: #define DEBUG_FAUXMO_VERBOSE_TCP true and #define DEBUG_FAUXMO_VERBOSE_UDP true.

fauxmoESP_Logs.txt

@kzkaram
Copy link

kzkaram commented Mar 17, 2021

I have noticed the same thing. It was working ok until just a few days ago. It looks like the discovery process doesn't like something in the response containing the list of discoverable devices properties and IDs so doesn't proceed to the next stage of requesting information on individual devices in that list. Perhaps some update to Echo firmware now means this profile is no longer supported e.g due to Hue Hub V1 no longer supported?

@SatyamThakur30
Copy link

Same issue facing from last few days. Please update if any fix it.

@Aircoookie
Copy link

Facing the same issue in my Espalexa library (which FauxmoESP has borrowed some concepts from, albeit adapted for way better code quality than mine) and have not yet been able to fix it either.

@kzkaram I can confirm your findings. Discovery is fine until the complete api/key/lights list is requested. Dot 3 continues to request API key (request to /api with body {"devicetype": "Echo"} and api/key/lights in a loop, but never individual lights, e.g. api/key/lights/1. My first wild guess is that it doesn't like a value presented in the device list, perhaps a JSON property is missing or has a value that is rejected by the Alexa code for some reason. Still it doesn't make sense that the Echo would request the API key again (which it subsequently uses for the /lights request).

My next attempt will be to spoof every property of the JSON object for a bulb returned by an actual V2 bridge (current implementation both of Espalexa and FauxmoESP leave out quite a few properties), but I have not yet had time to test that. This is definitely a critical issue as discovery fails from Dot 3, Dot 2, Echo Plus and the app (and likely all other devices).

@barneyz
Copy link

barneyz commented Mar 21, 2021

@Aircoookie, can you post a log "of the JSON object for a bulb returned by an actual V2 bridge" in both ESPalexa and Fauxmoesp-discussions/issues? This could help to fix it...

@Aircoookie
Copy link

Aircoookie commented Mar 21, 2021

Sure thing! Adding more properties is the first thing we might want to try, although this will further limit the amount of devices that can be emulated from a single ESP due to the length of the aggregate /lights object... Well better to be able to emulate a single device than none at all.

Response to /api/key/lights/1 by Espalexa 2.5.0 (for EspalexaDeviceType::extendedcolor)
{
  "state": {
    "on": true,
    "bri": 199,
    "hue": 0,
    "sat": 0,
    "effect": "none",
    "xy": [0.48, 0.42],
    "ct": 500,
    "alert": "none",
    "colormode": "xy",
    "mode": "homeautomation",
    "reachable": true
  },
  "type": "Extended color light",
  "name": "Garage",
  "modelid": "LCT015",
  "manufacturername": "Philips",
  "productname": "E4",
  "uniqueid": "fabc20bb2e01",
  "swversion": "espalexa-2.5.0"
}
Response to /api/key/lights/1 by V2 Hue Bridge (for genuine Hue Color & Ambiance E27 bulb V3)
{
  "state": {
    "on": false,
    "bri": 42,
    "hue": 5214,
    "sat": 254,
    "effect": "none",
    "xy": [
      0.5853,
      0.3881
    ],
    "ct": 153,
    "alert": "none",
    "colormode": "xy",
    "mode": "homeautomation",
    "reachable": true
  },
  "swupdate": {
    "state": "noupdates",
    "lastinstall": "2020-03-04T13:47:05"
  },
  "type": "Extended color light",
  "name": "Dodekaeder",
  "modelid": "LCT015",
  "manufacturername": "Signify Netherlands B.V.",
  "productname": "Hue color lamp",
  "capabilities": {
    "certified": true,
    "control": {
      "mindimlevel": 1000,
      "maxlumen": 806,
      "colorgamuttype": "C",
      "colorgamut": [
        [
          0.6915,
          0.3083
        ],
        [
          0.17,
          0.7
        ],
        [
          0.1532,
          0.0475
        ]
      ],
      "ct": {
        "min": 153,
        "max": 500
      }
    },
    "streaming": {
      "renderer": true,
      "proxy": true
    }
  },
  "config": {
    "archetype": "sultanbulb",
    "function": "mixed",
    "direction": "omnidirectional",
    "startup": {
      "mode": "safety",
      "configured": true
    }
  },
  "uniqueid": "00:17:88:01:03:7f:54:41-0b",
  "swversion": "1.50.2_r30933",
  "swconfigid": "772B0E5E",
  "productid": "Philips-LCT015-1-A19ECLv5"
}

@pvint
Copy link
Member

pvint commented Mar 21, 2021

@Aircoookie That is really great info - thank you!

I'm just starting to dig in to this. For reference here is the /lights response from FauxmoESP 3.2:

{"1":{"type":"Extended color light","name":"yellow lamp","uniqueid":"2d925343b020","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"}}

@Aircoookie
Copy link

Aircoookie commented Mar 21, 2021

@pvint Success! (at least I hope so, it is yet to be seen that this works widely, but I just had a working discovery of an Espalexa device on Dot 3)
Alexa doesn't like the 12-hex digit syntax of our "uniqueid" field any longer apparently.
Espalexa community member @oponyx found that the syntax "uniqueid":"F0:08:D1:D8:3B:00:00:11-01" causes the device to be found and controllable again, which I can confirm.

Using the following code to generate the field:

uint8_t mac[6];
WiFi.macAddress(mac);

sprintf(out, "%02X:%02X:%02X:%02X:%02X:%02X:00:11-%02X", mac[0],mac[1],mac[2],mac[3],mac[4],mac[5], idx);

where idx is the device number.

@gabriel-lando
Copy link
Author

Hi, thanks @Aircoookie :) I tried this and it worked very well. All my devices are working with fauxmoESP with this solution

@kzkaram
Copy link

kzkaram commented Mar 22, 2021

@Aircoookie Thanks for that info. Must admit when I saw the different unique ID structure I did wonder if that may be the culprit as it's not the first time there has been a change in acceptance based on unique ID length or in this case structure. I have tried some code with all the hex numbers generated randomly (including the xx-yy at the end) and this seemed to still work ok. Not suggesting that this is a good way to ensure a unique ID but was just wondering if something within this needs to adhere to some specific value or value sets - seems not. (tested using Dot 2 BTW)

@pvint pvint self-assigned this Mar 22, 2021
@pvint
Copy link
Member

pvint commented Mar 22, 2021

@Aircoookie Good stuff, many thanks!!

I've made some similar changes here, and it appears to be working fine now. I've committed it to the master branch and will try to get a new release out quickly.

@oponyx
Copy link

oponyx commented Mar 22, 2021

Hi, glad to hear that.
Hope amazon doesn't break things again! 😉

@pvint
Copy link
Member

pvint commented Mar 25, 2021

I've released version 3.3 to address this, and it should be good with that or the current master branch.

Let me know, thanks!
Paul

@cleiton2193
Copy link

Olá, obrigado @Aircoookie :) Tentei fazer isso e funcionou muito bem. Todos os meus dispositivos estão funcionando com fauxmoESP com esta solução

Bom dia.
Estou vendo aqui que vc conseguiu uma solução para a Alexa voltar a descobrir dispositivos.
Eu tinha tudo funcionando em minha casa, e comprei um outro roteador, deletei os dispositivos, para minha surpresa, nada foi encontrada mais, vc pode me ajudar?

@cleiton2193
Copy link

Eu lancei a versão 3.3 para resolver isso, e deve ser bom com isso ou com o branch master atual.

Me avise, obrigado!
Paulo

Bom dia.
Pode me ajudar?
Onde consigo essa versão 3.3?
Aqui TB, a Alexa não descobre mais nada!

@cleiton2193
Copy link

Boa noite ,testei a versão 3.3, sem resultado.
Não encontra dispositivos.
Como vc pediu para deixar aqui os resultados.
Muito obrigado, conseguindo algo, me avise por favor.

@barneyz
Copy link

barneyz commented Mar 30, 2021

fauxmo 3.3 with basic example is working fine (5 new devices detected), newest espalexa-libary 2.7.0 is also working fine!
(Wemos D1 mini, Echo plus V 2, 1.4 high bandwith,)

  1. I search always new devices with the alexa app, scenes ->search for new scenes.
  2. sometimes a further remove/deleted "old" device (with another unique-id) is not really deleted in the alexa database. You can't see it in the alexa-app, but on the website "https://alexa.amazon.xxx" (on smart-home page) , which must be removed there. If it has the name of the device you will find again, it will block the discovery
  3. be sure you when you exchange the library-version and you compile the code, that .o and .d-files of the library and sketch are really build new(i had this problem a year ago, i think reason was that new fauxmoESP.cpp was older than fauxmoESP.cpp.o/.d, buildung new did not change the .o/.d files

@cleiton2193
Copy link

Obrigado pelo comunicado.
Vou fazer teste com menos dispositivos, pois na minha placa eu adicionava 16 dispositivos, e nunca tive problema

@cleiton2193
Copy link

Boas notícias, realmente adicionado até 10 dispositivos , aceitou na minha programação.
Obrigado pessoal.
FauxmoEsp 3.3

@cleiton2193
Copy link

11 dispositivos já não consegue adicionar nada, só para ajudar as pessoas que devem estar sofrendo igual eu sofri nesses dias.
Mais muito obrigado pessoal, 10 já é um bom número.

@b1gmans
Copy link

b1gmans commented Mar 31, 2021

Hi - My system stopped working a week or so ago - I have just tried updating to V3.3 and it still is not working. My Echo Dot wont find any of my devices anymore. I have even tried the example source and it woint find those coloured lamp test devices either.

@cleiton2193
Copy link

Bom dia Bg1 gmans.
Meu microcontrolador é um esp32, só testei com esse ainda ,mais está funcionando sim.
Só que não está conseguindo emular mais de 10 dispositivos.
Assim que vc mudar a biblioteca fauxmo Para 3.3, não esqueça de eliminar a outra biblioteca.
Reinicie a ide do arduino.

@b1gmans
Copy link

b1gmans commented Mar 31, 2021

After a lot of experimentation I eventually got 3.3 to work - I had 15 devices defined, had to trim down to 10 max as suggested by cleiton2193

@cleiton2193
Copy link

Que bom que conseguiu meu amigo B1 gmans
Creio que em breve vai poder adicionar mais dispositivos.
Abraço.

@b1gmans
Copy link

b1gmans commented Mar 31, 2021

So Why is there now a limit on the number of devices I can create? is it the json text length - I note there is a lot more info for each item being sent?

@cleiton2193
Copy link

Creio que não é um limite, mais o novo comprimento do texto parece que diminui a quantidade de dispositivos que podem ser descobertos.
E pelo jeito é algo sem volta, pois a mudança foi feita pela Amazon.
Eu vou entrar no aluta para criar a minha própria skill da Alexa .
Dessa forma vai ser mais fácil de trabalhar.

@cleiton2193
Copy link

Novidade meu amigo.
Esp32.
Com 13 dispositivos funciona TB.
Pode fazer um experimento.
Funcionou aqui de boa.
Esp01, funciona 2 dispositivos

@rezendeneto
Copy link

@pvint yes, both my phone and the ESP are on the same 2.4GHz WiFi. I've also enabled the verbosity for debugging, as I'm using a small Node.JS program that sends some SSDP requests and I can see a lot going on in the serial monitor. Still I can't have the Amazon Alexa app find the ESP on the network...

@rezendeneto
Copy link

I'm actually not 100% certain that it will work without a real Amazon device, but I thought I remembered others saying it worked for them. It's hard for me to test because I have a bunch of them!

Maybe it's time for me to get a real amazon device then... what would you recommend me?

@cleiton2193
Copy link

Tanto o echo dot 3° e 4° geração eu testei E está funcionando muito bem.

@rezendeneto
Copy link

@cleiton2193 ok, obrigado

@pvint
Copy link
Member

pvint commented Apr 4, 2021

@rezendeneto I'd say whatever your budget tells you to get is fine. ;)

@cleiton2193
Copy link

Boa tarde.
Alguém sabe me dizer se essa biblioteca funciona com o Google home mini TB?

@larryl79
Copy link

larryl79 commented Nov 4, 2021

I've tried first time in mylife, fauxmo (latest lib on Arduino ide) and ESPalexa examples and none of them worked for me.
I've got alexa app, echo dot gen2 & gen3, and echo show 5. Board: ESP32-dev V1 (dual core, 240mhz, wifi +BT BLE)
all device on same 2.4Ghz wifi.

I've tried just handle the builtin_led.

all try ended up with "I couldn't find any new devices ..."

refused access to: http://192.168.25.56:1901/api/lights

I can access to the description.xml on both lib by browser.
<root xmlns="urn:schemas-upnp-org:device-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <URLBase>http://192.168.25.37:80/</URLBase> <device> <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType> <friendlyName>Philips hue (192.168.25.37:80)</friendlyName> <manufacturer>Royal Philips Electronics</manufacturer> <manufacturerURL>http://www.philips.com</manufacturerURL> <modelDescription>Philips hue Personal Wireless Lighting</modelDescription> <modelName>Philips hue bridge 2012</modelName> <modelNumber>929000226503</modelNumber> <modelURL>http://www.meethue.com</modelURL> <serialNumber>94b97efb34f0</serialNumber> <UDN>uuid:2f402f80-da50-11e1-9b23-94b97efb34f0</UDN> <presentationURL>index.html</presentationURL> </device> </root>

@rezendeneto
Copy link

I've tried first time in mylife, fauxmo (latest lib on Arduino ide) and ESPalexa examples and none of them worked for me. I've got alexa app, echo dot gen2 & gen3, and echo show 5. Board: ESP32-dev V1 (dual core, 240mhz, wifi +BT BLE) all device on same 2.4Ghz wifi.

I've tried just handle the builtin_led.

all try ended up with "I couldn't find any new devices ..."

refused access to: http://192.168.25.56:1901/api/lights

I can access to the description.xml on both lib by browser. <root xmlns="urn:schemas-upnp-org:device-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <URLBase>http://192.168.25.37:80/</URLBase> <device> <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType> <friendlyName>Philips hue (192.168.25.37:80)</friendlyName> <manufacturer>Royal Philips Electronics</manufacturer> <manufacturerURL>http://www.philips.com</manufacturerURL> <modelDescription>Philips hue Personal Wireless Lighting</modelDescription> <modelName>Philips hue bridge 2012</modelName> <modelNumber>929000226503</modelNumber> <modelURL>http://www.meethue.com</modelURL> <serialNumber>94b97efb34f0</serialNumber> <UDN>uuid:2f402f80-da50-11e1-9b23-94b97efb34f0</UDN> <presentationURL>index.html</presentationURL> </device> </root>

here it only works with gen4

@larryl79
Copy link

larryl79 commented Nov 5, 2021

I've tried first time in mylife, fauxmo (latest lib on Arduino ide) and ESPalexa examples and none of them worked for me. I've got alexa app, echo dot gen2 & gen3, and echo show 5. Board: ESP32-dev V1 (dual core, 240mhz, wifi +BT BLE) all device on same 2.4Ghz wifi.
I've tried just handle the builtin_led.
all try ended up with "I couldn't find any new devices ..."
refused access to: http://192.168.25.56:1901/api/lights
I can access to the description.xml on both lib by browser. <root xmlns="urn:schemas-upnp-org:device-1-0"> <specVersion> <major>1</major> <minor>0</minor> </specVersion> <URLBase>http://192.168.25.37:80/</URLBase> <device> <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType> <friendlyName>Philips hue (192.168.25.37:80)</friendlyName> <manufacturer>Royal Philips Electronics</manufacturer> <manufacturerURL>http://www.philips.com</manufacturerURL> <modelDescription>Philips hue Personal Wireless Lighting</modelDescription> <modelName>Philips hue bridge 2012</modelName> <modelNumber>929000226503</modelNumber> <modelURL>http://www.meethue.com</modelURL> <serialNumber>94b97efb34f0</serialNumber> <UDN>uuid:2f402f80-da50-11e1-9b23-94b97efb34f0</UDN> <presentationURL>index.html</presentationURL> </device> </root>

here it only works with gen4

then I don't know what I doing wrong... any ideas by the details or need more detail? if yes what are you need?

@cleiton2193
Copy link

Bom dia Larry.
Já tive esse problema que vc está enfrentando, e só resolvi trocando o roteador.
Se tiver um outro roteador aí, faz um teste .

@larryl79
Copy link

larryl79 commented Nov 5, 2021

Bom dia Larry. Já tive esse problema que vc está enfrentando, e só resolvi trocando o roteador. Se tiver um outro roteador aí, faz um teste .

I'm on a 48 port Cisco gigabit router switch with cisco AP-s, all echos, phone, ESP in same VLAN.
Anyway I'll find something soho router in the basement, and I'll give a go for it. Thanks for the idea, I'll get back with the results.

@cleiton2193
Copy link

Os dispositivos Alexa, funciona em rede 5G, mais sabemos que as nossas placas, não funciona com redes 5G, então conecte a Alexa em rede 2.4G.
Espero que de certo meu amigo.

@cleiton2193
Copy link

Lembrando, só funciona na última versão da biblioteca, nas anteriores, não encontra mais dispositivos.

@larryl79
Copy link

larryl79 commented Nov 5, 2021

so far now:

  • I've created separate 2.4 wifi on the Cisco access point, with a separate VLAN.
  • connected echo gen2, and phone to the new 2.4 wifi.
  • unplugged rest of alexa devices
  • flashed ESP32 and ESP6266 with fauxmoESP_Basic
  • tried search both (32/8266) with phone, and with echo gen2 (phone wifi off)
  • latest Asyncwebserver and asynctcp downloaded from me-no-dev github (today) (lib dependencies of example ino)
  • fauxmoESP lib version: 3.4
  • using Arduino IDE

same result, no new device found.

I still will go into the basement search for a soho wifi router, and will try with that as well...

p.s. espalexa lib same results on this wifi with both dev (32/8266)

@ddweber456
Copy link

I have found if I have many Alexa Dots, Echos, Shows all on the same network, I need to unplug most if not all but 1 Alexa Dot or Echo and do the discover devices. After the discovery, the devices can be plugged back in.

@larryl79
Copy link

larryl79 commented Nov 6, 2021

Sorry guys, looks like my cisco devices was misconfigured.
I've tried a soho router, and immediately worked, so I went back to the cisco and it's configuration... now looks fine for discovering.

I'm not sure yet it's just the cisco config was bad or adding mDNS to the scketch needed as well in the setup()

if (!MDNS.begin("esp32")) { Serial.println("Error setting up MDNS responder!"); while(1) { delay(1000); } } Serial.println("mDNS responder started"); MDNS.addService("http", "tcp", 80);

Sorry again, I never thought this. Thanks

@cleiton2193
Copy link

Que bom que conseguiu meu amigo.
Igual eu tinha te falado.
Já aconteceu comigo e eu resolvi trocando o roteador.
Abraço.

@fabiopdm
Copy link

Fala @cleiton2193 !

Tudo bem!? Bom ver BR`s por aqui. Sobre a biblioteca, realmente só é possível localizar os dispositivos se você tiver algum hub como o Echo Dot? Não há possibilidades de encontrar os mesmo via App da Alexa por exemplo no iOS?

Estou com problemas para encontrar os mesmos via App e não tenho o hub por aqui. Estou até pensando em comprar um, mas não agora.

Se souber de algo, já ajuda.

Abraços a todos!

@brenocbn
Copy link

Olá. E sobre a Alexa só encontrar os dispositivos a partir de um Echo, foi confirmado? Estou tentando somente pelo aplicativo do android e ela não encontra de jeito nenhum.

@cleiton2193
Copy link

cleiton2193 commented Feb 16, 2022 via email

@brenocbn
Copy link

Eu tenho uma FireStick TV Lite, mas não consigo encontrar com ela também... Talvez ela não seja como os Echos

@cleiton2193
Copy link

cleiton2193 commented Feb 16, 2022 via email

@DDTORRES055
Copy link

fauxmo 3.3 with basic example is working fine (5 new devices detected), newest espalexa-libary 2.7.0 is also working fine! (Wemos D1 mini, Echo plus V 2, 1.4 high bandwith,)

  1. I search always new devices with the alexa app, scenes ->search for new scenes.
  2. sometimes a further remove/deleted "old" device (with another unique-id) is not really deleted in the alexa database. You can't see it in the alexa-app, but on the website "https://alexa.amazon.xxx" (on smart-home page) , which must be removed there. If it has the name of the device you will find again, it will block the discovery
  3. be sure you when you exchange the library-version and you compile the code, that .o and .d-files of the library and sketch are really build new(i had this problem a year ago, i think reason was that new fauxmoESP.cpp was older than fauxmoESP.cpp.o/.d, buildung new did not change the .o/.d files

This worked for me

Worked with NodeMCU V3 and V1
following the table:

Platform Gen1 Gen2 Gen3
ESP8266 Core 2.3.X OK OK? OK (1)
ESP8266 Core 2.4.0 OK (2) OK? (2) OK (1, 2)
ESP8266 Core 2.4.1 OK (2) OK? (2) OK (1, 2)
ESP8266 Core 2.4.2 OK (2) OK? (2) OK (1, 2)
ESP32 OK OK? OK (1)

(1) When using gen3 devices TCP port must be 80 always. (2) Arduino Core for ESP8266 requires LwIP set to "v1.4 Higher Bandwidth".

First, I tried for the NodeMCU V3 (Gen3), and set the TCP port to 80, this to my surprise (I had almost no hope left xd), it worked.
Then I wanted to try with the NodeMCU V1 (Gen1), taking the table as a reference, I removed the line that specified the TCP port in 80 (fauxmo.setPort(80);), and it did not work (I tried several times), so just to experiment I put the fauxmo.setPort(80); back in the code, and still to more surprise, it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests