-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LD2450 component #5674
base: dev
Are you sure you want to change the base?
Add LD2450 component #5674
Conversation
Hey there @hareeshmu, CODEOWNERS = ["@hareeshmu"] And run (message by NeedsCodeownersLabel) |
Duplicate of #5624... |
Hey there @regevbr, @sebcaps, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @niklasweber, mind taking a look at this pull request as it has been labeled with an integration ( |
Hey there @descipher, mind taking a look at this pull request as it has been labeled with an integration ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for ld2410, update
a648a33
to
3508819
Compare
Progress! But.. weird. The above YAML also works IF:
I.E. without Also, if I add anything else, like a DHT, it's a no go. Same boot issues. |
Hi, I took the config from the example and it's working great but I'm facing some issues with some values not working properly
Stay all at zero even though I've correctly setup a zone and presence is detected within the zone See attached screens Board : ESP32 S2 Mini Wemos
EDIT : Tried with Everything Smart Home code for ld2450 at https://github.com/EverythingSmartHome/everything-presence-lite/blob/main/common/ld2450-base.yaml Works with per zone count occupancy if that's any help |
Tested without Factory Reboot and Restart Button on current ESPHome release. Result: Works perfect ! Only one minor thing: Good job nevertheless !!! :-) |
Is it possible to validate this PR? |
@hareeshmu After using this a while with two different batches of LD2450s, I've discovered something you may wish to add to the documentation. Multiple sensors from both batches have required that I use the white JST plug on the side at least once after flashing firmware for ESPHome on an ESP32 to recognize the Mac address. Once the white plug was used, the Mac address showed up and the device started working. I could then switch to the pins on the back with no issues. I tested and reproduced this on:
I did not test to validate this was happening on:
Examining the traces on the board, my guess is that the longer distance from the pins to the main processing chip is the reason for this need to "jump start". I would also guess that the solder points would have the same problems, as they seem to join with the traces from the pins. My suggestion for the doc:
|
Good morning I wanted to know what was blocking this development? |
@kbx81 can you review this request? |
Hello, thanks for the work on this integration. We've noticed the same as mentioned in another comment, the "direction" only shows "moving away". Thanks for the contribution to the community! |
Works well if I use the full config. Though if I use a stripped down config my ESP32 will never boot with the LD2450 connected. Once disconnected it will boot but the LD2450 never connects. This is the error I get:
This is the stripped down config I am attempting to use:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #5674 +/- ##
==========================================
+ Coverage 53.70% 53.80% +0.09%
==========================================
Files 50 50
Lines 9408 9812 +404
Branches 1654 1353 -301
==========================================
+ Hits 5053 5279 +226
- Misses 4056 4207 +151
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
any updates to get this merged ? |
Not sure where to put this request, but here it is.
If this is not the right place, please inform me. Thank you. |
Can this please be looked at merging soon? This is a very capable sensor and it would be an amazing addition for DIY Home Occupancy Sensors. |
Movement should be registered if speed is non-zero, in both directions.
Detect movement also in the negative direction
Any movement on merging this? I recently used this:
and outside of the target direction reporting as Moving Away for any movement towards or away from the sensor (Stationary reports as Stationary) it is working well. |
float angle_degrees = angle_radians * (180.0 / M_PI); | ||
return angle_degrees; | ||
} | ||
std::string get_direction_(int16_t speed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but you can improve performance by creating static strings to return here. I.e.,
const std::string& get_direction_(int16_t speed) {
static const std::string MOVING_AWAY = "Moving away";
...
Fixes target direction always being moving away Co-authored-by: Trevor Schirmer <[email protected]>
What does this implement/fix?
Support of LD2450 human motion tracking radar sensor
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3327
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: