mmWave Wars: one sensor (module) to rule them all

Mine is still Chinese too.

I wrote three posts above what to do to make the application run in English

Yet I have an iPhone and that just is not the case for me.

Anyone else having problems with the sensor resetting its settings after a couple of days?
I’ve experienced this 2 times with my LD2410B connected to a D1 Mini now. All of a sudden its always triggered on static motion. Restart doesn’t reset it.
To fix it I have to connect with bluetooth. I can then see in the app that the static detection has changed to 1 while moving detection I still at 8.

The ranges in “parameter settings” have also changed back to factory settings.
Bloody annoying. Works fine until this happends. Im using the settings from the official esphome integration.

I assume you have set these values in the yaml to the values you set in Bluetooth

ld2410:
  timeout: 150s
  max_move_distance : 6m
  max_still_distance: 0.75m
  g0_move_threshold: 10
  g0_still_threshold: 20
  g1_move_threshold: 10
  g1_still_threshold: 20
  g2_move_threshold: 20
  g2_still_threshold: 21
  g3_move_threshold: 30
  g3_still_threshold: 31
  g4_move_threshold: 40
  g4_still_threshold: 41
  g5_move_threshold: 50
  g5_still_threshold: 51
  g6_move_threshold: 60
  g6_still_threshold: 61
  g7_move_threshold: 70
  g7_still_threshold: 71
  g8_move_threshold: 80
  g8_still_threshold: 81

Mine if restarted set to the values I set in the yaml.

Hehe, yeah, thats small detail occured to me just after I posted my question.
Did the changes in the yaml, and thats seems to work. But the problem with “Static detection” is still there.
As soon as I reboot or upload anything to the D1, those settings changes.
“Movement detection” stays at 8, but “Static detection” drops to 1. To fix this I need to connect via BT, jump into parameter settings and move the slider, then restart the module.

Is it possible to set this setting in the yaml? Haven’t found any info on this. I think one of the other LD2410 projects have a slider for this.

Hey guys,

I set up my DFRobots a while back and it looks like the ESPhome side of this has picked up with a lot more options for distance and movement ect since then which I would love to add to my own.

Can someone point me to a repo and has anyone done any doco explaining the best way to make sensors out of these new “attributes”

Thanks all :slight_smile:

sorry for the dumb question…
Are you using the sensor code from crlogic or from the esphome portal? is it possible to share the config code?

amandel/esphome-ld2410: Implementation of a HLK-LD2410 component for ESPHome (github.com)

2 Likes

Anyone tested LD2420? aliexpress

Hello, can you tell me how you connected GPIO14 for the presence?

I recently bought a 2420. Unfortunately the tool for programming the sensor is not working with the current version of the sensor (v2). There is also no communication docu available from Hilink. So for now its just collection dust, hoping that either Hilink updates their programming tool for the 2420 soon or someone creates some custom components for an integration in esphome…
It has been out there for some time and the community hasn’t picked it up yet, so the 2420 will probably be the forgotten sensor, living in the shade of the mighty 2410…

2 Likes

Hey, just ordered some of these.

Whats the speed like?

Did you encounter any compile errors?

I am getting the following

Compiling /data/esphome-web-e58d24/.pioenvs/esphome-web-e58d24/src/main.cpp.o
In file included from src/main.cpp:109:
src/ld2410.h: In constructor 'VersionSensor::VersionSensor()':
src/ld2410.h:27:50: error: no matching function for call to 'esphome::text_sensor::TextSensor::TextSensor(const char [15])'
     VersionSensor() : TextSensor("Version Number") {
                                                  ^
In file included from src/esphome/core/controller.h:20,
                 from src/esphome/components/api/api_server.h:4,
                 from src/esphome/components/api/api_connection.h:6,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/components/text_sensor/text_sensor.h:31:7: note: candidate: 'esphome::text_sensor::TextSensor::TextSensor()'
 class TextSensor : public EntityBase {
       ^~~~~~~~~~
src/esphome/components/text_sensor/text_sensor.h:31:7: note:   candidate expects 0 arguments, 1 provided
src/esphome/components/text_sensor/text_sensor.h:31:7: note: candidate: 'esphome::text_sensor::TextSensor::TextSensor(const esphome::text_sensor::TextSensor&)'
src/esphome/components/text_sensor/text_sensor.h:31:7: note:   no known conversion for argument 1 from 'const char [15]' to 'const esphome::text_sensor::TextSensor&'
src/esphome/components/text_sensor/text_sensor.h:31:7: note: candidate: 'esphome::text_sensor::TextSensor::TextSensor(esphome::text_sensor::TextSensor&&)'
src/esphome/components/text_sensor/text_sensor.h:31:7: note:   no known conversion for argument 1 from 'const char [15]' to 'esphome::text_sensor::TextSensor&&'
In file included from src/main.cpp:109:
src/ld2410.h: At global scope:
src/ld2410.h:84:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
     static constexpr char *const TAG = "ld2410";
                                        ^~~~~~~~

OK changing

VersionSensor() : TextSensor("Version Number") {

to

VersionSensor() : TextSensor() {

Allowed it to compile, seems like it is not expecting any arguments there. No version number though but I’ll live with it I suppose.

I connected it to the “out” pin if I recall correctly.
Also for the uart remember to connect rx-tx and tx-rx :wink:

uart:
  id: uart_bus
  tx_pin: GPIO17
  rx_pin: GPIO16

maybe @amandel could make this change in the repo

1 Like

Yea all is working fine after the change, version and everything is still there. My rx pin had disconnected thats why I wasnt seeing the version initially :smiley:

Thank you !

I did the change - not sure why it worked before. Thanks for the feedback!

2 Likes