LD2410 esphome tips

Hello guys,

there is some fresh version, very promising : https://github.com/esphome/esphome/pull/4434

You can now set everything and test and do it again to fine tuning!!! really nice feature.

I definitively prefer the LD2410+ESP instead of the LD2410B or C because bluethooth disconnect several times per hours, what is really not accurate for a presence/occupancy sensor…
In fact, the integration no more work if you update your Node (Bluetooth proxy) so you have to restart HA after each update. And your LD2410B need to be near to your Node, about 6m maximum, to avoid disconnections.

Sadly because the bluethooth version is so simple to use and consume nothing…

image

Hello,

i have make a standalone LD2410B with relay and power supply to lighton/off automatically, all included in a wall socket :

3D file available on Thingiverse :
https://www.thingiverse.com/thing:5929077

Enjoy!

1 Like

Agreed - I have played with both the Bluetooth and non-Bluetooth versions and have come to the conclusion that the best way to add these to home assistant is to get the Bluetooth version and hook it up to an ESP on the occupancy data pin and don’t use them as Bluetooth sensors.

This way you can use the android app to adjust sensitivity as well as do firmware upgrades (I don’t think this is possible in the windows app) and not have to reboot every time it looses connectivity. Also, once added as a BLE sensor you can’t use the app to make adjustments, you have to cycle power, adjust in the app then reboot HASS.

Can you make a small Tutorial on how to hook it with ESP for noobs like us, I am new to HA and have ordered Bluetooth version and completely clueless on via integration with ESP32. Thats why I ordered the Bluetooth version to have hassle free experience but since everyone is facing issues with Bluetooth. It would be great help…:slight_smile:

I have several working with ESPHome (very pleased) and also tried BLE only. My experience with BLE is it is unreliable. They are discovered quickly, but bounce in and out of unavailable. Also they report a second or two later (same sensor reporting thru ESPHome and BLE). I see no reason to use it.

Perhaps I have overlooked the obvious, but I haven’t discovered how the default values are set for Moving Distance and Still Distance. Some have defaults, others don’t. I did nothing (that I’m aware of) to set them. How?

hello,

Ble version is great for a standalone use because it doesnt even need to be integrate in HA, only if you need the sensor for automation. It works with a Bluethooth proxy on a dedicated ESP32 : see here to create a bluetooth proxy : https://esphome.github.io/bluetooth-proxies/ and here https://esphome.io/components/bluetooth_proxy.html
Well, it works great, OUT OF THE BOX, i personnaly dont tweak or change anything for a normal use : room of 5m x 6m.
The only problem is when you update Esphome Bluethooth proxy, you need to restart HA to have the sensor alive back, and sometimes redo the integration. But it works, out of the box, you just need to connect +5v to VCC and GND to GND, i take a broken USB cable and cut the micro side and just solder on a connector with 1.24 pitch i bought on Aliexpress (see my pictures or previous posts).

To hook a LD2410 to a Wemos D1 mini, no need for a tutorial to connect 4 pins :slight_smile:
ESP8266 LD2410
5V ----------------------------------- VCC
GND--------------------------------- GND
RX ----------------------------------- Uart-Tx
TX------------------------------------ Uart-Rx

or this :

the advantage is you can tweak everything, but its much bigger sensor and need much power. Very reliable.

4 Likes

I found BLE reliable, if you dont mind the update problem. YOU NEED : a Bluetooth proxy at maximum 6m to your LD2410 (LD2410 has not a really long range BLE module). And its important to not have a bunch of active connections on your Bluetooth proxy, maximum is 3. I have only 1 active with LD2410 and 2 passives with Xiaomi_lywsd03mmc (temp + humidty) at the same BLEProxy, and it works great. I have 4 bluetooth proxy for all my house (233m² with 1 floor), its pretty enough for cover all the rooms.

It instantly detect when i move and occupancy works great. i have absolutely any delay. Perhaps you have to take care of your Wifi network (interferences, channel choose, transmit power, if you have theses settings available).

i have 4 Ubiqi LC-AP-PRO and i let them choose nightly the best channel, in mesh config, because i have a bunch of Zigbee, on 2 networks : one with Z2M on channel 11 with a Sonoff USB dongle 3.0 and another Network with ZHA on channel 25 with an Ezsp (its a Silvercrest Ethernet Gateway, hacked). So the bandwith is quite occuped…but it works great, my Wifi works great everywhere in the house. I have no Wifi 6, only 2.4Ghz and 5Ghz.

If you want to tweak settings, you need the Android app (chinese only) or better, the Windows APP. You have to plug a bluetooth dongle in your PC and you can set everything you want.

But, personnaly, i dont tweak anything and it works great OUT OF THE BOX :wink:

2 Likes

Hello, I initially had some issues with false positives (due to a ceiling fan) and some false negatives even after tuning really close to the ‘background noise’ of my setup.

Played a bit with the ESPHome Binary Sensor filters and found that this worked pretty well for me when paired with a properly calibrated setup. Hope it can help someone else out there.

This setup has enabled me to use the LD2410B + Wemos D1 Mini in a room with ceiling fan.
The LD2410B itself is angled towards the ground a little with pins on top (as per documentation describes the ‘bubble’ to be ‘weakest’ on the pins side).

Hope this helps someone!

ld2410:
  uart_id: ld2410b_uart
  timeout: 2s
  # Calibrated gate sensitivity goes below here.


binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
      filters:
        # delayed_on prevents false positives when background noise spikes randomly.
        - delayed_on: 5s
        # delayed_off prevents false negatives when people fall asleep on my couch.
        - delayed_off: 10s
3 Likes

Perhaps your BLE setup is much better than mine. My RF environment is stressed. I tried several Proxy’s near the sensor’s but still got too many unavailables. For me, it dosen’t seem to make sense to use an ESP32 to try to make a LE environement work when the sensor is anything but LE. Seems simpler to use an 8266 and the more reliable WiFi net. Anyway what ever works in your environment is great.

When looking at my Moving Distance and Still Distance entities, I get this “default” value that sometimes show up under “display percision”. It is not there for all my sensors. The value shows up in the History Graph. Does anyone else see such a thing?

Mine shows last detected value. Sometimes if it falsely detects something at 30-40cm, it stays that way the entire time without triggering presence on the binary sensors.

It then updates when there’s actual detection after to the correct value.

Trying to understand how to use these values. Still working on it. The “default” designation is confusing to me.

Just curious, anyone finding that their LD2410 boards are failing? I have lost one already and thought I just lost another but after unplugging and replugging it came back to life. Just wondering if anyone else is seeing anything similar? Generally I am quite happy with these and have deployed 8 around the house already with the idea of adding a few more but wouldn’t be happy if they start to randomly fail.

I have one used almost 3 months. No problem at all. Used several times a day (it is controlling light in toilet) and as I recall it had 1 or 2 cases that it did not detect movement. I find it super good and even is person is sitting still it detects presence. So I will for sure install more and will recommend.
Im using only GPIO (not using UART) output with ESPHome.




we make three type ld2410 with esphome.

we test more than 50 unit ld2410b, it’s very stable, but you need very stable power supply, and the esp board need a very good ldo power unit.

1 Like

What is your esp32 yaml for using the RX and TX pins?

Are your sensors getting noticable warm as well? Mine do.
Because i want to use the LD2410 on ESPhome together with a Temperature-Sensor, i need to reduce the Heating, as it significantly influences the Readings.
I don’t a a just-in-time-Distance Reporting - an Update every 1,2,3 Minutes would be totally sufficant as well. Unfortunatly, yet logically, Deep-Sleeping the ESP doesn’t power-off the LD2410 (im using it on +5V like supposed).

Is there a Way to reduce polling frequency on the LD2410 itself, to e.g. 120s - if that would reduce the thermal heating? Or do you have a Hint how i could let the Sensor follow the DeepSleep (and Wakeup) of the ESP32? Somehow i would need to turn off +5V during DeepSleep. Or lift GND? If course only if that doesn’t stress the Hardware to get turned On/off 400 Times a Day :smiley:

The temperature of the ld2410 is relatively high, and it is not easy to reduce it. From the official personnel, we got some clues. If the detection distance gate is reduced, it will help reduce the heat dissipation temperature.

1 Like

I did the same but it doesn’t work.
In my case all sensor is unknown ha ha
What should I do ?

i dont use a Esp32 i use esp8266 with wemos d1 mini, Rx ans Tx pins.