Bulk Configuration

Is there a good way to bulk configure WLED over USB? I’ve got quite a few to configure (~30). And I need to update the MDNS Name, AP Name, and start universe for all of them. I want to address each node and have the node name and AP SSID match the start universe. The start universe for each needs to be unique so I can’t bake it into a custom build. I can easily write a script to generate the configs. I was wondering if there was an easy facility to do that over USB so I can flash, and then run a script like weld_configure <start_universe>… Without having to switch APs and click through a web interface.

Yes, you can prepare file system and upload it.
You will need to hack PIO a bit for ESP32 so that it will know how to handle LittleFS.
Minimum files to prepare are cfg.json, wsec.json and optionally presets.json and other uploadable JSON files.

Use Espressif and PlatformIO documentation for details.

What do you mean by preparing a file system and upload… Like generate an image then write_flash the appropriate location? can you point me to any similar examples?

I’m realizing I’m a bit on the ignorant side here… I don’t know platformio well, and my experience with it so far is that is misflashes about 60% of the boards I’ve tried to flash with it… I’m using esptool.py to flash the bootload and wled image, and it hasn’t misflashed a board yet. So I’d rather use lower level tooling for interacting with the ESP32…

So what I’ve gathered, and I’m coming from a position of total ignorance in regards to SPIFFS/LittleFS… Is that I can create a file system image that can be written to the ESP32.

It seems like GitHub - earlephilhower/mklittlefs: Utility for creating littlefs for upload on the ESP8266 could be a good candidate tool for creating the fs. @blazoncek do you know of any other tools for creating the littlefs bin that might be better?

Then I can flash it to the ESP use esptool.py write_flash, but I need to know the proper partition. @blazoncek can you confirm that partition schema I should be following is the one in tools/WLED_ESP32_4MB_1MB_FS.csv (the flash is 4M according to esptool.py flash_id

So in theory once I create a custom fs.bin I should be able to esptool.py write_flash 0x310000 ./customfs.bin

Does that sound correct?

Yes .

That worked! Thanks for pointing me in the right direction!

If you have the time and want to contribute to the project please consider writing a detailed instructions for https://kno.wled.ge Advanced section.
Fork WLED-Docs and make PR.
Thank you.