LD2410 esphome tips

If it is the wall opposite you can just disable the detection for the furthest gates so it won’t reat to those. Look at the numbers in engineering mode while something moves behind the wall.

ESPHome release 5.0 essentially “bricked” several of my ESP d1mini devices including the ld2410 presence sensors. I have about 10 presence sensors and 7 are apparently unrecoverable (at least I don’t know how). A number of other users have the same problem and there seem to be a number of theories about the cause but I haven’t found any responses from the ESPhome team?
Is there a “fix” coming? Should I toss my bad presence sensors? Start over with ESP32’s? Advice from the experts would be appreciated.

Read this for some tips

Reverting to.previous version and unsoldering worked for me.

That also worked for me for a couple devices, but others semingly identical devices simply won’t connect. I have reverted back to previous version and disconnected tx/rx. They show up as on line but cannot install anything. Won’t connect by any method I know.

One of mine needed to be setup as new device first, then copy the api and ota password to the original yaml and it flashed fine then, no idea why it was only one device out of 4 though. It took many hours of messing about to get that one back.

Not updating esphome for a while yet that is all I can say. :slight_smile:

My D1Mini’s were purchased at various times and places so there could be differences internally. The devices show up in ESPHome as on-line but logs cannot be viewed
(WARNING Can’t connect to ESPHome API for ld2410-12 @ 192.168.86.114: Error connecting to [AddrInfo(family=<AddressFamily.AF_INET: 2>, type=<SocketKind.SOCK_STREAM: 1>, proto=6, sockaddr=IPv4Sockaddr(address=‘192.168.86.114’, port=6053))]: [Errno 111] Connect call failed (‘192.168.86.114’, 6053) (SocketAPIError).
When attempting to reinstall of treat as new devices, these devices will not connect. Removing the TX/RX connections allowed a couple to connect but had no effect on most. Wish those supporting ESPHome would comment on the issue (if the have, I missed it). Just want the right approach to move on…

Yep it would be nice if someone with knowledge of the coding involved in Esphome to comment on the issue. Maybe they have not even seen the issue. Is there a way to make them aware of this, as the issue raised on github seems to have been overlooked.

i’ve been playing with that, but it’d also be useful to be able to enforce the directionality (id buy more and put them in some other locations)

They are probably working on it, there is a lot if issues reported.

https://github.com/esphome/esphome/pulls?q=is%3Apr+is%3Aopen+ble

for my case using d1 mini,

just disable the wifi serial improve line on uart logger

Were you able to solve the problem and run ESP32-c6 in 802.15.4 with LD2410?

I am not convinced about the stability of Wifi, even though I have great routers and a mesh network, I think that sharing the network with media devices is not a good idea.

It would be great if HLK-LD2410 worked fully on ZigBee.

Is it fixed with Esphome 2024.5.4 ?

I will wait and not update yet unless someone confirms it :wink: .

It seams issue has been fixed. 2024.5.4

1 Like

Just received two from AliExpress. Looking forward to playing with them but…there are about 4-5 projects ahead of them lol. I will say, AliExpress seems to be shipping a bit faster lately which is nice. Much better prices than Amazon if you can wait a few more days.

How exactly did you solve this problem? I have the same hardware, the same problem and I can’t just disable logging, it won’t let me:

logger:
baud_rate: 0

This results in:

Failed config

improv_serial: [source /config/esphome/esphome-web-f72157.yaml:28]

improv_serial requires the logger baud_rate to be not 0.
{}

I also tried this:

logger:
baud_rate: 1

and this:

logger:
baud_rate: 115200
level: NONE

These two are valid but I’m still getting energy spikes.

Comment out improv_serial and then try it again:

#improv_serial:
1 Like

That was it, many thanks!

1 Like

trying to integrate esphome and ld2410 to iobroker using mqtt similar to this post
but the ld2410 platform sends binary sensor values

binary_sensor:

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

as text values “on” and “off”. How can I convert this to boolean 1/0 ?

You can try creating a template sensor to return the numeric values.
Add an ID value to the binary sensor:

binary_sensor:
  - platform: ld2410
    has_target:
      name: "Presence"
      id: presence

And then add the following sensor:

sensor:
  - platform: template
    name: Presence-Boolean
    lambda: |-
      if (id(presence).state) {
        return 1;
      } else {
        return 0;
      }

@athua thank you for your reply, I tried it and basically it works but the template sensor is not sending every time new data is provided by the binary sensor. I also tried on a esp32 - but the same thing there. What else can I do?