diff --git a/server/src/wled_controller/core/processing/wled_target_processor.py b/server/src/wled_controller/core/processing/wled_target_processor.py index 09f0dc0..5d7e8f7 100644 --- a/server/src/wled_controller/core/processing/wled_target_processor.py +++ b/server/src/wled_controller/core/processing/wled_target_processor.py @@ -707,8 +707,24 @@ class WledTargetProcessor(TargetProcessor): cur_brightness = 0 # Zero-brightness suppression: if output is black and - # the last sent frame was also black, skip sending. + # the last sent frame was also black, skip sending + # (but still send periodic keepalive to hold DDP live mode). if cur_brightness <= 1 and _prev_brightness <= 1 and has_any_frame: + if self._needs_keepalive and (loop_start - last_send_time) >= keepalive_interval: + if not self._is_running or self._led_client is None: + break + send_colors = _cached_brightness( + self._fit_to_device(prev_frame_ref, _total_leds), + cur_brightness, + ) + if self._led_client.supports_fast_send: + self._led_client.send_pixels_fast(send_colors) + else: + await self._led_client.send_pixels(send_colors) + now = time.perf_counter() + last_send_time = now + send_timestamps.append(now) + self._metrics.frames_keepalive += 1 self._metrics.frames_skipped += 1 while send_timestamps and send_timestamps[0] < loop_start - 1.0: send_timestamps.popleft()