mirror of
https://github.com/esphome/esphome.git
synced 2026-08-24 07:06:20 +00:00
9580a90f55a7470d82da337d2974a0c09b378d7e
ESPHome's espnow component drives esp_now_* from the main loop; on the P4 shim each call is a blocking CustomRpc round-trip, so under co-processor load mesh traffic stalls the loop (and the UI). Take the round-trips out of the hot path: - Mirror the co-processor peer table locally (spinlock-guarded, since the esp_now_* symbols are public and not guaranteed to be called only from the main loop) so esp_now_is_peer_exist() answers with no round-trip — the espnow component calls it twice per received frame and once per send. - Make esp_now_send() fire-and-forget: the frame is handed to the transport and the real TX result still arrives via the async SEND event, matching native esp_now_send semantics (which already report completion via the callback). - Make esp_now_add_peer()/del_peer() fire-and-forget too, updating the mirror locally. Safe against a following send to a just-added peer: both ride the same in-order CustomRpc channel and the co-processor processes REQs FIFO, so ADD_PEER lands before the SEND. mod_peer stays synchronous (off the hot path).
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
575 MiB
Languages
C++
58.3%
Python
41.1%
C
0.3%
JavaScript
0.2%
