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

Unable to keep WLED light OFF when preset cycle is active #1288

Closed Lefuneste83 closed 3 years ago

Lefuneste83 commented 3 years ago

Describe the bug I have noticed a strange behavior that happened on several of my WLED lights on multiple occasions. This behavior is not systematic, it seems to appear randomly, because of user error (me), or because of some MCU memory corruption.

I have flashed my ESP32 Dev boards with self compiled WLED (currently 0.10.1). The light is then seen in my Home Assistant as a WLED integration AND as a MQTT device (once I set it up in WLED GUI). NB : Not declaring the WLED node as a MQTT device does not change the behavior. Everything is working fine from this point.

Once in a while, if I set up or modify a preset cycle, save the cycle in LED Preferences, and reboot the light, AND then try to turn it OFF with Home Assistant, it stays OFF until the delay to the next preset is elapsed, then the light turns ON again and continues the presets cycle. Behavior is the same from within the WLED GUI with the Power button. I had this issue with vastly different versions of HA. I am currently running the latest stable HA and 4 WLED devices are active. Only one light shows this behavior (it happened again today) after having run fine for months.

This does not always occur. I had the issue resolved in the past on other WLED devices by reflashing the MCU, as resetting the settings to default does not seem to correct the behavior. Strangely enough, it does not seem related to the way I define the preset cycles (I have tried many different ways), or to the way segments are defined, but it seems rather linked with something stored or corrupted in the MCU memory. Once it happens it is impossible to correct it without reflashing the MCU (at least for me).

I am able to correct this by disabling preset cycles completely and have only one effect active.

There may be something I am doing wrong but it is quite frustrating... Does this behavior seems familiar or due to some obvious mistakes of mine in the way I set up my presets ?

To Reproduce Not able to find what triggers this behavior.

Expected behavior The light stays off

WLED version

Lefuneste83 commented 3 years ago

I have reflashed the MCU with latest code (git pull) and it has corrected the behavior immediately. This is super weird ! Now I can have various preset cycling and I can command a full OFF state which remains. The settings were not even reset during the OTA upgrade and it has corrected the behavior with the exact same settings I had when it was turning ON by itself. What could be the origin of this behavior ? It seems more and more related to a corruption of MCU memory during some write operation at some point in the life of the device.

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!