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
14.78k stars 3.18k forks source link

Improve transition smoothness #3053

Closed jclsn closed 1 year ago

jclsn commented 1 year ago

What happened?

When you send WLED a command to change the brightness with a transition time value from e.g. Home Assistant, the results are not great. While this works well on e.g. a Philips Hue of course, the transition on the WLED server is quite flickery and choppy. This behavior even gets worse when you try to repeat transitions in a do-while loop.

The HA team says that all the brightness control is done on the light source targeted and thus this should be an internal WLED issue. Which is weird because when using certain effects the transitions are very smooth.

To Reproduce Bug

Try to trigger a light service turn on command changing the brightness to WLED including a transition. Also try doing this in a do-while loop with an automation. The behavior gets even more unrealiable.

Expected Behavior

WLED should smoothly dim the lights in the given transition time.

Install Method

Binary from WLED.me

What version of WLED?

0.14.0-b1

Which microcontroller/board are you seeing the problem on?

ESP8266

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

blazoncek commented 1 year ago

Have you tried sending JSON via POST?

jclsn commented 1 year ago

@blazoncek What do you mean?

blazoncek commented 1 year ago

KB

jclsn commented 1 year ago

@blazoncek Well, I want to use HA automations. I think HA already uses the JSON.

But I found the issue. The new 0.14.1b was the main cause. It also works better when you align WLEDs transition time with the transition time in the HA automation. This has a minimum of one second and when I increased the WLED transition from 700ms to 1000ms it worked much better.

I also reduced the current per LED to 50mA and will solder a better power supply to it and not drive the 36 LEDs with the pin of the ESP8266