gitmyhub

wled-usermod-example

C++ ★ 3 updated 8d ago

Example repository for creating custom integrations for WLED. Fork me to get started!

A starter template for writing custom add-ons (usermods) for WLED, the popular LED strip controller. It gives you boilerplate C++ code with hooks into every key moment so you can focus on your feature instead of setup plumbing.

C++ESP32WLEDPlatformIOsetup: moderatecomplexity 2/5

This is a starter template for building custom add-ons for WLED, a popular project for controlling LED strips. If you've ever wanted your LED lights to react to a sensor, sync with a smart home system, or do something the base software doesn't support, this template gives you a ready-made foundation to write that feature yourself.

The template provides a single example file with boilerplate code and comments showing where to plug in your own logic. It includes hooks for every key moment in the WLED lifecycle: when the device boots, when WiFi connects, every loop iteration, when the LED strip updates, when settings are loaded or saved, and when smart home messages arrive. You pick the moments relevant to your feature, fill in the code, and the add-on automatically registers itself.

To use it, you click a button on GitHub to create your own copy, rename the example files to something meaningful, and link it to your local WLED build. Once your feature works, you can tag a release and share it with the community. Other people can pull your add-on into their own builds just by referencing your repository URL, and you can submit it to the official community add-ons page for wider visibility.

The audience here is someone comfortable writing C++ and building firmware for microcontrollers like the ESP32. The template handles the plumbing—file structure, build configuration, registration—so you can focus on the actual feature. The example file doubles as documentation, with an annotated table mapping each function to exactly when WLED calls it, which is handy since the alternative is digging through the main project's source code.

Where it fits