Preset button

I’m using WLED 0.12, 0.13.0-b4 and 0.13.0-b6 on an 8266.

Macros moving to presets seems to have introduced an interesting ‘issue’.

  • I have 2 effects presets I want to cycle through
  • I have a button
  • Short press is mapped to preset 98 (PL=~ - select next preset)
  • Long press is mapped to preset 99 (T=2 - toggle on/off)
  • Double press is set to preset 1 (cuz I like that effect)

The unit boots to preset 1 (cuz that’s what I set un the boot preset). All good.

I press the button (or click preset 98)

effect 2 shows. Cool.

I press the button again, and nothing happens. If I click preset 98 (instead, a popup shows with “Error 12 The requested preset does not exist”

Press the button (nothing) or click (error 12 again)
Press the button (nothing) or click (error 12 again)

Press the button or click and we’re back to preset 1.

Looking in the presets.json, it seems there is a preset 0 by default - the boot default without specifying which in the interface? That’s a different question, I’ll play with.

But, it seems as if this is what’s going on

  • boot preset 1. ok.
  • button preset 2. ok.
  • button preset 98. not ok.
  • button preset 99. not ok.
  • button preset 0. not ok.
  • button preset 1. ok.
    … etc.

So the options are:

PICNIC

I can’t find the documentation that explains how to define a range and exclude non-existent ones. I did find the documentation that showed P1=1&P2=30&PL=~ but then I get lots of error 12’s or I have to adjust the 98 preset every time I create a new preset.

Design oversight/bug

Moving macros to presets means 2 (in my case) presets that don’t work with the button (i.e. 2 dead presses). or PL=~ should find the ‘next’ working preset in scope.

What is the best way forward here?
Any help much appreciated.
Nigel

Merry Christmas !
but…
Not trying to be a Grinch, but chasing 0.12 issues is probably not too productive.
I’d suggest moving up to 0.13.0-b6 and work from there.
There were a number of documented bugs in 0.12 fixed and the general reception to the goodies and performance of 0.13.0-b6 has been good.

There’s even a nasty rumour that 13-b6 may actually be really close to the next full release…

But the auto-web-installer doesn’t install that version. Could probably try 0.13-b4… but I’m hoping it’s a user issue not a bug, and if it is a bug, someone with closer access to the code could possibly check, then tell me to raise a bug :slight_smile:

Try the V2 installer: Install WLED that’ll get you -b6.
Still worth the upgrade IMHO.

First. O.M.Giddy aunt, that installer is fab. Network setup built in… Must… not… get… shiny…

Back to the point. Still the same. Error 12 if you go past the available presets.

Also the counter doesn’t keep track of the actual preset currently running if you reset it somewhere… Sounding more like a bug.

It is not.
Use P1=1&P2=2&PL=~ for your cycling preset (assuming your main presets are 1 & 2).
WLED internally has no knowledge of number of stored presets, so you have to keep track yourself.

Fair enough not keeping track if a user chooses another preset, but since the application knows an Error 12 occurred, whatever mechanism is doing the looping between P1 and P2 should detect that and move to the next one?

You are welcome to implement it. :slight_smile:

I’m much more of an end user :smiley: