Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.57k stars 3.12k forks source link

Dropping Wifi Connection #424

Closed ozzi91 closed 3 years ago

ozzi91 commented 4 years ago

Hello! I have problem with drop wifi connection. After 20-30mins my wled on wemos d1 mini is not reachable till wemos reset. After reset wled is working again for next 20-30mins and goes off. I tried 2 wemos, and it is not working at all.

I tried wled_0.8.6_ESP8266_lwip1 and WLED_0.8.5_ESP8266 flashed by esphome flasher but it doesnt help-the same result. Distance between router and esp its like 10cm. I can provide you any information you want to check it out. If it is matter i integrate it with HA.

gegu commented 4 years ago

@gegu awesome! Would you be interested in submitting the usermod as a pull request? I would then ask people with WiFi issues to give it a try and if it helps a lot of users I would add it to the base code as an option :)

Gladly, it's done. Since it is not really an extension of the functionality, I have not yet created a PR 😄 But it's true, the connection problems are unfortunately quite common and affect many users.

It would be great if there was a setting option for it. Of course, only if it helps others as well..

acorn1sh commented 4 years ago

Would love to give it a try but still new to this. How would I compile for a nodemcu?

gegu commented 4 years ago

See the wiki section Compile settings - ESP8266

Aircoookie commented 4 years ago

What might also be of interest for a few of you is https://github.com/Aircoookie/WLED/issues/946#issuecomment-634100863 That surprisingly helped a lot of users.

acorn1sh commented 4 years ago

What might also be of interest for a few of you is #946 (comment) That surprisingly helped a lot of users.

This has fixed my issues so far!

gegu commented 4 years ago

After some testing time I can tell you that with a WLED version compiled using the latest core version ESP8266 2.7.1 there are no more WiFi problems in my environment. I have disabled the fix and used the default WiFi settings.

gegu commented 4 years ago

What I wrote was unfortunately not true.

It worked because MQTT was active. If I decativate MQTT I need the ping fix again. So it is clear that outgoing requests help to keep the network services active.

After some testing time I can tell you that with a WLED version compiled using the latest core version ESP8266 2.7.1 there are no more WiFi problems in my environment. I have disabled the fix and used the default WiFi settings.

stale[bot] commented 3 years ago

Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. Thank you for using WLED!

Zoltant7 commented 3 years ago

Tried the latest 10.x Wled,flashed the precompiled bin with esphome flasher I got : wemos d1 mini, with or without leds same,it's looses connection after 5 sec, finally I flashed Tasmota just to see is it a defective unit but seems to work with it just perfectly,BTW : last year it worked perfectly with the 8.x WLED

RandomPotato893 commented 3 years ago

I need some help. I've been troubleshooting this for 3 days and I think I've tried everything imaginable. Different boards, different firmware releases, I did the ping thing, I built all the firmware by myself and it seems to not work. Any help appreciated.

AnshumanFauzdar commented 3 years ago

I need some help. I've been troubleshooting this for 3 days and I think I've tried everything imaginable. Different boards, different firmware releases, I did the ping thing, I built all the firmware by myself and it seems to not work. Any help appreciated.

Hi @RandomPotato893 I solved this reboot problem by using same power supply for WS2812 and board (In my case wemos d1 mini)

psinide commented 3 years ago

@gegu I followed your instructions on the usermods and compiled a bin file with it. I can't see the ping stats on the INFO page. I've used the d1_mini library for my D1 Mini Board while compiling Is there any configuration change required? or just copy pasting the usermod to wled00 and updating the usermods_list.cpp file as per your instructions enough?

gegu commented 3 years ago

The usermod is active, but with the current WLED version the user interface does not work. You can check this by querying http://<WLED-host>/json. PingDelay: 60 should exist here.

If you want to have the UI, you can use v0.11.1 of WLED. git checkout v0.11.1 before you make the change in usermods_list.cpp and the build.

@Aircoookie has something changed since v0.11.1 to place custom elements on the info page from a usermod?

gegu commented 3 years ago

@psinide UI should work again. You can use now the current master branch.

psinide commented 3 years ago

@psinide UI should work again. You can use now the current master branch.

Thanks, can see it in the GUI. The add on was running as you said, could see PingDelay on the JSON page, but the D1 mini still dropped off the network, albeit, it takes five six hours now, but still dropping off.

Just flashed it with a new git check out and can the UI is working again. Going to test it again

gegu commented 3 years ago

it takes five six hours now, but still dropping off.

It might help if you reduce the delay between pings in the GUI to 10 to 30 seconds. I also recommend rebooting the AP/router once.

spinkohass commented 3 years ago

I just setup 2 wled using esp8266/nodemcu boards and both are having this issue. I tried disabling sleep mode and dont have alexa sync enabled. They lose connection intermittently. I can see they have IP addresses on the router. What's interesting is that if one drops offline, it can still be controlled via the sync feature which suggests that it's the web-server dieing? Anyways, this is super frustrating to a noobie like me. I have not tried going to 11.0 yet. I have 2 new esp boards coming today, will see how that goes.

spinkohass commented 3 years ago

I just setup 2 wled using esp8266/nodemcu boards and both are having this issue. I tried disabling sleep mode and dont have alexa sync enabled. They lose connection intermittently. I can see they have IP addresses on the router. What's interesting is that if one drops offline, it can still be controlled via the sync feature which suggests that it's the web-server dieing? Anyways, this is super frustrating to a noobie like me. I have not tried going to 11.0 yet. I have 2 new esp boards coming today, will see how that goes.

Make that 4/4 boards that have this issue. I tried 11.0 (from 11.1) and it seems to have fixed one board.

spinkohass commented 3 years ago

I just setup 2 wled using esp8266/nodemcu boards and both are having this issue. I tried disabling sleep mode and dont have alexa sync enabled. They lose connection intermittently. I can see they have IP addresses on the router. What's interesting is that if one drops offline, it can still be controlled via the sync feature which suggests that it's the web-server dieing? Anyways, this is super frustrating to a noobie like me. I have not tried going to 11.0 yet. I have 2 new esp boards coming today, will see how that goes.

Make that 4/4 boards that have this issue. I tried 11.0 (from 11.1) and it seems to have fixed one board.

11.0 made it 24 hours then dropped it offline. 10.2 didn't work either (2 drops in 2 hours)

sockmonkey0223 commented 3 years ago

I know it's not a great answer, but after suffering with this on multiple ESP8266 boards forever, I finally switched to an ESP32 board and it has been rock solid.

spinkohass commented 3 years ago

I know it's not a great answer, but after suffering with this on multiple ESP8266 boards forever, I finally switched to an ESP32 board and it has been rock solid.

I appreciate the info - I wish I would have known about this before ordering these other boards. I have ordered 3 digUno in Jan, but am getting impatient as they are taking forever to become available/deliver. I ordered 3 esp8266 to kill the time with the thought of repurposing these boards later. 1 showed up dead. Then I ordered 2 more. At this point, I have 4 boards and all of them are intermittent, but some more than others. Sigh. I guess I will put up with these until the DigUno's show up (esp32 based) and hope for the best.

BroManDudeGuyPhD commented 3 years ago

I'm actually running into this as well. One board is a DigUno and one is ESP32. I've flashed both again and turned off WiFi sleep

BroManDudeGuyPhD commented 3 years ago

So making each IP reserved on my router and using the reserved IP setting in WLED got me the longest uptime I've seen so far

I also have run into the weird issue where they're both offline in the app, I manually unplug one, it comes online so I turn on sync, and my other light works with sync even though it's offline in the app. This only works about half the time

shayded-exe commented 2 years ago

It would be nice if we could configure a GPIO pin as a reset button to either restart WLED or reset the WIFI connection in the event of a dropout.

AnshumanFauzdar commented 2 years ago

It would be nice if we could configure a GPIO pin as a reset button to either restart WLED or reset the WIFI connection in the event of a dropout.

Wi-Fi connection is working fine on latest versions and there is experimental Wi-Fi sleep option on setting -> Wi-Fi page: image

BroManDudeGuyPhD commented 2 years ago

Actually, I haven't had an issue after separating my 2.4 and 5GHz bands. Try this. Had it on auto before, but now all my smarthome WLED stuff has been online for weeks straight with no issues. Most these boards need 2.4 and for some reason auto on the router just messes them up

shayded-exe commented 2 years ago

Wi-Fi connection is working fine on latest versions and there is experimental Wi-Fi sleep option on setting -> Wi-Fi page: image

By latest versions do you mean 0.12.x or beta 0.13.x (I'm on 0.12.x)?

I've been having dropouts that require a reset after five or so minutes of use. I'll give the WiFi sleep option a try!

Actually, I haven't had an issue after separating my 2.4 and 5GHz bands. Try this. Had it on auto before, but now all my smarthome WLED stuff has been online for weeks straight with no issues. Most these boards need 2.4 and for some reason auto on the router just messes them up

I'm already using separate bands. Do you have WiFi sleep disabled?

olialb commented 2 years ago

I had also a lot of connection issues with 0.12.x release. I needed to reset power many times. Sometimes serveral times a day. Also with "Disable Wifi sleep" same issues.

3 day ago I updated to 0.13.0-b7. Since that update WIFI seams to be absolute stable... Is somthing changed in 0.13.0 which improves the wifi stability?

blazoncek commented 2 years ago

3 day ago I updated to 0.13.0-b7. Since that update WIFI seams to be absolute stable... Is somthing changed in 0.13.0 which improves the wifi stability?

you bet! 😁

olialb commented 2 years ago

@blazoncek May be stupid question.. OK :-). In the realease note I did not find nothing about this...

blazoncek commented 2 years ago

Newer ESP core. Not WLED related, but still beneficial.

olialb commented 2 years ago

@blazoncek Cool!! I really like this great project with all the features. Thanks to all conributors! If the new ESP core make the difference its super good news! At the end its all about stability of the WiFi connection to be happy with it in all day use and I was really annoyed about this connection losts.

shayded-exe commented 2 years ago

Newer ESP core. Not WLED related, but still beneficial.

Does this also benefit ESP-8266?

blazoncek commented 2 years ago

I think yes. Check platformio.ini.

You can always choose to compile yourself with the latest ESP core.

olialb commented 2 years ago

Does this also benefit ESP-8266?

@rshea0. Actually I am using ESP-8266 and WIFI seams to be stable now!

shayded-exe commented 2 years ago

@rshea0. Actually I am using ESP-8266 and WIFI seams to be stable now!

Excited to hear! I took a break from my project but I'll have to test it out when I start on it again.

Losses commented 1 year ago

Using ESP8266, the issue still exists (0.14, bl0), is there any way to provide some logs for the developers?

blazoncek commented 1 year ago

Use debug build and monitor serial output. You will need to compile your own binary or check @srg74 repository for pre-compiled debug binaries.

Losses commented 1 year ago

Use debug build and monitor serial output. You will need to compile your own binary or check @srg74 repository for pre-compiled debug binaries.

One more detail, if I turn on the light, it will always work, but if it's turned down, the Wifi connection will be unavailable eventually.

So, there's a question, I have to turn on the "debug mode" and keep watching the terminal until the device is down? That looks really exhausting...

blazoncek commented 1 year ago

Unfortunately, yes.

Losses commented 1 year ago

Okay, I'll do that

Suxsem commented 1 year ago

Same issue for me. Esp8266, after some hours the IP stack dies (wifi connected but no ping, no http response) despite the led effects still running. Will try the no wifi sleep without much hope...

Suxsem commented 1 year ago

If I disconnect the device from the access point control panel, it will reconnect and start to repond again, without any reboot required. (runtime is weeks so no power supply related issue here)

exhibitO commented 3 months ago

I too have having this issue and it seems agnostic of WLED version, I have tried several and toggled settings above such as Disable Wifi sleep, static IP and it still happens.

Trying to update firmware for ESP-WROOM-32 as indicated here https://docs.espressif.com/projects/esp-at/en/latest/esp32/Get_Started/Downloading_guide.html#id4, after that I reflashed WLED and 🤞🏽