Hi,
But which of two “1u” versions do I use? With UART or disabled UART?
I use ESPhome to compile.
The adaptation of no-uart will be a little better. uart version needs 2023.04 or more esphome.
The sensor is unusable for me, I am about 3 meters away from the sensor, I am lying on the couch and the sensor stops reporting presence after a while.
@Martin22 you have to configure the motion and static gates to match your needs. There are many other threads that talk about this if you are not familiar.
hey all
with todays “mm\pir” presence sensor madness, I was planning on checking my own luck with making a sensor on my own, but unfortunately my skills are worse then I anticipated…
i got a “nodemcu” esp32 chip wroom (as far as i can tell from what is written on it, from aliex), and a a small LD2410C for this project.
as implied above, you might already understood that it is not going as easy as I imagined.
non of the esphome config works for me (out of the box), and i would appreciate some help on sorting out all the parts i might need to change in the yaml that i do not understand well enough myself…
Ill be happy to provide more info that might help, just tell me what you need…
cheers
You could try using the yaml which I used for my ESP32 D1 Mini Compatible and the LD2410C sensor on the following post:
thank you for the quick replay
would it be to rode to ask for pointers on what do i need to pay attention to (and probably change) in that yaml to better suit my board?
and how do i figure out the correct values for my hardware?
in example - looking for the correct pin layout for my board to figure out the gpio/pins to use (currently i am using the RX/TX labeled pins on my board but like you mentioned - with no luck).
thanks and cheers
Do you have an Android phone? If you do, you can install the tool to connect to the LD2410C via bluetooth and it allows you graphically see what is being detected and also to configure the sensitivity of each distance gate. The following post has the link to the app:
Doing this will confirm if the LD2410C has power and is detecting motion/presense.
If that is all good then the next thing to do is to figure out what is wrong with the TX/RX pins. Have you ensured the TX from the LD2410C goes to RX on the ESP32 board and the RX from the LD2410C goes to the TX on the ESP32 board? If that has been done but it still doesn’t work, then try going TX → TX and RX → RX and see if it changes anything. I have read that others have had generic ESP32 boards where the TX and RX pin labels were mislabeled.
If that still doesn’t work then you may need to use alternative UART pins like I had to. Is this the ESP32 board that you have:
If the above matches your board, then try connecting the TX from the LD2410C to GPIO16 and the RX from the LD2410C to GPIO17 as highlighted in the above diagram.
Then try a basic yaml config like below. Just make sure you change the wifi details to match your network:
substitutions:
name: "esp32-motion-sensor"
esphome:
name: ${name}
name_add_mac_suffix: false
api:
ota:
logger:
level: INFO
baud_rate: 0
esp32:
board: nodemcu-32s
framework:
type: esp-idf
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
uart:
id: ld2410_uart
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2410:
uart_id: ld2410_uart
binary_sensor:
- platform: ld2410
has_target:
name: Presence
has_moving_target:
name: Moving Target
has_still_target:
name: Still Target
my man! (or woman)!
appreciate it so much!
ill try it and report back.
was just so happy with the detailed response that i had to congratulate you first!
cheers!
just came back to report that with this basic config, and some minor tweaking - i got it to work.
love this community, thank you all for this
now, what if i want to add a small the BME280 Digital Temperature Humidity sensor, on top of the presence sensor. is that possible? what needs to be done forward from here?
im guessing some more code to the yaml, and some more wiring …?
and what about adding Bluetooth proxy on top of that - is it possible, or am i mixing apples and orangutans…
cheers
Glad to hear that you managed to get it working.
Adding a temp/humidity sensor should be ok but be aware that the LD2410 does run fairly hot so it may impact the temperature reading if the sensor is placed too close to it. I haven’t added any other hardware to my ESP32 except for the LD2410 so not sure of what needs to be done but the following Esphome page should help:
Enabling the Bluetooth proxy is fine and I got that working on mine with the following YAML config:
esp32_ble_tracker:
scan_parameters:
interval: 320ms
window: 30ms
bluetooth_proxy:
active: true
Added the BLE to the config, installed wirelessly - works like a charm.
funny enough, the MM sensor sends the occupancy states through the BLE channel as well. HA picked it up right away (but it seems less reliable than the RX/TX transmissions through the ESP32 board).
ill keep playing with it when i’ll have more time and report back (hopefully upon success)…
cheers
I found that as soon as I enabled the Bluetooth proxy, HA found the LD2410 and added the integration. I disabled the LD2410 BLE integration in HA as I didn’t find it as reliable as the UART TX/RX connection. Since I was powering the LD2410 from the ESP32 anyway, what are two more wires. The TX/RX connection and using the wifi of the ESP32 gives me a solid and stable connection with the LD2410 sensor.
We made more than 70 sets of LD2410 based body sensor radar in order to cope with more purchases. Now that they are fully stocked, we are back online, so if you need a body sensor radar specifically tailored for Home Assistant without any plug-in cloud access, then we have it for you. For the love of Home Assistant, we hope to release more sensor kits soon.
For those of you who need a longer cable, we now offer 1m, 1m5 options. We’ve improved the ability to ship to the world, and now we’re really excited that they include Home Assistant enthusiasts all over the world.
the ble work fast and very well, but only in short range.
The temperature and humidity sensor and esp32 together is a nightmare, and with the ld2410 as a heat source in even worse. In our tests, if the distance cannot exceed at least 10cm for isolation, then the temperature and humidity readings are seriously off.
Hi All,
intresting topic.
I bought some LD2410C’s with the idea of connecting them via Blue Tooth to an already existing ESP32-Wroom that is setup as Air quality sensor.
While I manage to have a BLE connection sometimes the LD2410c also often becomes unavailable.
I also have some difficulty in getting the correct settings in the HLK app to have the LD2410c react to the movement and occupancy.
Could someone point me in the correct direction of solving these issues. Mainly the Blue tooth connection.
much appreciated.
In our experience, since the esp32 acts as a Bluetooth gateway, and the wifi is the same RF unit, this will gap work to capture the information packets, sometimes this works not so perfectly.
Then itself it seems that some of the Bluetooth part of HomeAssistant’s support has some less stable components.
These may help to improve Bluetooth connectivity:
- Using the Bluetooth adapter directly on Home Assistant
- Use an esp32 module with a network port to avoid wifi unit sharing, so that you can use a higher Bluetooth scan interval.
For our own advice, then it may be to use esp32 directly to wifi for connection, so as to avoid ble and will be much more stable.
We have done over 400 radar sensors in the last few days, and the results on the tests seem to be relatively stable.
Is your existing ESP32 setup as a Bluetooth Proxy and how far away is the LD2410C from the ESP32 board? The bluetooth range of the LD2410C is quite poor and it needs to be fairly close for the bluetooth connection to be reliable. I opted to connect the LD2410C directly to my ESP32 using the TX/RX pins and the connection has been rock solid. It doesn’t go unavailable at all except when I restart the ESP32 after an update.
Tweaking the sensitivity for each distance gate is a little tricky. Make sure that Engineering mode is turned on and you should see the graphs in the HLK app. The pink/red line on the graphs is the energy value (its like movement percentage, the higher the value the more movement is required before the target is detected) set for each distance gate and the blue line is what the sensor is detecting. Once the blue line goes above the pink/red line, the target is detected.
You can also reduce the number of detection points (max is 8 which is the furthest range of approx 6m) if you don’t want to detect moving or static targets up to the max distance (ie. set it to 5 will cause the sensor to detect up to gate 5 which is 3.75m if gate distance is set to 0.75m).
I suggest having the app open and the graphs displayed and walking around the room to see how the blue line moves as it detects you being still or moving around.