Usermod or FX?


I’m very fresh into WLED, as I have a small project I’d like to implement with it. Separately from WLED, I’m also testing FastLED and Pixelblaze, but I had the hardware for WLED here first thing now and my hardware setup is up and running (cod.m esp32 WLED controller, SK9822 144 LED strip, 5V 2A power supply). All set up, tried some effects (which I can even use so far for the project with appropriate presets).

But I’m missing an effect and the effects I can use I would like to pimp a bit (the effect speed is unfortunately a bit badly distributed).

Therefore, a few questions (sorry, it became a few more) about the structure of extensions and effects:

Does it make more sense to create an effect as a user mod (V2)? Or should I implement an effect as all default effects are stored? What is the recommended way? I don’t need sensor data, but possibly a configuration via the UI (which goes beyond the default parameters, like brightness, color, speed, intensity). Are the overlay effects, global brightness, segments only available in the Effects or also in the Usermods?

In the description of EXAMPLE_V2 it says to copy a user mod to the wled00 directory. But all existing usermods are referenced by the include-path ./usermods/*. So I like structured source, but I don’t know if there is a specific reason to put the source in wled00?

When I look at registering the effects, there is _data_FX_MODE* and I have absolutely no idea what the parameters mean. How can I find out what something like "Halloween Eyes@Duration,Eye fade time,,,,,Overlay;!,!!;12" means? Is there any documentation (which I haven’t found)? Sure, one is a name, but the rest of the parameters?

If I understand correctly, aux0 and aux1 are something like private registers, so I can remember a value beyond the loops? So, individually for the effect/segment that is currently running? If I have a user mod, I would have my private variables in the class to realize this, do I see that right?

Thank you kindly for your help. If there are any links or tutorials somewhere that answer this, that would be great. I’ve already searched around a bit but haven’t found anything yet.

Best regards, Josh

Never played with usermod for effects only changed existing effects but some info on meta data is here

Ok, I understand. Effects are more to render the lights and usermods more to control the device. I understand.

Thank you for the link, now I got it. It’s a 0.14 feature, and I was confused with my findings with my existing WLED controller boards. But I like this new handling. Thank you!

A preferred way to create custom effects is the usermod approach.
Actual effect function will still remain the same but registration should happen in usermod’s setup().

Is there an example of this?

Custom Features - WLED Project says

Note: this page is now out of date, see updated functionality in the code (WLED/usermods/EXAMPLE_v2)

But then there doesn’t seem to be an example of how to implement an effect in EXAMPLE_v2.

In the same was as it is done in FX.cpp