Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
15k stars 3.24k forks source link

Allow using Presets,Buttons when DDP,UDP data is received #4151

Closed Andro-Marian closed 1 month ago

Andro-Marian commented 1 month ago

Is your feature request related to a problem? Please describe. When the DDP data is enabled I cannot use Presets. Presets that are used by some buttons to toggle the MultiRelay.

Or some presets that has a way to change the brightness of Leds faster.

Presets should be allowed on any case. Just preventing to change the Effects, Color.

Also, not blocking the Presets on the Web page. image

Describe the solution you'd like Allow using presets when DDP, UDP data is controlling the leds effect.

Describe alternatives you've considered No exists.

Additional context

Andro-Marian commented 1 month ago

What I that? Is flagged as a Trojan.

blazoncek commented 1 month ago

Don't click!

netmindz commented 1 month ago

That is a bit of an unusual use case. Presets are primarily designed for effects - when in "realtime" mode WLED is just in dump pass-thru mode of the supplied data to the pixels.

Can you make the changes you wish to control the Multi-Relay usermod though the API?

Andro-Marian commented 1 month ago

Not sure how would you control the buttons with the API to toggle a relay.

If I want to have some presets to change the brightness to a specific number without moving the slider is not possible. This should work not matter what. And if I want some leds to not be controlled by the DDP. Like a way to set thr DDP per pin and per led. Maybe if the DDP is on, the a relay is on and set a static color to a led until making its dynamic again.

Pretty weird idea what I imagined to do.

Or if is a preset to toggle a relay. And set a led color by the relay state . ON red, Off blue or dynamic allowing DDP for it.

Or buttons are not working when DDP data is received.

blazoncek commented 1 month ago

Just to clarify: When WLED is receiving external data (or live data, i.e. from xLights or another WLED device as a DDP virtual LED) it becomes "dumb" device. This is intended and will most likely not change.

There are options (in Sync Settings) that will allow you to still control WLED while it is receiving live data. Please explore them. Of course there is always an option to "override" live data and get control of the UI by clicking on override.

Andro-Marian commented 1 month ago

I see I can already use presets when DDP is used. image Make the DDP box like 3/4 width to allow the presets to be accessed.

And allow buttons to work/trigger presets.

Andro-Marian commented 1 month ago

Who need this fix edit the wled.cpp and move the:

 handlePresets();
  yield();

before:

if (!realtimeMode || realtimeOverride || (realtimeMode && useMainSegmentOnly))