LD2410 esphome tips

If you are setting up a new LD2410 sensor now, it is best to use the ESPHome LD2410 integration as its fully supported by ESPHome and not external integrations.
When this sensor first became popular, only the BLE integration was available and if you wanted to connect it via an ESP32 board, you had to rely on dev / external integrations.

The ESPHome LD2410 integration also allows all the config settings to be made within Home Assistant so you no longer require the HLKRadarTool app to adjust the settings.

The example provided by FriedCheese above is using the ESPHome LD2410 integration.

Great, does the platform.io part work in espHome? What platforms have you tried running this on so far? Are you running anything with Everything Presence One base code and do you have an Aqara Fp1 or Fp2? Anyone who also is reading this and knows anything about the EP1 espHome yaml please feel free to chime in as I whipped my new EP1 with the espHome web install tool and now am having trouble finding a yaml that validates without error and enables all the basic settings to be changed using Home Assistant. Does anyone know a good blog for the EP1? Also, I am trying to learn about fine-tuning Aqara presence detection devices and if anyone has any information they can share. Sorry to degrees on this thread.

I have a LD2410 and ESP32 sitting on top of the bathroom plasterboard ceiling. It is working great. I created an automation to have the lights going on and off depending of the presence. Thing is that I found out that due to the bathrooms layout the “detected” is not staying “on”, long enough and being cleared to soon. So I also included the “bathroom_motion_sensor_radar_still_energy” which seemed to work great. It only goes below 10 after leaving the bathroom. So used that as a condition.

What I want to achieve and now is not happening:
Light is activated normally with the switch - it stays on as long as presence is detected - than after no presence detected (below 10) and cleared detection - light goes off after a delay off 1 minute. Secondly during a certain time frame at night, the lights may be activated (on)by presence detection (between 20.30 and 23.30) and going of after no presence detected.
Somehow this is not working, or the lights just staying on even after the dalay. Any suggestions how to get my automation working this way? Or anyone willing to share their similar use automation? Thanks

alias: Badkamer Aanwezigheid
description: "Presence detected in the bathroom"
trigger:
  - type: not_occupied
    platform: device
    device_id: 98347efcfad9c6b60e543721105c416e
    entity_id: dbdaaa8ee230538b14dcb54a9783b11a
    domain: binary_sensor
    id: cleared
  - type: occupied
    platform: device
    device_id: 98347efcfad9c6b60e543721105c416e
    entity_id: dbdaaa8ee230538b14dcb54a9783b11a
    domain: binary_sensor
    id: detected
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - detected
          - condition: time
            after: "20:30:00"
            before: "23:00:00"
        sequence:
          - service: switch.turn_on
            target:
              entity_id: switch.relay_switch_1x3kw_3
            data: {}
      - conditions:
          - condition: trigger
            id:
              - cleared
          - condition: numeric_state
            entity_id: sensor.badkamer_motion_sensor_radar_still_energy
            below: 10
        sequence:
          - delay:
              hours: 0
              minutes: 2
              seconds: 0
              milliseconds: 0
            enabled: true
          - service: switch.turn_off
            target:
              entity_id: switch.relay_switch_1x3kw_3
            data: {}
mode: single

They post the official YAML to GitHub.

in all my automations i do the same on and off due to presence which would tell me you need to adjust your still energy to give you a true reading presence within that room

So you suggest leave that condition out?

without trying to sound to rude here id get the sensor working right and then go from there

if setup right, if your in that room still or moving it should detected you as presence and that why i always use presence as my trigger

I have it working now. Setting the radar timeout for longer than 5s. Left out the condition. Now it works fine.

Yeah I can’t get this base config to validate. I think it has something to do with me not knowing anything about formatting for substitutions.

What’s the error when it fails validation?

For a few months now, I’ve been experiencing something strange at gates 3 and 4. The still energy increases by about 10% and stays at that level for a few hours, then returns to the normal level, which is around 6%.
Does anyone have any idea what it could be?

Anything. Some electric appliance, curtains, fan and so on. It doubtedly the Ld bug, your should search smth external.

It is installed in the bathroom, without a curtain and no electrical equipment in the bathroom. The only things in the bathroom are the LD2410 and 1 sonoff mini.
The only thing that comes to mind would be some anomaly in the power source, I’m using a Hi-Link power source

that should be enough for them.
Self noice? (bad fixing)
Thin walls

Note that radar goes through walls, especially wooden, thin ones…

The walls are made of bricks.
The sensor is well fixed to the ceiling, made of concrete.
A little far from the power source, 15cm maybe.
The sensor pins are directly soldered to the esp32.

The high peaks are due to some movement close to the door, but there is nothing in the vicinity of the sensor/bathroom that could cause this increase in the gates for 8/10 hours straight.

I got my ld2510c going and now I’m trying a ld2450. I have error logs and will add them here. It might not take much to fix, I’m just calling it quits for now.

Not sure were I can post the code from my compile log files. I’ll poke around and see if I can attach it here or post it to GitHub and link it here.

On a different note, I’m happy to report I have my EP1 connected to HA and my Aqara Fp2 also.

I haven’t done anything with the EP1 at all since adding it and I have the Fp2 ruining the open floor plan portion of my home setup and it works pretty amazing. I also have a few ld2410c units running on Waveshare ESP32C3 minis that I haven’t learned how to configure the gates for yet. I’m just trying to get everything accessible so I can start to configure them and write automations. Any tips would be greatly appreciated and if I can help anyone with setting up something please ask. I’ll be around a lot I believe as I’m going to be playing around with this tech for pretty often.

Yaml, though tile is for a 2410c:

(https://docs.google.com/document/d/1145Qri9g5ZKNeXzzc9SCFt1IzKKwNoo9jIL5C7aYSq8/edit)

[https://docs.google.com/document/d/1199CQ0GAhjbQD8yy0

yAFPjXFz2h7z1Wo8nl14w-ZmfQ/edit](https://docs.google.com/document/d/1199CQ0GAhjbQD8yy0yAFPjXFz2h7z1Wo8nl14w-ZmfQ/edit)

There are 2 files but I’m to tired to double check which one of these isn’t one. Let me know if the links work please.

Hope everyone has a good day, thanks for all your assistance.

I finally got it to pull it’s config from GitHub or something. Pretty cool how it works, though I had a bit of trouble, probably do to my dns settings. Thanks for posting this. I wonder what type of custom things I can add to the config because it has everything auto configured except beta features from what I’ve seen so far.

For more details on the LD2450, there is lots of info in this thread:

1 Like

Thanks, not sure were I got the SCREEK config, I think it was this tread. I just need to fix what might be the last error, though I’m sure I’m speaking to soon, as something else may manifest after this error is corrected as I’ve learned from experience and due to lack of coding skills. Just like the ld2410, there are quite a few versions of this project available. Apparently my config just has a bracket where something else is expected or something like that. Thing is I don’t see this issue visually so it may be a bad blank spacing code or something. I will get some time investigate further tonight hopefully.

1 Like