MoonModules / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi! MoonModules adds features on top of upstream.
https://mm.kno.wled.ge
GNU General Public License v3.0
202 stars 64 forks source link

When creating a new preset, the entered name may be replaced by a timestamp; the preset contents may be replaced by the current state #114

Closed Emstar closed 8 months ago

Emstar commented 8 months ago

What happened?

While creating some presets containing JSON API calls, I noticed that some presets lost the name I entered. My name text was replaced by a timestamp. In some cases, the preset API text I entered was replaced by unwanted JSON which I think was a copy of the current state.

https://i.imgur.com/BrNQkby.png

To Reproduce Bug

Ensure you do not have preset 250, or are willing to overwrite it.

You now have a new preset 250 that looks and works as it should. To induce the error you now need to do some combination of using the preset and reloading the web UI. I cannot figure out a 100% reliable repro, but if you reload the page a few times and click the preset a few times, you should find that the name you entered is gone and replaced by a timestamp string. The API text you entered is likely gone and replaced by a new config. However, this does not always seem to happen when the name changes.

This is what happened to my test preset as I was writing this bug. Notice the title and API text are totally different.

image

Expected Behavior

Presets should remain as configured. Names and API commands should not change without user input.

Install Method

From https://wled-install.github.io/

What version/release of MM WLED?

WLEDMM 0.14.0-b29.35 (build 2401260) (MoonMod nightly version, 4 MB Flash, M: Audioreactive, Usermods incl Temp, AutoSave, 4-L Display, Rotary encoder)

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

I have only seen this but on presets 250 and 249, but I didn't even make a preset until I made 250. So maybe it's limited to 249-250... Or maybe it's the last two in the list. Not sure.

Code of Conduct

softhack007 commented 8 months ago

Hi,

Preset 250 is usually used by the "autosave" usermod, which saves your current segments and effect settings regularly with a timestamp.

You can go into settings, autosave (UM), and uncheck "enabled". This should end the unexpected behaviour.

Emstar commented 8 months ago

Preset 250 is usually used by the "autosave" usermod...

AH HAH! Thank you so much.

Still new to WLED and mods lots of land mines yet to find I am sure...