witnessmenow / esp8266-alexa-wemo-emulator

multiple belkin wemos switch emulator using ESP8266
GNU General Public License v2.0
132 stars 43 forks source link

Unable to discover esp8266 with Echo show 2nd Gen. #23

Open AliAlawi96 opened 3 years ago

AliAlawi96 commented 3 years ago

My esp connects to the wifi and reacts when I search for devices using the Alexa app however the app always comes back with no devices found. I have checked if the device has already been discovered however it's not there. I've restarted the board, Alexa and my phone but nothing changes. anyone had similar issues?

crwhite57 commented 3 years ago

What is the code you are using? I had the same problem, at times it would only find 1 - 4 devices, and other times it would not find any devices. I found the problem and it now finds all 8 devices on my esp8266 and 16 devices on my esp32s. You just need to make this one adjustment to your sketch.

Most sketches have this loop void loop() { espalexa.loop(); delay(1); }

The problem is that the delay is too short of a time. It does not give Alexa time to recognize the device. What I did was changes the delay from 1 to 10, like this:

void loop() { espalexa.loop(); delay(10); }

That fixed all of my problems. Let me know if it works for you.