Return to the running preset after push button action was played

Hi all,
I have a playlist that I trigger by pushing a button when I want to open the garage gate. The playlist contains several preset played for a few sec. each. The playlist ends with a preset called “OFF” - no effects at all. It works - animation is played during the opening/closing of the gate and LEDs go off after 2 min.

I also have a playlist running between 4 p.m. and 1 a.m. (Christmas animation). It is scheduled in the Time-controlled presets section. That also works fine.

When I come home when Christmas illumination is played I open the gate and the opening animation is played. That is ok.
The question is how to go back to displaying Christmas animation after the opening/closing animation ends?

Is there something like “go to the previous state” to program? I can’t add the Christmas playlist at the end of the Open playlist because I open the gate also in the morning when the LEDs are off. I don’t want to turn on LEDs during the day.

I would be grateful for a tip.

Hello,

There probably exist simpler ways of achieving your goal, but here are a few (overly complex) solutions I can think of based on my limited experience with WLED:

  • Write a usermod that switches control to the garage gate playlist (upon button press), then switches control back to the Christmas lights playlist after the 2 minutes. This requires some usermod v2 (or usermod v1) knowledge and a recompile of WLED.

  • Use external automation:

    • Sending preset commands via WLED JSON API over WiFi. You could use, say, a Raspberry Pi running NodeRED, or a python script, or home-assistant, etc. In this case, your garage gate button will be connected to the RPi.

    • Sending preset commands via serial communications. Connect another uC (e.g. ESP, Arduino, etc) to the WLED-ESP via UART: simply cross the Tx/Rx lines and share a common ground. This will allow sending WLED JSON API commands via simple Serial.print() statements; your garage gate button will be connected to this extra uC and upon button press, this uC sends the JSON API command for the garage door playlist. Then after 2min, it Serial.print()s the preset command for the Christmas lights playlist…

Hope this helps!
Gbd

There is a “Reestore preset” option introduced in 0.14 for playlists

Thank you very much for both answers.
I will try with 0.14 first. :wink: