I see you are also using D1 mini (v3.0). I have version 4.0. I can’t get data with this script. When debugging UART, I get data on both TX/RX and GPIO15/GPIO15 pins. However, the entities still remain “unknown”.
The sensor, when connected to USB using the manufacturer’s tool, works correctly.
I am assuming you are using GPIO15 & GPIO13?? For both of the setups, I used what the op has provided (RX & TX pins). Have already tried these pins and it didn’t work for you??
Actually the data you see does not look like the data that a LD2410 typically sends, you should see groups of 0xF4 0xF3 0xF2 0xF1 and 0xF8 0xF7 0xF6 0xF5.
I waa having this problem the other day. It’s my first ESP32 project so quite noob on electronics.
I had 2 problems:
I wasn’t using the correct RX and TX pins. If you use the default ones, you need to disable the logger setting baud_rate: 0 as a logger property. If you want to use the others, you need to check for your specific board datasheet and find the correct pins
I’m so noob that I didn’t notice that the RX and TX pins are a loop, so the RX pin of the sensor goes to the TX pin of the board and viceversa.
As soon as I did that, the entities were not showing as Unknown anymore.
Today I managed to solve my problem.
Thanks to @amandel’s answer, I understood that there must be something wrong with the LD2410 module. I reconnected it to the PC via the USB converter and tried to read the data using the manufacturer’s program. LD2410 is dead … I prepared a new piece and it works without any problems, both on the TX / RX and D7 / D8 pins.
@Hitesh_Singh - try connecting a new LD2410, soft is OK. Or try to read the data from the old one using the UART/USB converter and the manufacturer’s program (LD2410 Tool). If the old one works with the PC, you have a problem with the electrical/signal connections.
Managed to install this nice sensor in my home. It is controlling the light in toilet (where sometimes you “stay” with little movements for longer time - not detected by typical PIR sensor) and at this point is connected only with OUT pin to ESP8266.
To connect to pins I used JST GH 1,25 mm 5 PIN connector:
Before mounting in final case (I used broken PIR sensor case) I taped it in the place where it will be, connected to laptop and tested/changed sensors ranges setting so it covers “no-moving” sitting person.
Then put into box, close it and start “live testing” period - ongoing…
While testing, it was also working connected with UART (Tx - GPIO01, Rx - GPIO03) but I decided that it seem too complex for this particular need. I was also concerned about load it generated for ESP. Once official ESPHome support will be available I may reconsider.
I just released a small box to hold this module together with a D1 mini.
It uses the JST connector to hold the module in place and you can rotate it horizontally.
You can find it on thingiverse