vintlabs / fauxmoESP

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

After some hours/days fauxmoESP device doesn't react to Alexa anymore #162

Closed samtrot closed 3 years ago

samtrot commented 3 years ago

Hello,

I have setup everything in a way that it works with Alexa and I can control my ESP8266 with fauxmoESP. So thank you for the great work1

However, after some hours or even days, Alexa doesn't find the device anymore - "please check your network connection" etc.

Is there any sleep mode or something? Is this a know problem? What could I do to prevent it?

Best Regards

sebkouba commented 3 years ago

It could be several things.

Can you still ping the device? That would indicate wireless issues which would be my first guess. As a workaround you could restart the device when you don't need it (at night?) or implement a wifi reconnection function. I've never had issues with devices disappearing so I'd start looking other directions.

pvint commented 3 years ago

I had the same problem with one WiFi network about a year ago (I don't recall what type of router it was). On other networks they seem to stay connected for a long time with the same code.

Devices would run for a day or so, then unreachable. I tried a few things to detect when it had lost connection, but was not able to sort it out.

What I ended up doing was using ESP32-Ping (there's an ESP8266Ping library too, but haven't tested it). I set it up to ping the router once every 15 minutes, and if it could not reach it, disconnect the WiFi, reconnect, and try again.

samtrot commented 3 years ago

The behaviour has not repeated since I have written the above message. :-)

I will try next time to ping the device and eventually implement that 15min ping. Thank you for your answers.