Updated Presets (markdown)

This commit is contained in:
Aircoookie 2020-11-15 23:27:10 +01:00
parent 16bbf960b8
commit 9607a3452c
1 changed files with 36 additions and 0 deletions

View File

@ -1,6 +1,42 @@
Presets can be used to save your favorite light configurations to apply later.
You can compare them to the "scenes" feature present in some other smart devices.
### New version (0.11+)
#### Overview
WLED 0.11.0 contains a major overhaul of presets, storing them in a `/presets.json` file in an internal filesystem.
This enables many new features, you can now have up to 250 presets and each of them can save all segments which are set up!
Speaking of segments, the maximum number has been increased to 12 on ESP8266 and 16 on ESP32!
Presets can now also contain both HTTP and JSON API commands, replacing the previous Macro functionality.
Each preset can be named, so you'll be able to access it more easily!
#### How to use
TBD
#### A note on performance
This new preset system is quite fast where it matters, reading the presets.
Applying a preset will typically take less than a tenth of a second.
However, due to a design choice of the LittleFS filesystem used by WLED, random writes to the preset file are very resource intensive.
This means that while updating your presets, you might notice your light freezing and becoming unresponsive for up to a few seconds.
Adding new presets is usually very fast, those performance issues will occur once you delete/edit/overwrite older presets and your preset file becomes very large, or when adding presets after deleting older ones.
I'm looking into ways to mitigate this situation as soon as possible! Meanwhile, to keep things snappy, I would recommend not having more than 50-ish single segment or a dozen of multi-segment presets.
#### What about my cool presets from earlier versions?
Don't worry, they (as well as your settings) will be automatically imported to the new system!
And if you ever need to downgrade to v0.10 for some reason, they will still be there (although any changes made in v0.11 won't be applied)
#### Backing up/restoring presets
### Earlier versions (up to 0.10)
There are 16 preset slots in total.
In 0.9.0, the last preset (16) is capable of saving the entire segment configuration. All other presets only save a single segment (main segment, the first one by default) and restore that preset to all selected segments.