ESP32 and LD2410 UART - Sensors unknown

INFO ESPHome 2024.10.0
INFO Reading configuration /config/esphome-web-25f128.yaml...
INFO Starting log output from 192.168.68.79 using esphome API
INFO Successfully connected to ld2410-esp32v2 @ 192.168.68.79 in 0.067s
INFO Successful handshake with ld2410-esp32v2 @ 192.168.68.79 in 0.102s
[10:52:01][I][app:100]: ESPHome version 2024.10.0 compiled on Oct 19 2024, 09:14:43
[10:52:01][C][wifi:600]: WiFi:
[10:52:01][C][wifi:428]:   Local MAC: C8:2E:18:25:F1:28
[10:52:01][C][wifi:433]:   SSID: [redacted]
[10:52:01][C][wifi:436]:   IP Address: 192.168.68.79
[10:52:01][C][wifi:440]:   BSSID: [redacted]
[10:52:01][C][wifi:441]:   Hostname: 'ld2410-esp32v2'
[10:52:01][C][wifi:443]:   Signal strength: -54 dB ▂▄▆█
[10:52:01][C][wifi:447]:   Channel: 2
[10:52:01][C][wifi:448]:   Subnet: 255.255.252.0
[10:52:01][C][wifi:449]:   Gateway: 192.168.68.1
[10:52:01][C][wifi:450]:   DNS1: 80.58.0.33
[10:52:01][C][wifi:451]:   DNS2: 80.58.32.97
[10:52:01][C][logger:185]: Logger:
[10:52:01][C][logger:186]:   Level: DEBUG
[10:52:01][C][logger:188]:   Log Baud Rate: 115200
[10:52:01][C][logger:189]:   Hardware UART: UART0
[10:52:01][C][uart.arduino_esp32:151]: UART Bus 1:
[10:52:01][C][uart.arduino_esp32:152]:   TX Pin: GPIO17
[10:52:01][C][uart.arduino_esp32:153]:   RX Pin: GPIO16
[10:52:01][C][uart.arduino_esp32:155]:   RX Buffer Size: 256
[10:52:01][C][uart.arduino_esp32:157]:   Baud Rate: 256000 baud
[10:52:01][C][uart.arduino_esp32:158]:   Data Bits: 8
[10:52:01][C][uart.arduino_esp32:159]:   Parity: NONE
[10:52:01][C][uart.arduino_esp32:160]:   Stop bits: 1
[10:52:01][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Presence pin'
[10:52:01][C][gpio.binary_sensor:015]:   Device Class: 'occupancy'
[10:52:01][C][gpio.binary_sensor:016]:   Pin: GPIO25
[10:52:01][C][ld2410:022]: LD2410:
[10:52:01][C][ld2410:068]:   EngineeringModeSwitch 'engineering mode'
[10:52:01][C][ld2410:070]:     Icon: 'mdi:pulse'
[10:52:01][C][ld2410:079]:     Device Class: 'switch'
[10:52:01][C][ld2410:091]:     Restore Mode: always OFF
[10:52:01][C][ld2410:068]:   BluetoothSwitch 'control Bluetooth'
[10:52:01][C][ld2410:070]:     Icon: 'mdi:bluetooth'
[10:52:01][C][ld2410:079]:     Device Class: 'switch'
[10:52:01][C][ld2410:091]:     Restore Mode: always OFF
[10:52:01][C][ld2410:034]:   ResetButton 'factory reset'
[10:52:01][C][ld2410:034]:     Icon: 'mdi:restart-alert'
[10:52:01][C][ld2410:035]:   RestartButton 'restart'
[10:52:01][C][ld2410:035]:     Icon: 'mdi:restart'
[10:52:01][C][ld2410:036]:   QueryButton 'query params'
[10:52:01][C][ld2410:036]:     Icon: 'mdi:database'
[10:52:01][C][ld2410:040]:   MovingTargetDistanceSensor 'Moving distance (cm)'
[10:52:01][C][ld2410:040]:     Device Class: 'distance'
[10:52:01][C][ld2410:040]:     State Class: ''
[10:52:01][C][ld2410:040]:     Unit of Measurement: 'cm'
[10:52:01][C][ld2410:040]:     Accuracy Decimals: 0
[10:52:01][C][ld2410:040]:     Icon: 'mdi:signal-distance-variant'
[10:52:01][C][ld2410:041]:   StillTargetDistanceSensor 'Still Distance (cm)'
[10:52:01][C][ld2410:041]:     Device Class: 'distance'
[10:52:01][C][ld2410:041]:     State Class: ''
[10:52:01][C][ld2410:041]:     Unit of Measurement: 'cm'
[10:52:01][C][ld2410:041]:     Accuracy Decimals: 0
[10:52:01][C][ld2410:041]:     Icon: 'mdi:signal-distance-variant'
[10:52:01][C][ld2410:042]:   MovingTargetEnergySensor 'Move Energy (%)'
[10:52:01][C][ld2410:042]:     State Class: ''
[10:52:01][C][ld2410:042]:     Unit of Measurement: '%'
[10:52:01][C][ld2410:042]:     Accuracy Decimals: 0
[10:52:01][C][ld2410:042]:     Icon: 'mdi:motion-sensor'
[10:52:01][C][ld2410:043]:   StillTargetEnergySensor 'Still Energy (%)'
[10:52:01][C][ld2410:043]:     State Class: ''
[10:52:01][C][ld2410:043]:     Unit of Measurement: '%'
[10:52:01][C][ld2410:043]:     Accuracy Decimals: 0
[10:52:01][C][ld2410:043]:     Icon: 'mdi:flash'
[10:52:01][C][ld2410:044]:   DetectionDistanceSensor 'Distance Detection (cm)'
[10:52:01][C][ld2410:044]:     Device Class: 'distance'
[10:52:01][C][ld2410:044]:     State Class: ''
[10:52:01][C][ld2410:044]:     Unit of Measurement: 'cm'
[10:52:01][C][ld2410:044]:     Accuracy Decimals: 0
[10:52:01][C][ld2410:044]:     Icon: 'mdi:signal-distance-variant'
[10:52:01][C][ld2410:053]:   VersionTextSensor 'presenece sensor version'
[10:52:01][C][ld2410:053]:     Icon: 'mdi:chip'
[10:52:01][C][ld2410:054]:   MacTextSensor 'presenece sensor mac address'
[10:52:01][C][ld2410:054]:     Icon: 'mdi:bluetooth'
[10:52:01][C][ld2410:057]:   LightFunctionSelect 'light function'
[10:52:01][C][ld2410:057]:     Icon: 'mdi:lightbulb'
[10:52:01][C][ld2410:058]:   OutPinLevelSelect 'out pin level'
[10:52:01][C][ld2410:058]:     Icon: 'mdi:scale'
[10:52:01][C][ld2410:059]:   DistanceResolutionSelect 'distance resolution'
[10:52:01][C][ld2410:059]:     Icon: 'mdi:ruler'
[10:52:01][C][ld2410:060]:   BaudRateSelect 'baud rate'
[10:52:01][C][ld2410:060]:     Icon: 'mdi:thermometer'
[10:52:02][C][ld2410:075]:   Throttle_ : 1500ms
[10:52:02][C][ld2410:076]:   MAC Address : 
[10:52:02][C][ld2410:077]:   Firmware Version : 
[10:52:02][C][captive_portal:089]: Captive Portal:
[10:52:02][C][mdns:116]: mDNS:
[10:52:02][C][mdns:117]:   Hostname: ld2410-esp32v2
[10:52:02][C][esphome.ota:073]: Over-The-Air updates:
[10:52:02][C][esphome.ota:074]:   Address: ld2410-esp32v2.local:3232
[10:52:02][C][esphome.ota:075]:   Version: 2
[10:52:02][C][esphome.ota:078]:   Password configured
[10:52:02][D][uart_debug:158]: >>> "\xFD\xFC\xFB\xFA\x04\x00\xFF\x00\x01\x00\x04\x03\x02\x01\xFD\xFC\xFB\xFA\x02\x00\xA0\x00\x04\x03\x02\x01\xFD\xFC\xFB\xFA\x04\x00\xA5\x00\x01\x00\x04\x03\x02\x01\xFD\xFC\xFB\xFA\x02\x00\xAB\x00\x04\x03\x02\x01\xFD\xFC\xFB\xFA\x02\x00\xAE\x00\x04\x03\x02\x01\xFD\xFC\xFB\xFA\x02\x00a\x00\x04\x03\x02\x01\xFD\xFC\xFB\xFA\x02\x00\xFE\x00\x04\x03\x02\x01"
[10:52:02][C][safe_mode:018]: Safe Mode:
[10:52:02][C][safe_mode:020]:   Boot considered successful after 60 seconds
[10:52:02][C][safe_mode:021]:   Invoke after 10 boot attempts
[10:52:02][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[10:52:02][C][api:140]: API Server:
[10:52:02][C][api:141]:   Address: ld2410-esp32v2.local:6053
[10:52:02][C][api:143]:   Using noise encryption: YES
[10:52:42][D][binary_sensor:036]: 'Presence pin': Sending state OFF
[10:54:01][D][binary_sensor:036]: 'Presence pin': Sending state ON
[10:54:10][D][binary_sensor:036]: 'Presence pin': Sending state OFF

Could be something related to different hours between the systems? ESP logs show 2 hours less than my local time

Not really, the sensor doesn’t know it.
You need to see a line like this in your log:

with <<< indicating received data.

Is it possible that you changed the default serial parameters in the app?

SOLVED!!!

As anticipated by you… It was a hardware issue. All the sensors I have are defective!

I used an LD2410b from Amazon and it worked directly.

Thank you all for your help and support!!

You found out why?
Nice that you made it at least!

No, it could be a wrong manufacturing process, I don’t know what, but exchanging the sensor worked directly. And honestly I lost 4 days of my life with this… so buying new sensors now…

Thanks again for your help!!

1 Like

Just another four days to go down in to the rabbit hole… to find out why… in the name of science… :grinning: