TillFleisch / ESPHome-HLK-LD2450

ESPHome support for the HI-Link HLK-LD2450 millimeter wave sensor (external component) with support for custom zones using convex polygons.
MIT License
105 stars 19 forks source link

Fix freezing sensor #7

Closed TillFleisch closed 9 months ago

TillFleisch commented 9 months ago

This PR fixes an issue related to message processing. When using complex ESPHome configurations and configurations using components that require a delay/long processing time, the RX buffer may fill up. This happens because its content is not processed in time. Once this happens, new updates from the sensor are not processed properly and new data does not arrive. This change also affects the reliability of switch components (reading their state), as the response messages might have been lost due to the RX buffer overflowing.

Increasing the RX buffer size using rx_buffer_size can be helpful. The changes introduced in this PR ensure the buffer is always read as far as possible.

Try this PR using:

external_components:
  - source: github://TillFleisch/ESPHome-HLK-LD2450@buffer-read-fix
    refresh: 30min

Close #1 Close #5