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.74k stars 3.17k forks source link

D1 Mini dropping off the network #1629

Closed psinide closed 2 years ago

psinide commented 3 years ago

The board drops off the network after sometime. The most its stayed on the network is about 5-6 hours. I've tried using the Disable WiFi sleep option, used boards from different brands & also used 3 different WS2812B LED strips. Either a reset, power cycle or even rebooting the Wifi router brings it back on the network

To Reproduce I have reproduced this with the D1 Mini connected to the same power supply as the LED strip, connected to different power supplies, connecting only the D1 Mini to power and also same combinations when connecting to a computer. It has never lasted through out the night

Have also commented in issue #424 and used @gegu 's ping usermod, but face the same issue.

WLED version

Additional context Flashed ESPhome with FastLED on the same boards and the setup is working for 3 days and counting now. Will be trying on a nodemcu board soon.

Thank you for your help!

Travisco29 commented 3 years ago

Having the same issue. reverting to the previous release fixed it

psinide commented 3 years ago

Having the same issue. reverting to the previous release fixed it

Which version? 0.11.0?

Travisco29 commented 3 years ago

yes that is what i reverted too

w00000dy commented 3 years ago

How many LEDs do you have?

psinide commented 3 years ago

60 LEDs on a 1m strip, powered with a 5v 1.8mA USB power adapter. Currently reverted back to 0.11.0 and no issues for 2 hours

Travisco29 commented 3 years ago

same thing was happening with one of my nodemcus, reverted and its fine now

psinide commented 3 years ago

17 hours and counting. The first one to go through the night! Looking hopeful, will continue to test over the weekend and switch back to WLED once I'm convinced! Currently I only have the D1 Mini connected to power with no LEDs, will continue the tests with a strip connected and keep you posted.

psinide commented 3 years ago

I got a full night with the LEDs connected, but it dropped off while i was away. It could be due to external factors. Going to test further and post results here.

Travisco29 commented 3 years ago

How are you powering the leds? Directly into the d1 or external power supply

On Sat, Jan 9, 2021 at 9:43 AM psinide notifications@github.com wrote:

I got a full night with the LEDs connected, but it dropped off while i was away. It could be due to external factors. Going to test further and post results here.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Aircoookie/WLED/issues/1629#issuecomment-757341258, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIL3NPHLSUVXVNQSDA3SZCIUJANCNFSM4VXXFO5A .

psinide commented 3 years ago

How are you powering the leds? Directly into the d1 or external power supply On Sat, Jan 9, 2021 at 9:43 AM psinide @.***> wrote: I got a full night with the LEDs connected, but it dropped off while i was away. It could be due to external factors. Going to test further and post results here. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1629 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIL3NPHLSUVXVNQSDA3SZCIUJANCNFSM4VXXFO5A .

Directly into the D1. The D1 is connected to a 5v 2A USB adapter and I've limited the current draw and peak brightness via Wled to 1500mA

Travisco29 commented 3 years ago

I had issues with every version with that approach and switched to external On Sat, Jan 9, 2021 at 10:06 AM psinide notifications@github.com wrote:

How are you powering the leds? Directly into the d1 or external power supply … <#m-8337907941344558011> On Sat, Jan 9, 2021 at 9:43 AM psinide @.***> wrote: I got a full night with the LEDs connected, but it dropped off while i was away. It could be due to external factors. Going to test further and post results here. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1629 (comment) https://github.com/Aircoookie/WLED/issues/1629#issuecomment-757341258>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIL3NPHLSUVXVNQSDA3SZCIUJANCNFSM4VXXFO5A .

Directly into the D1. The D1 is connected to a 5v 2A USB adapter and I've limited the current draw and peak brightness via Wled to 1500mA

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Aircoookie/WLED/issues/1629#issuecomment-757344608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIPW3E25Q3POCILFLVTSZCLI7ANCNFSM4VXXFO5A .

psinide commented 3 years ago

I had issues with every version with that approach and switched to external On Sat, Jan 9, 2021 at 10:06 AM psinide @.> wrote: How are you powering the leds? Directly into the d1 or external power supply … <#m-8337907941344558011> On Sat, Jan 9, 2021 at 9:43 AM psinide @.> wrote: I got a full night with the LEDs connected, but it dropped off while i was away. It could be due to external factors. Going to test further and post results here. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1629 (comment) <#1629 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIL3NPHLSUVXVNQSDA3SZCIUJANCNFSM4VXXFO5A . Directly into the D1. The D1 is connected to a 5v 2A USB adapter and I've limited the current draw and peak brightness via Wled to 1500mA — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1629 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIPW3E25Q3POCILFLVTSZCLI7ANCNFSM4VXXFO5A .

My ESPHome LED strips are working with out any issues in the same setup. I'll try an external supply as well for testing, but this setup is not feasible for my use case. These LEDs are accent and ambient lights, extra wires will not make them aesthetic

psinide commented 3 years ago

@Travisco29 are you using an external power supply (non-usb) to power the D1? If so, can you share your schematic? I don't have a logic shifter, so testing this will have to wait till the component is delivered

psinide commented 3 years ago

Current uptime - 1 day, 12 hours. No changes done with the connections. The strip is is still powered via the D1

psinide commented 3 years ago

It was working well till last night. But now started dropping again since today morning

Aircoookie commented 3 years ago

@psinide I'm very sorry, this must be frustrating. What router model are you using? I haven't found the reason for worse WiFi reliability in WLED compared to Tasmota and ESPHome yet unfortunately. Definitely does not sound like a hardware issue though.

psinide commented 3 years ago

@Aircoookie really appreciate what you've done here! I'm using a Netgear X8000 and the D1 is about 3 feet away with line of sight as well. I'm waiting for the logic shifter to be delivered to try power the Led strip and the D1 mini separately.

Doyle4 commented 3 years ago

Glad its not just me, 11.0. and 11.1, once SSD and Password is entered and rebooted, I have to reflash the firmware as it will not connect to my home router and no way of access the board its self using IP or AP even with it enabled. Thought it may of been a faulty board, but all of my ESP32's and D1 Mini Pros all will not connect.

flibble2000 commented 3 years ago

I'm also experiencing similar issues, since I discovered WLED with v 0.10.2. I have 4 d1 minis, each have a 12v power supply for the WS2815 and the D1 is powered by usb from a 12v stepdown converter. There is common ground between LED's and the D1s. The PSU's are all 12v 5amp output, and the stepdown has a 3amp max rating. Both run well within power specifications has there is no more than 120 LED's on a single strip.

All appear to stop communicating at what seems to be random times. All 4 do not stop at the same time, some will stay up for a couple of days then need resetting, others will be just a few hours. There is no pattern to which D1's stop, so one unit could stay up for a couple of days, but then stop repeatedly over a 24 hour period.

I have compiled by own with the Fixunreachablenetservices usermod, and tried various polling intervals in this from 10 to 60 seconds and it doesn't appear to make a difference. I have also turned off the sync options.

When they stop communicating, they all stay connected to wireless and I can get them working again by dropping them off the network from my wireless controller.

My wireless setup is a Fortinet-WLC with a number of AP's around the house. The IOT network is hidden (I have tried with it not being) and the D1's stick to the closest AP which is in the kitchen. They stick to this AP with signal strength ranging between 45-60db.

I have moved to ESPHome for now just to get some reliable lighting going on, they have been rock solid for the passed 2 weeks now. But would like to move back in the future and if there is any testing that needs doing I'm happy to help.

psinide commented 3 years ago

I have also moved to ESPHome for now. I'm waiting for my nodeMCU & ESP32 boards to arrive, will test WLED on those. It seems that D1/mini suffers the most from this problem

barrenechea commented 3 years ago

I have also moved to ESPHome for now. I'm waiting for my nodeMCU & ESP32 boards to arrive, will test WLED on those. It seems that D1/mini suffers the most from this problem

For me, three ESP32's (all the ones that I have with WLED) are dropping after the latest updates as well, just for you to know (on v0.9 and v0.10 never had this issue AFAIK).

pk88888 commented 3 years ago

I have six custom boards with V0.11.1 and noticed the same behavior as others. All boards with esp32 are dropping connection after few hours or sometimes after few days.

jlegen commented 3 years ago

I'm also hit by WLED UI (0.11.1 on D1 minis) getting unresponsive after some random time. And i also noticed that they're then still connected to Wifi. I am using a work around now, which eliminated the problem for me: a cron job is issuing a "ping" to WLED's IP every minute. Works for some weeks now... :-)

Travisco29 commented 3 years ago

That's a good idea but i am probably just going to try switching to esp32s and see if that fixes it.

On Sun, Jan 24, 2021 at 7:54 AM jlegen notifications@github.com wrote:

I'm also hit by WLED UI (0.11.1 on D1 minis) getting unresponsive after some random time. And i also noticed that they're then still connected to Wifi. I am using a work around now, which eliminated the problem for me: a cron job is issuing a "ping" to WLED's IP every minute. Works for some weeks now... :-)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Aircoookie/WLED/issues/1629#issuecomment-766371915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIILH2VVIZCYV3JOW5SDS3Q7D7ANCNFSM4VXXFO5A .

Doyle4 commented 3 years ago

I have to ask, how are you guys even getting them to connect to your router? 1 of mine did, the other 4 I have to re flash, soon as I press save after adding SSD and password, the device is useless as it wont connect to the router and no AP shows even when enabled, leading to be re-flashed.

psinide commented 3 years ago

I'm also hit by WLED UI (0.11.1 on D1 minis) getting unresponsive after some random time. And i also noticed that they're then still connected to Wifi. I am using a work around now, which eliminated the problem for me: a cron job is issuing a "ping" to WLED's IP every minute. Works for some weeks now... :-)

Where is your cron job running? There is a usermod which pings the router from the WLED firmware, I was using it, and for a while it all worked well. The ESP was on the network for 3 days without a drop and then suddenly it started failing. I tried to re-flash it with the usermod, reduced the ping intervals to 30 & 10 seconds, but still it would drop off.

I have to ask, how are you guys even getting them to connect to your router? 1 of mine did, the other 4 I have to re flash, soon as I press save after adding SSD and password, the device is useless as it wont connect to the router and no AP shows even when enabled, leading to be re-flashed.

I have faced no issues with the setup. After flashing, I can see the AP and then can configure my SSID and it connects to my network. The intermittent drops from the network are the only problem I'm facing.

jlegen commented 3 years ago

I'm also hit by WLED UI (0.11.1 on D1 minis) getting unresponsive after some random time. And i also noticed that they're then still connected to Wifi. I am using a work around now, which eliminated the problem for me: a cron job is issuing a "ping" to WLED's IP every minute. Works for some weeks now... :-)

Where is your cron job running? There is a usermod which pings the router from the WLED firmware, I was using it, and for a while it all worked well. The ESP was on the network for 3 days without a drop and then suddenly it started failing. I tried to re-flash it with the usermod, reduced the ping intervals to 30 & 10 seconds, but still it would drop off.

i am using iobroker (also for WLED), so i have a 24/7 server running...

I have faced no issues with the setup. After flashing, I can see the AP and then can configure my SSID and it connects to my network. The intermittent drops from the network are the only problem I'm facing.

same here, setup etc. worked like a charm; the problem with the UI/web drop almost feels like a "powersave feature", where somehow the wakeup doesn't work properly. At least it's probably not IDF/ESP8266-Core related, since Tasmota is based on that as well, and is running fine "for years" on those D1 minis...

Travisco29 commented 3 years ago

didn't help me but did you try the disable wifi sleep option in the wifi settings?

On Wed, Jan 27, 2021 at 4:23 AM jlegen notifications@github.com wrote:

I'm also hit by WLED UI (0.11.1 on D1 minis) getting unresponsive after some random time. And i also noticed that they're then still connected to Wifi. I am using a work around now, which eliminated the problem for me: a cron job is issuing a "ping" to WLED's IP every minute. Works for some weeks now... :-)

Where is your cron job running? There is a usermod which pings the router from the WLED firmware, I was using it, and for a while it all worked well. The ESP was on the network for 3 days without a drop and then suddenly it started failing. I tried to re-flash it with the usermod, reduced the ping intervals to 30 & 10 seconds, but still it would drop off.

i am using iobroker (also for WLED), so i have a 24/7 server running...

I have faced no issues with the setup. After flashing, I can see the AP and then can configure my SSID and it connects to my network. The intermittent drops from the network are the only problem I'm facing.

same here, setup etc. worked like a charm; the problem with the UI/web drop almost feels like a "powersave feature", where somehow the wakeup doesn't work properly. At least it's probably not IDF/ESP8266-Core related, since Tasmota is based on that as well, and is running fine "for years" on those D1 minis...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Aircoookie/WLED/issues/1629#issuecomment-768250616, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIP5JWHP4RG2ML2AI7DS4AAVPANCNFSM4VXXFO5A .

jlegen commented 3 years ago

didn't help me but did you try the disable wifi sleep option in the wifi settings?

Yes, didn‘t change anything - which makes sense, because Wifi does not go sleep in this case, connection is still listed in router, and ping would also not work without Wifi...

WJCFerguson commented 3 years ago

Same issue - loss of connectivity within hours, definitely less than 24 hours (sorry, not quantified).

DHCP lease is kept active at the router (my router gives 10 minute leases), so networking is alive at some level, but the web interface isn't reachable, nor does it respond to pings.

D1 mini ESP8266 clone, 144 WS2812B attached.

dredvard commented 3 years ago

Same issue - loss of connectivity although mine seems to last longer.

DHCP lease is kept active at the router (my router gives 10 minute leases), so networking is alive at some level, but the web interface isn't reachable, nor does it respond to pings.

Wemos D1 Mini 120 WS2812B attached.

Travisco29 commented 3 years ago

anyone tried esp32s and do they have the same issue?

On Sat, Jan 30, 2021 at 9:32 AM dredvard notifications@github.com wrote:

Exacly

Same issue - loss of connectivity although mine seems to last longer.

DHCP lease is kept active at the router (my router gives 10 minute leases), so networking is alive at some level, but the web interface isn't reachable, nor does it respond to pings.

WiMOs D1 Mini 120 WS2812B attached.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Aircoookie/WLED/issues/1629#issuecomment-770248289, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQIIOFMHHFGTZIANLB63LS4Q7B5ANCNFSM4VXXFO5A .

pk88888 commented 3 years ago

Try this method:

  1. Run Flash download tools (https://www.espressif.com/en/support/download/other-tools)
  2. Connect to the module and delete the flash memory
  3. Upload the new code using Visual Code according to the WLED instruction.

In my opinion, the problem is caused by wrongly uploading ready bin file. It helped me and now the devices have been working properly for several days.

WJCFerguson commented 3 years ago

I did a full flash erase, reflash, and verify flash all via esptool.py, and still suffer the same problem.

esptool.py erase_flash
esptool.py write_flash 0x0 ./WLED_0.11.1_ESP8266.bin 
esptool.py verify_flash 0x0 ./WLED_0.11.1_ESP8266.bin 

I'm not familiar with how the VSCode / Platformio works, but from a cursory look it seems like it also uses esptool.py. Perhaps at the weekend I'll flash via VSCode, as I intend to modify for an IR remote anyway, but this theory seems tenuous to me.

Urchin73 commented 3 years ago

My 2 cents contribution: I have 2 D1 mini (Aliexpress) running WLED 11.1. They are both at 50cm from wifi bridge. They are powered from the same power supply and led are powered directly from the power supply, not via the D1 minis. 1 mini act as a 'master', sending while the other one is a 'slave' (receving data from 'master'). Never had deconnection,or unavailability issues with the 'slave'. For the 'master', it is another story... I even replaced it with another D1 and same settings... same unavailability issues ! Both of them are constantly connected to the network anyway. Wifi sleep is deactivated on both of them. They are both integrated into Home Assistant. The only way/turnaround I found to wake up the master is making a script on a defined effect preset. When the script is fired, the master wakes up and shows immediately. Hope it helps...

GeckospotNixie commented 3 years ago

What in the script? I will give it a go!

spinkohass commented 3 years ago

Seems like the same issue I have, but I'm 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 on the other controller which suggests that it's the web-server dying? 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.

Doyle4 commented 3 years ago

Curious as I have been following this almost everyday, Is there any Devs in here following this? Im unsure who they are by name is all and hoping its not been accidentally missed as from past experience most bugs get fixed pretty quick, unless this is a serious issue? Thanks :)

EDIT: Spotted on the right hand side they are here, all good! was just a little worried incase not been spotted, sorry about that.

spinkohass commented 3 years ago

Seems like the same issue I have, but I'm 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 on the other controller which suggests that it's the web-server dying? 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.

I have 4 boards now, all 4 of them have the same issue. I flashed 2 of them with 11.0 and it seems to have fixed one, but that still leaves 3 boards that are dropping offline.

spinkohass commented 3 years ago

Is it fair to say this only affects some people - and above someone is reporting it still happens on one board in 11.0, so it seems very sporadic, like it could be hardware, or some confluence of hardware & software?

The 11.0 board just dropped offline. It made it about 24 hours.

barrenechea commented 3 years ago

Is it fair to say this only affects some people - and above someone is reporting it still happens on one board in 11.0, so it seems very sporadic, like it could be hardware, or some confluence of hardware & software?

The 11.0 board just dropped offline. It made it about 24 hours.

Go to 0.10.2, that's the only "fix" for all of my boards

spinkohass commented 3 years ago

Is it fair to say this only affects some people - and above someone is reporting it still happens on one board in 11.0, so it seems very sporadic, like it could be hardware, or some confluence of hardware & software?

The 11.0 board just dropped offline. It made it about 24 hours.

Go to 0.10.2, that's the only "fix" for all of my boards

Thanks! Will try this on the worst offender.

Doyle4 commented 3 years ago

Is it possible to implement the effects over to 0.10.2 and build? (sorry, not good at coding so unsure about this)

spinkohass commented 3 years ago

Is it possible to implement the effects over to 0.10.2 and build? (sorry, not good at coding so unsure about this)

10.2 didn't work for me, it's dropped offline twice in about an hour (so worse). I'm trying disabling wifi sleep now to see if that helps.

Urchin73 commented 3 years ago

@GeckospotNixie

My script for the preset... Let us know !

alias: preset 8 wled
sequence:
  - service: wled.preset
    data:
      entity_id: light.wled_master_2
      preset: 8
mode: single
WJCFerguson commented 3 years ago

With a more recent build, I'm now 44 hours and counting with no lockup...

On 0.11.1 I never saw 24 hours - usually I had to reboot it in the morning, if I was lucky it made it to bedtime, and it was not connectable the following morning.

Then I added a custom IR remote and built from (then) master (94941a7). I haven't seen a lockup yet - a few ~24 hour runtimes when I manually restarted it, and now I'm trying to leave it alone to see whether it remains stable longer term.

Just a single datapoint on one cheap D1 Mini clone. 0.11.1 was my first install, sorry I can't say if earlier releases were OK on my hardware. I currently have wifi sleep turned off.

Urchin73 commented 3 years ago

What worked for me to wake up an unreachable Wled is accessing it via its ip in the browser. Disregard the 'failed to connect' message and click on the power button left above.

Urchin73 commented 3 years ago

What could be interesting for those of you having recurrent disconnections is to put the device in sync receiver mode (even if there is nothing to receive). I suspect it does something because my 3 receiving devices don't disconnect while sending device does many many times. But unfortunately, I can't change it for different reasons on my setup... just trying to isolate the issue step by step.

spinkohass commented 3 years ago

@urchin73 - What I assume is happening is that the web browser is locking up. The reason I assume this is: 1) I can see that the devices still have an IP address from my routers end. 2) if I have Sync on, the "offline" devices will still receive the sync and update.

I have not been able to "wake up" the web server by going to the IP address via a browser on a computer - the only way I've been able to fix is to powercycle. Luckly I was smart enough to put a smart outlet above my kitchen cabinets incase this happens.

Urchin73 commented 3 years ago

... strange. Maybe we have different kind of 'unavailability/disconnections' here ?