SOLVED V11 Cycle programming preset on/off depending on preset

Goodday,

First of all WLED is awsome, but everybody here allready knew that! :slight_smile:
I have 19 presets, (17, 18 are T=1 T=0) During evening I start 17 from time and macros, and cycle trough 1-16 without problems. (Cycle presets is checked to run 1-16). At night, time and macros run preset 18.

During daytime I only want the run preset 19, without cycling through other presets. This preset is on 1 particalur segment and running on a higher brightness because it’s daytime

Is there a way to write de cycle presets on/off into the preset itself? Or is there another way to achieve this? At the moment I manually have to check and uncheck the “cycle presets” twice a day, before the time and macros are running.

All help is welcome.

Thanks in advance,

Erik

Hi!
You can use the CY=1 or CY=0 commands, or in a preset (JSON API) {"pl":-1} (off) and {"pl":0} (on). I hope it will work :slight_smile:

It’s Aircookie! Thanks for your reply, it worked. Preset 19 has pl=-1 and wil not cycle. The others cycled like normal, I will continue to test and if its necessary I will add the pl=0 to all others.

Now I have during daytime a segment with 90 pixels (wreath) with 1 preset and in evening everything, about 1300 pixels cycling through 16 presets. Periodically I fire up xlights… :grinning:

Is there a list with all codes?

Thanks, you are the man!:clap:

Check out the WLED wiki, then check the JSON API (far right side of the wiki is a list of wiki documents)

Thanks Huggy-d1, I always thought that API stuff wasn’t for me but for home automation, I will dig more into it! I am still new to it but getting more enthusiastic by the minute :slight_smile: :smiley:

I find creating CURL commands and JSON data blobs to send to WLED very useful to complement HA software.

For example, my HA turns WLED on and off at specific times within a given date range every year. My HA had no idea what the JSON command was to do that until I gave it a script to execute that included the JSON data for a curl command.

It is also helpful to create certain effects, colors, and so on, and then request the current settings as a JSON blob. Then turn that around as a curl command with comments in a script for what that json data would be good for, or what it is configured as. Then save the curl command as a script file with a descriptive name that you can call from a PC to configure WLED quickly and precisely.

With a good library of these little scripts, you can set up presets by running a curl script to preconfigure WLED, then assign it to a preset, then run another curl script, assign to another preset, then create a playlist of the 2 playlists. And of course, save the playlist as a json command.

Now you have a library of precise configurations that can be called up on command (and via HA).

The API makes that easy, and the curl command makes sending JSON data so easy.