WLED: Compiling does not include usermods

What happened?

When i’m trying to compile WLED usermods are not included in the firmware.

To Reproduce Bug

If i clone the repository and try to build it like it is it will compile good with audioreactive. But if i add for example Temperature usermod and compile it again it will add Temperature usermod but it will not include audioreactive. Then if i remove again Temperature it will not include any usermod anymore. I tried to delete .buildcache, .pio but no luck. Searching for string in the firmware file first compile it shows me about audioreactive, second about the Temperature and the third compile it will not find anything about any usermod. Also even adding ${common.debug_flags} it will not change anything, the firmware will not be recompiled

Expected Behavior

It should add the usermods i set to custom_usermods in platformio.ini. And also recompile if anything changes in platformio.ini.

Install Method

Self-Compiled

What version of WLED?

Nightly Release 20250316 0.16.0

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output


Anything else?

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (11 by maintainers)

Commits related to this issue

Most upvoted comments

@KrX3D Thank you very much! I’ve been able to replicate this locally with your instructions. Hopefully a fix will follow soon…

@willmmiles

i added it but that didnt solve it. i also removed the .pio folder and still no usermod available.

i tried custom_usermods = auto_save

in the .pio/libdeps/lolin_s2_mini folder i see a auto_save.pio-link which has the content:

{"cwd": "c:\\Users\\USERNAME\\Desktop\\WLED", "spec": {"owner": null, "id": null, "name": "auto_save", "requirements": null, "uri": "symlink://c:\\Users\\USERNAME\\Desktop\\WLED\\usermods\\usermod_v2_auto_save"}}

and usermod_list.txt: auto_save

im not sure if this helps but under WLED\build_output\map\lolin_s2_mini.map AND WLED.pio\build\lolin_s2_mini\firmware.map

in the working inside docker i get like 100 of those lines, and they are missing in the folder on windows:

.group 0x0000000000000000 0x24 .pio/build/lolin_s2_mini_EleksTube/libd14/usermod_v2_auto_save/usermod_v2_auto_save.cpp.o

WLED.pio\build\lolin_s2_mini\idedata.json -> docker has got 6 times the path to the auto_save usermod folder and on windows only once

Live cfg fix currently pushed to #4601. I’ll break it out to a separate PR later I think.

I did not manually delete folders for the test, just the button ‘full clean’ in pio

FYI sometimes you need to save usermod configuration for it to appear. This is due to the fact that usermods settings page reads cfg.json file directly and if there is no configuration saved for a usermod then it will not be present in UI.

Actually, let me hazard another guess.

For this custom environment:

[env:my_esp32dev]
extends = env:esp32dev

you will get the default usermods with esp32dev (ie. audioreactive).

For this environment spec:

[env:my_esp32dev_v2]
extends = env:esp32dev
custom_usermods = Temperature

you will get only Temperature; the custom_usermods settings has been overridden with the new value specified there. The inherited value is lost.

For this environment spec:

[env:my_esp32dev_v3]
extends = env:esp32dev
custom_usermods = 

you will get no usermods at all (it’s being overriden with the empty string).

I think maybe you want:

[env:my_esp32dev_dwiw]
extends = env:esp32dev
custom_usermods = ${env:esp32dev.usermods} Temperature

…where it keeps the inherited value (as it is explicitly referenced), plus adds the extra module you want.