Learn how to edit WLED software to create a simpler GUI with fewer patterns for my wall art

I’m desperate to learn how to edit WLED open source software to create a simpler GUI with fewer custom patterns for my 11 x 47 inch wall art panels. To start with, I only have three parallel, one meter columns of 30 LEDs each. I need custom patterns for a single 90 LED segment and three, 30 LED segments.

My challenge at 74 years old is to remember my semester of C++, learn GitHub and how to edit/program a smart device with a simpler GUI. I understand many of the WLED patterns use FastLED code? There are six YouTube videos on FastLED BASICS.

Where would you suggest I begin my crusade?

1 Like

If you just want some simple predefined effects, you might want to consider a slightly different path.
WLED will talk to general purpose lighting design programs like XLights.

While XLights allows for some fantastic shows, it can also be used to apply much simpler effects.
There’s even a standalone FPP (Falcon Plus Player) that will take a small effects file from Xights and play it for you.

So programming will give you full control, but requires a substantial learning curve to learn the PlatfomIO development environment, GitHub, the existing WLED code base, NeopixelBus, FastLED, and others.

XLights->WLED requires learning existing programs that are fairly well known and designed to be learned.

Depends on how involved your solutions need to be and how far down the rabbit hole you want to travel…

1 Like

And reading my reply after reading your OP, it also occurs to me you might get away with no programming at all.

If you use the full WLED program to create the pattern you like, you can save those settings as a preset.
Once you’ve got your 5 (or so) patterns saved as 5 different presets, there’s some pretty simple ways to configure a button to cycle through the 5 saved options.

Just one more option…

2 Likes

Hi , I think divsys is correct in saying that no programing is needed . As an option , there is a simple yet good wled api with most functions including loading of presets , please check the link and good luck

https://kno.wled.ge/interfaces/http-api/

cheers

1 Like

I have developed a simplified UI and is available in my fork or as a pre-compiled binary from @srg74

1 Like

I have done a similar thing that might be just what the OP is looking for. I have a four separate segments – almost 1000 LEDs in four banks with several in parallel like the OP. It’s all controlled through a single QuinLED Dig-Quad.

I have defined several (6-8) presets that look nice. I then created very simple “code” in Apple Shortcuts that sends the JSON to the WLED controller to advance through the presets. When it hits the last one it cycles around.

This shortcut code is then available on my Mac from the menu bar, from my phone via Apple Shortcuts on the Home Screen, and of course I can use the WLED app or web site to control it. All with almost no “code” except for the one Apple Shortcut called “Next Preset”.

Happy to share if anyone wants more info.

@CLWill, welcome to the WLED community! I’d love to hear more about your solution using Apple Shortcuts.

me too

Well, it’s remarkably easy.

I started with a single one-liner built in Apple Shortcuts. I called it Toggle LEDs. It turns my whole WLED setup on and off. In the Shortcut app what it does is simply a “Get Contents of” call with the parameter of “https://[my-leds].local/win&T=2”. Where obviously [my-leds] is the mDNS name for my local WLED instance. If you don’t have mDNS enabled, just use the IP address.

I created that shortcut, checked “Pin in Menu Bar” and “Show on Apple Watch”. Boom, it shows up on my Mac’s menu bar at the top, on my iPhone, and yes, even on my watch. Easy peasy, and super cool.

So that got me thinking, how about doing presets? So I created a bunch of presets in WLED, numbered them 1-7, then went into Apple Shortcuts again. Now this took some fiddling and debugging. Fortunately, Shortcuts natively understands JSON, so it’s pretty easy.

I think I can share this safely, here it is: Shortcuts

What it does is:

  • Get the JSON state from WLED (using …/json/state)
  • Get the ps (current preset value) from that result, again Shortcuts parses the JSON
  • Add one to it
  • Do a POST request with JSON that sets the “ps” to the new value (writing to …/json/state)
  • Check the ps state – it’s returned in the POST call (I set the “v” parameter).
  • If it hasn’t changed, it means I’m off the top of the list of presets, so POST again with value of 1

Then saved this shortcut in the same way. And holy cow, it works. Mac, phone, watch. Very cool.

Some caveats:

  • I requires you to have your presets numbered in the order you want to cycle.
  • It requires that you have an empty space at the end for the cycle to wrap around. I have a bunch more presets, but they are numbered in the 10s, 20s, 30s, etc.

This is pretty simple. I can imagine all kinds of cool stuff with Shortcuts. Like several different preset lists in different orders. Or even setting custom colors based on all kinds of things – just like the OP requested.

The Shortcuts app is a little convoluted if you’re a regular programmer like me (40+ years of programming), but it works and the whole “works all over the Apple ecosystem” aspect is very slick.

Hope this helps, ask any questions you have.
Chris

3 Likes

The shortcut worked for me and even better this opens the possibility to use it with all wled api .
Very nice idea

1 Like