@soubhik - I am using the PR version and did not have to merge anything. All I did was add the dev version of ESPHome to my install (it can coexist with the regular one) and then used the example YAML which pulls the needed code to program the ESP32.
The code that tells it where to get the integration that hasn’t been merged yet is:
I understand that only one can be controlled and set its parameters which is connected to rx tx to ld2410 respectively rx tx from esp 8266 and the rest just read clered or detected which are connected to the out pin from ld2410 and one gpio pin from esp8266?
I managed to get a LD2410C working with a Wemos D1 Mini Compatible ESP32 board and also got it to light up the internal blue LED when motion is detected. The LD2410C is connected using the UART pins (the pins marked TX and RX on the D1 Mini ESP32 board didn’t work and I had to use GPIO16 and GPIO17). Also the Bluetooth Proxy has been enabled for Home Assistant.
If it will help anyone, here is my config which got the LED working:
On ESP32, you may use almost any pins for UART. However, hardware UART pins are recommended for faster speed.
Also, you don’t need to switch serial logging off - ESP32 has 3 UARTs, so you’re good having both sensor and logger. Nevertheless, i had problems with using all 3 UARTs on some ESP32 Mini boards, but on other they work fine, all 3.
P.S. I don’t see that you use UART at all - just binary sensor, which is working without UART anyways.
Thanks for the feedback. I used GPIO16 and GPIO17 as the pinouts for my board seems to match the following diagram and it corresponds with UART2.
I also did have the distance and energy level sensors working but I removed them as they were creating lots of chatter to Home Assistant with the distance and energy levels constantly updating while I was in the room.
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
As I have the LD2410C with bluetooth, I found it much easier to use the Android app and connect to it directly via bluetooth to fine tune the gate thresholds and settings rather than setting them in the yaml and having to upload it to the ESP32 board each time.
Wouldn’t I still need to use the UART to get the data for Move Target and Still Target binary sensors?
Yeah you need it, sorry to be unclear. I meant, there’s 5th pin on sensor, and it provides simple binary sensor of presence (without moving/still, joined one). In that case you can use it directly, without UART.
Using gpio binary pins seems to be a good idea and works well in many places. But one also needs to be aware that the delayed off time in the parameter settings can become bothersome.
Very true. The delayed off time for presense (combined move and static) can be configured on the LD2410. I have connected it to an ESP32 using the UART as that way I can directly access the move target sensor which responds very quickly.
I got it to work with an ESP32 with one LD2410 over UART, now I would like to connect two or three LD2410 over UART to one ESP32 - how do I configure that in ESPhome (if it is possible)?
I’d agree that the LD2410B doesn’t play well with fans, even if the fan is outside the documented 60˚ cone of detection.
I have an LD2410B on the ceiling, with fan blades as close as 0.8m away and at the same height. The sensor shows an almost continuous moving target peaking at about 4m away, and a strong static target across the full range of 1.5m to 6m. I see no way to filter that out.
I’d guess fans, wind, curtain movement, and the like are problems for many home settings. I’d love to hear if anyone is able to effectively use these devices when dealing with such factors.
I have not. I’ve only looked at it via the HiLink phone app + bluetooth. I’m currently using it with HA via Bluetooth and a bluetooth proxy (with all it’s reconnect problems). I only became aware yesterday that connected (via wires), LD2410 support has significant updates that are not released yet.