I’ve found an issue that seems to occur if I send multiple JSON API calls in quick succession. For instance, I am using a Zigbee rotary dimmer and Node Red to set the brightness of my WLED install. As I rotate the dimmer it sends 1 JSON API call every 250ms to update the master brightness.
The system has two segments. Seg0 is turned on, and Seg1 is turned off. When I make these rapid API calls, the first LED of Seg1 often flickers on and off as I rotate the dimmer. I’m guessing that each subsequent API call interrupts the transition currently in progress, causing the flicker.
Is there any guidance on how quickly / slowly I should be making sequential API calls?
Transitions should be seamless, even if one already in progress is interrupted.
Every 250ms should be a fine update rate for short bursts.
What ESP and WLED version do you use?
Can you also see occasional flickering in the effect modes? Sometimes these flashes occur because the data signal is too weak and would require a level shifter: FAQ - WLED Project
As for API calls, my guidance is as slow as possible, as fast as necessary. 250ms seems like a good value for your use case. I would recommend also setting the transition time setting in WLED to 200-300ms in that case, this will make it easier to precisely set the brightness using the rotary encoder, as WLED would tend to overshoot the desired value with the default 700ms duration.