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.58k stars 3.13k forks source link

Constant Reboots #557

Closed seantibb closed 3 years ago

seantibb commented 4 years ago

I cloned the latest repo in the hopes of deploying it to my own board with some new features for PIR sensors on the same NodeMCU. I setup the network info and mqtt info in the code, uncommented the NodeMCU board in environment, built successfully and then deployed to the NodeMCU. Everything appears to be working, but it is in a constant reboot loop. Now the reboots happen so frequently, I can't get it into a flash mode successfully to flash the bin file and recover the NodeMCU board. Any suggestions?

Happy to submit code, but not sure how it will change things....

brentbrooks70 commented 4 years ago

@seantibb Does your board have 2 buttons (i.e. Reset & Program)? If so, just hold the program button press and release the reset button, your board should be in programmable flash mode. If your board only has a reset button connect GPIO0 to ground and then press and release the reset button or apply power and you should be able to flash it now. Of course, all of this assumes you can plug into the device and are not limited to OTA methods of flashing

Good luck

Aircoookie commented 4 years ago

Hi! First of all sorry for the bootloop issue and I hope you'll be able to reflash your ESP to make it work again. I believe the reboots are caused by an MQTT issue I have yet to work out. What you can try though is setting the network and MQTT settings via the web interface (connecting to WLED-AP) instead of in-code. It miight be that something is not initialized correctly. Thanks!

seantibb commented 4 years ago

Thanks for the responses! I've stopped trying to pre-configure and am having no more boot loops. I'll keep my eyes out for an update to resolve this issue and give it a try then. Thanks for all the hard work! Also, if you point me in the direction of the bug, I might be able to help. 30+ years of dev experience ;).

fishbone-git commented 4 years ago

Could it be the blynk section of code? I normally have Alexa, HUE, Blynk, etc disabled in the wled00.ino. I recently decided I didn't want to bother with that customization and I have the reboots. As soon as I uncomment only the #define WLED_DISABLE_BLYNK, no more reboots. Serial log suggests a memory leak (heap too low). I don't even have blynk enabled in the config of the device, just the code.

seantibb commented 4 years ago

Good catch on the Blynk piece! I think I commented that out, but not sure. I will flash again tonight or tomorrow with that specific line commented and then not and see if I get the same.

Def3nder commented 4 years ago

@seantibb did commenting out blank made a change ?

triggerx commented 4 years ago

Also having constant boot loop issues.... i don't use MQTT. 0.8.6 works completely fine for me, but have never been successful with 0.9.1. With the 0.9.1 official release .bin, the reboot would happen about every 15 seconds, and be "offline" for about another 15 seconds. With a compile of current code, the reboot happens about every minute, and is only "offline" for a couple seconds... so it's gotten "better" since 0.9.1.... just not fixed. Just piling on here in order to track this bug. i have an exception log if that helps anything. thanks.

stale[bot] commented 4 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!

seantibb commented 4 years ago

FYI....looks like removing Blynk does resolve the constant reboots issue. Not sure what root cause is there....

jbeck22 commented 3 years ago

I'm having the rebooting problem on one of my boards. How do I go about removing the Blynk configuration? I don't use Blynk so I'm happy to remove it, just don't know where to do it.

Update Did some digging on my own and figured out how to get everything installed / configured and was able to get the source code to compile. I took this section:

`// You need to choose some of these features to disable: //#define WLED_DISABLE_ALEXA // saves 11kb

define WLED_DISABLE_BLYNK // saves 6kb

//#define WLED_DISABLE_CRONIXIE // saves 3kb //#define WLED_DISABLE_HUESYNC // saves 4kb //#define WLED_DISABLE_INFRARED // there is no pin left for this on ESP8266-01, saves 12kb

ifndef WLED_DISABLE_MQTT

define WLED_ENABLE_MQTT // saves 12kb

endif

define WLED_ENABLE_ADALIGHT // saves 500b only

//#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2)

ifndef WLED_DISABLE_WEBSOCKETS

define WLED_ENABLE_WEBSOCKETS

endif

`

and uncommented out the part about Blynk.

I uploaded the compiled .bin file, rebooted my set of lights, but I'm still getting the constant reboots. This last time it happened after about 5 mins or so.

What should I check next?

I'm using a NodeMCU v2 board ~175 LEDs with a 5v power adapter.

I would also note that I have 3 total instances of WLED running. All 3 have the same version of WLED, all 3 are using the same LEDs and all 3 are using the same NodeMCU boards. Only 1 is having the reboot issue.

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!