How to work with HLK-LD1115H and Wemos D1 Mini for Human Presence Detection

Hi all. I think I read this thread 16 times. haha. Now I´m just confused. Which configuration/yaml and pins should I use for a Wemos D1 Mini and HLK-LD1115H? This is my first ESP project so please bare with me :wink:

Regards

Very very late reply, to use the code before official integration you can use external component.

external_components:

source: github://sebcaps/esphome@ld2410-nocore
components: [ld2410]

Hope it will be merged soon.

1 Like

See this for wiring and code: How to work with HLK-LD1115H and Wemos D1 Mini for Human Presence Detection - #43 by patrick339

I just built one myself and loving the results. Thanks again @patrick339

Thanks. Got it working. Trying to figure out the sensitivity now. Tried putting it in a pringles can to make it not pickup detection from the sides. LoL. Works pretty good.

hello,

EspHome 2023.2.0 is out today, i try it because in the doc seems the ld2410 support is ok, but it doesnt compile because component ld2410 still unknow…

seems its still only in EspHome-dev…

Im right?

Thanks @sebcaps for your great work on this component!

After the ESPhome 2023.2.0 update, I tried the compilation on the D1 mini and it passed without errors.
I will try everything when I connect the sensor.

can you provide your code please?

Here is. Change the sensor names to your native language.
It will take some fiddling with the zone settings, but it works for now.

esphome:
  name: radar-ld2410-1
  friendly_name: radar-ld2410-1

esp8266:
  board: esp01_1m

# Enable logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:

ota:
  password: "f1fc1dd8782116f1fd13d8c5f3092c"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Radar-Ld2410-1 Fallback Hotspot"
    password: "lQGe1BWnVOcs"

captive_portal:

uart:
  id: uart1
  tx_pin: 1
  rx_pin: 3
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

ld2410:
  timeout: 5s
  max_move_distance : 6m
  max_still_distance: 0.75m
  g0_move_threshold: 50
  g0_still_threshold: 0
  g1_move_threshold: 50
  g1_still_threshold: 0
  g2_move_threshold: 40
  g2_still_threshold: 40
  g3_move_threshold: 40
  g3_still_threshold: 40
  g4_move_threshold: 40
  g4_still_threshold: 40
  g5_move_threshold: 40
  g5_still_threshold: 40
  g6_move_threshold: 30
  g6_still_threshold: 15
  g7_move_threshold: 30
  g7_still_threshold: 15
  g8_move_threshold: 30
  g8_still_threshold: 15

sensor:
  - platform: ld2410
    moving_distance:
      name : Pohyb cíl vzdálenost
    still_distance:
      name: Statický cíl vzdálenost
    moving_energy:
      name: Pohyb cíl energie
    still_energy:
      name: Statický cíl energie
    detection_distance:
      name: Detekční vzdálenost

binary_sensor:
  - platform: ld2410
    has_target:
      name: Přítomnost
    has_moving_target:
      name: Pohybující se cíl
    has_still_target:
      name: Statický cíl

i dont see any difference with my code…

Nope doesnt compile…same error : complaining about ld2410 component not found…

i think there is something missing in my EspHome update…i delete addon and reinstall…same problem…

ld2410: [source /config/esphome/capteur-presence-sejournew.yaml:41]
Component ld2410 cannot be loaded via YAML (no CONFIG_SCHEMA).
Platform not found: 'binary_sensor.ld2410'
Platform not found: 'sensor.ld2410'.

I found a solution: for those having problems with ld2410 component in EspHome 2023.2.1, add this to your node did the trick :

external_components:
  - source: github://esphome/esphome@dev
    components: [ ld2410 ]

i dont understand why i am the only one who having trouble with LD2410 component in the last EspHome 2023.2.1 or 2023.2.2 of today, same problem…

I use the “standard” AddOn : EspHome, not “Beta” or “Dev” version, and it seems that LD2410 is, for the moment, only on the Dev version of the EspHome AddOn, that why the component LD2410 is not found on the basic version of EspHome :smile:

Did anyone ever get to the bottom of the “unknown” sensors, glad to see others have the same issue at least? I’m using the minimal examples from the esphome documentation and it’s still giving me unknown for the sensors. I know the device is working as I can see it in the bluetooth app. I’ve tried the custom yaml in here (same problem) but I’d prefer to stay as simple as possible ideally. TX on the board is wired to RX on the d1 mini and RX is wired to TX on the v3 d1_mini as per the above examples.

esphome:
  name: living_room_ld2410

# Enable Home Assistant API
api:

esp8266:
  board: d1_mini

logger:
  baud_rate: 0

ota:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  ap:
    ssid: "LD2410 Fallback Hotspot"

captive_portal:

uart:
  id: uart1
  tx_pin: 3
  rx_pin: 1
  baud_rate: 256000
  parity: NONE
  stop_bits: 1

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

sensor:
  - platform: ld2410
    moving_distance:
      name : Moving Distance
    still_distance:
      name: Still Distance
    moving_energy:
      name: Move Energy
    still_energy:
      name: Still Energy
    detection_distance:
      name: Detection Distance

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target

I already had a problem with cables several times. I do not recommend soldering directly to the pins. Use a plug. Replace the cables.

Check this:
TX Pin: GPIO1
RX Pin: GPIO3

uart:
  id: uart1
  tx_pin: TX
  rx_pin: RX

Alas I’m almost certain I have a bad board, I’ve tried everything I can think of now. I’ve not had a problem with any of my other esphome projects.

  • 5 different sets of micro JST connectors
  • Connected to TX and RX pins on the D1 and also to D7, D8.
  • Two D1 minis of different versions
  • Multiple different versions of esphome config.

I’ve resorted to putting a ESP32 bluetooth beacon nearby which seems to be working okay. Although not an ideal setup.

Same here. Will also debug this weekend. I’m not sure the board is broken. Maybe we can create a normal arduino script for the sensor and see by logging to the serial port if the measurements are stable and keep coming. Because in my case I fully loose connection to the espboard and therefore have no logs anymore

Yeah perhaps not fully broken as it does still work in bluetooth mode which is how I’m now using it but perhaps some bad UART connections soldered onto the board. I don’t have too much time to look into it at the moment so I’m hoping in a few weeks time someone has wrote up a definitive tutorial on getting these working with a D1 mini with troubleshooting tips! If more people report the same issue I suspect there might be some quality control issues with the boards mind.

I will try to investigate, reason I want to check it this way is that if I keep receiving messages over UART when it’s a simple (non-esphome) sketch the issue might be in the esphome. Maybe the large amount of messages/updates is crashing the ESP/D1 in combination with Wifi/ethernet

The problem with that theory is there are plenty of people in here using the D1 mini successfully. I’d point the finger more towards the LD than the D1 personally.

A recent firmware update to the LD2410C board enables a light sensor. Has anyone worked out how to get that sensor into HA yet?

I installed LD2410 BLE and it works great.
LD2410 BLE

What firmware update will allow the on board LED to function? I updated the firmware from V1.07.22091516 to V2.04.23022511 using the Iphone HiLink app but LED still not functioning.

For anyone that purchased the LD2410 Kit board (comes with a LD2410B and the correct header for it to plug in to the board) there are other through holes wired on the board with the correct spacing for the LD2410C. But you will need to use jumpers to reverse the TX and RX lines to get it to work.