A Python/Command-line tool for modular configuration of WLED instances over the network.
- Easy wireless configuration: Set up multiple WLED instances without the hassle of manual configuration.
- Reproducible: Easily replicate WLED configurations for friends, events, or new installations.
- Maintainable: Use modular JSON configs to share and override settings across multiple instances.
- Friendly naming: Optional hostname/mDNS support lets you use names instead of IP addresses for your WLEDs.
- Offline operation: No internet connection required to upload configuration.
- Validation: Optional verification of config after uploading ensures successful updates.
For a list of what you can actually configure with cfg.json
, See here
- Clone or download this repository
- Install Python (3.10+) if you don't have it.
- Make sure Python is in the system PATH (open a terminal in this folder and enter
python --version
) - Install
requirements.txt
. Easiest way: in a terminal enterpython -m pip install -r requirements.txt
. This will install the packages globally. - Get your cfg.json files from a running WLED instances and save them in
/data/cfg_modules/
- Create your
wled-conf.json
file by duplicatingdata/example_simple_conf.json
and renaming itsimple.wled-conf.json
. - Open the
simple.wled-conf.json
you created, change the IP address and names - If you used a name other than
cfg_base.json
for your cfg template, make sure you use the same name in thewled-conf
file. - Run the CLI with the command
python wled-config-toolkit.py data/simple.wled-conf.json --build --upload --verify-upload
. - you should see something like this:
Loading wled-conf file: data/simple.wled-conf.json
Building wled-conf file: data/simple.wled-conf.json
Generating config file for: 192.168.1.100
...
Testing live panels...
Testing 192.168.50.56:
GET http://192.168.50.56/json/cfg.json... 200
Compare JSON to expected: match OK
Setting test colors (default, r, g, b)...OK
HTTP Verification Finished
Verification OK!
After you have a working wled-conf
file, you can customize it by adding more instances, adding overrides per instance, or creating multiple wled-conf
files for different usages.
For more detailed information and advanced usage, see the Advanced Usage documentation.
⚠️ Warning: Uploading replaces your entire cfg.json file. Any missing properties will be reset to WLED's defaults.For this reason, it's recommended to always have some
cfg_base.json
that's initially ripped from your WLED, and only removing what you plan to override. This tool has some validation to check critical things like AP config hasn't changed, and WIFI has an SSID, but there can still be data loss.
To use the python API, take a look at src/example_run_config_build.py as an example.
WLED configuration can be mostly handled with cfg.json files.
The config CLI lets you create a bunch of of these "cfg_modules" and provides a layer above these files called wled-conf.json
.
For more information about the structure and keys of the cfg.json file, check out cfg_json_structure.md.
These are files containing the actual WLED instances (as IP addresses or mDNS names) each instance can define what cfg.json modules it will use
These are cfg.json files, or parts of them, that are saved in the cfg_modules
directory and can be reused between controllers/wled-conf files.
TODO if common problems come up.
Feel free to Open an issue if you encounter a problem or have a feature request.