esphome / esphome/feature-requests
LD2410B Auto-Calibration option
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
The HLK-LD2410B presence detection module, particularly with newer firmware versions (e.g., V2.44 and above), supports an "automatic detection of background noise" or "automatic threshold detection" feature. This allows the sensor to self-calibrate its sensitivity thresholds based on the current environment.
I would like to request the addition of a dedicated service or action within the existing `ld2410` ESPHome component to trigger this automatic calibration routine. This would be similar to the calibration features available for other radar modules like the LD2420.
**Please describe your use case for this integration and alternatives you've tried:**
The primary use case is to simplify the calibration process for the LD2410B sensor, making it more user-friendly and potentially improving its detection accuracy by allowing it to adapt to its specific installation environment and background noise levels. This would enable users to easily re-calibrate the sensor if its environment changes or to optimize its initial setup without deep technical knowledge of UART commands or manual threshold tuning.
**Alternatives tried:**
1. **Manual Calibration via Engineering Mode:** The current ESPHome component allows enabling engineering mode and monitoring `gX_move_energy` and `gX_still_energy` sensors to manually adjust sensitivity thresholds. This process can be time-consuming, iterative, and challenging for less technical users to optimize effectively.
2. **Sending Raw UART Commands:** It's possible to trigger the auto-calibration by sending specific byte sequences via `uart.write` in an ESPHome automation or script. However, this requires users to:
* Identify the correct firmware version on their module.
* Find the specific (and often undocumented by Hi-Link) serial command sequence for enabling configuration mode, triggering the auto-calibration, and then exiting configuration mode. This often involves referring to third-party libraries (like `iavorvel/MyLD2410` for Arduino) or community forums.
* Implement the logic in ESPHome YAML, which is error-prone and less accessible.
An integrated feature would abstract this complexity.
**Additional context**
* Hi-Link's documentation for the LD2410B (for firmware V2.44) mentions the "automatic detection of background noise" feature, which instructs the user to leave the area for a short period while the module records background noise to set thresholds.
* The ESPHome component for the similar LD2420 module already includes a `calibration_mode` and an `apply_config` action, which provides a precedent for this type of functionality.
* Third-party libraries, such as `iavorvel/MyLD2410` on GitHub, have demonstrated the ability to trigger this automatic threshold detection via serial commands, indicating that the necessary UART interface exists on supported firmware versions.
* Adding this feature would significantly enhance the usability of the LD2410B with ESPHome, allowing users to more easily achieve optimal performance from the sensor. It would provide a consistent user experience with other advanced sensor components in ESPHome.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.