Conversation
When two BRC1H controllers are paired through one ESP32 (e.g. a single BLE proxy serving multiple bedrooms), 50 ms between the back-to-back CMD_GET_* queries in update() is too tight: chunked notifications from the two devices interleave, and process_incoming_chunk_() trips on 'Another packet with the same chunk ID is already in the buffer' followed by 'Dropped XX BLE events due to buffer overflow'. 200 ms (the value SET_SETTING_STATUS / SET_FAN_SPEED already use) is enough to let one device finish responding before the next query goes out. Total update cycle goes from ~250 ms to ~1 s, well within PollingComponent's default 60 s interval, so no noticeable polling slowdown. Verified on two BRC1H + one m5stack-bleproxy.
|
To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file: external_components:
- source: github://Petapton/esphome@pull/13/head
components: [daikin_madoka]
refresh: 1h(Added by the PR bot) |
|
I'm quite sure this is not the way it works, since two devices mean two component instances (which don't share the same memory), so I see no risk of interleaving. |
|
You're right, and thanks for the push-back — two devices are two independent component instances with separate buffers, so my "interleaving in What I actually observed on one ESP32 proxying two BRC1H was contention at the radio/connection level, not in the chunk buffer. The second link kept failing to establish: i.e. the same scan ↔ connect/establish contention class as esphome#5119 / esphome#12970, made worse by a weak link to the second BRC1H. Bumping the inter-query delay was me chasing a symptom — it never addressed the real cause. I've since split the two BRC1H onto two separate ESP32s, each placed close to its panel, which is what actually fixed it. The previously-flaky link is now solid: So I'd treat this PR as not the right fix. I'm keeping it open only because I still want to get two-on-one-ESP working eventually; if I manage that I'll come back with proper logs, otherwise I'll close it. Happy for you to close it now if you prefer. |
When two BRC1H controllers are paired through one ESP32 (single BLE proxy serving multiple rooms), 50 ms between the back-to-back
CMD_GET_*queries inupdate()is too tight: chunked notifications from the two devices interleave, andprocess_incoming_chunk_()trips onfollowed shortly by
200 ms (the value
SET_SETTING_STATUSandSET_FAN_SPEEDalready use) gives each device enough time to finish its notify chunks before the next query goes out. Totalupdate()cycle goes from ~250 ms to ~1 s, well withinPollingComponent's default 60 s interval, so no perceptible polling slowdown.One-line change.
Test plan
update_interval— no more chunk-ID collisions in logs.