mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 01:44:20 -07:00
b8859b990e128439527f1435e614cd139f89b5cd
Previously the BSD socket path read only one UDP packet per loop() call. With multi-universe setups (e.g. 380 RGBW LEDs across 3 universes), this caused the light to re-render the entire strip for each universe packet separately, resulting in visible tearing and ~3x unnecessary RMT writes. Now both socket backends drain all available packets before returning, so multi-universe frames are applied atomically and the light only writes once per frame. The duplicated packet processing logic is consolidated into a shared loop with a platform-specific read_() helper. Tested on ESP32-IDF with 380 SK6812 RGBW LEDs (3 universes): - Light total CPU dropped from 5820ms to 1108ms per 60s (~5x) - Combined e131+light dropped from 6944ms to 4811ms per 60s - Visible tearing eliminated
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
516 MiB
Languages
C++
64.1%
Python
35.5%
C
0.3%
