Hi,
After searching for 4 days on this subject, I’ve not been able to pin down what’s wrong so had to create a new topic.
I’ve had 5 LD2410S delivered and I cannot get them to work on ESP32-C3, C6s or an original ESP32.
I’m getting data back from the device, but not in the format expected
Hex (23 bytes): f4 f3 f2 f1 0d 00 02 aa 03 4f 00 64 4c 00 64 32 00 55 00 f8 f7 f6 f5
Here are the logs, and showing some of the data back from the LD2410 module. All the sensors are showing as Unknown.
Creating esp32c3 image...
Successfully created esp32c3 image.
esp32_create_combined_bin([".pioenvs/motion-sensor-01/firmware.bin"], [".pioenvs/motion-sensor-01/firmware.elf"])
Wrote 0xf0650 bytes to file /data/build/motion-sensor-01/.pioenvs/motion-sensor-01/firmware-factory.bin, ready to flash to offset 0x0
========================= [SUCCESS] Took 74.84 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.1.219
INFO Uploading /data/build/motion-sensor-01/.pioenvs/motion-sensor-01/firmware.bin (919120 bytes)
Uploading: [============================================================] 100% Done...
INFO Upload took 14.96 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.1.219 using esphome API
INFO Successfully connected to motion-sensor-01 @ 192.168.1.219 in 4.187s
INFO Successful handshake with motion-sensor-01 @ 192.168.1.219 in 0.421s
[13:01:37][I][app:100]: ESPHome version 2024.4.0 compiled on Apr 18 2024, 13:00:26
[13:01:37][C][wifi:580]: WiFi:
[13:01:37][C][wifi:408]: Local MAC: C0:4E:30:82:E0:54
[13:01:37][C][wifi:413]: SSID: [redacted]
[13:01:37][C][wifi:416]: IP Address: 192.168.1.219
[13:01:37][C][wifi:420]: BSSID: [redacted]
[13:01:37][C][wifi:421]: Hostname: 'motion-sensor-01'
[13:01:37][C][wifi:423]: Signal strength: -51 dB ▂▄▆█
[13:01:37][C][wifi:427]: Channel: 1
[13:01:37][C][wifi:428]: Subnet: 255.255.255.0
[13:01:37][C][wifi:429]: Gateway: 192.168.1.1
[13:01:37][C][wifi:430]: DNS1: 192.168.1.1
[13:01:37][C][wifi:431]: DNS2: 0.0.0.0
[13:01:37][C][logger:166]: Logger:
[13:01:37][C][logger:167]: Level: DEBUG
[13:01:37][C][logger:169]: Log Baud Rate: 0
[13:01:37][C][logger:170]: Hardware UART: USB_SERIAL_JTAG
[13:01:37][C][uart.idf:139]: UART Bus 0:
[13:01:37][C][uart.idf:140]: TX Pin: GPIO9
[13:01:37][C][uart.idf:141]: RX Pin: GPIO10
[13:01:37][C][uart.idf:143]: RX Buffer Size: 256
[13:01:37][C][uart.idf:145]: Baud Rate: 256000 baud
[13:01:37][C][uart.idf:146]: Data Bits: 8
[13:01:37][C][uart.idf:147]: Parity: NONE
[13:01:37][C][uart.idf:148]: Stop bits: 1
[13:01:37][C][ld2410:022]: LD2410:
[13:01:37][C][ld2410:024]: TargetBinarySensor 'Presence'
[13:01:37][C][ld2410:024]: Device Class: 'occupancy'
[13:01:37][C][ld2410:025]: MovingTargetBinarySensor 'Moving target'
[13:01:37][C][ld2410:025]: Device Class: 'motion'
[13:01:37][C][ld2410:026]: StillTargetBinarySensor 'Still target'
[13:01:37][C][ld2410:026]: Device Class: 'occupancy'
[13:01:37][C][ld2410:068]: EngineeringModeSwitch 'Engineering mode'
[13:01:37][C][ld2410:070]: Icon: 'mdi:pulse'
[13:01:37][C][ld2410:079]: Device Class: 'switch'
[13:01:37][C][ld2410:091]: Restore Mode: always OFF
[13:01:37][C][ld2410:068]: BluetoothSwitch 'Bluetooth control'
[13:01:37][C][ld2410:070]: Icon: 'mdi:bluetooth'
[13:01:37][C][ld2410:079]: Device Class: 'switch'
[13:01:37][C][ld2410:091]: Restore Mode: always OFF
[13:01:37][C][ld2410:034]: ResetButton 'Factory reset module'
[13:01:37][C][ld2410:034]: Icon: 'mdi:restart-alert'
[13:01:37][C][ld2410:035]: RestartButton 'Restart module'
[13:01:37][C][ld2410:035]: Icon: 'mdi:restart'
[13:01:37][C][ld2410:036]: QueryButton 'Query parameters'
[13:01:37][C][ld2410:036]: Icon: 'mdi:database'
[13:01:37][C][ld2410:039]: LightSensor 'light'
[13:01:37][C][ld2410:039]: Device Class: 'illuminance'
[13:01:37][C][ld2410:039]: State Class: ''
[13:01:37][C][ld2410:039]: Unit of Measurement: ''
[13:01:37][C][ld2410:039]: Accuracy Decimals: 0
[13:01:37][C][ld2410:039]: Icon: 'mdi:lightbulb'
[13:01:37][C][ld2410:040]: MovingTargetDistanceSensor 'Moving distance (cm)'
[13:01:37][C][ld2410:040]: Device Class: 'distance'
[13:01:37][C][ld2410:040]: State Class: ''
[13:01:37][C][ld2410:040]: Unit of Measurement: 'cm'
[13:01:37][C][ld2410:040]: Accuracy Decimals: 0
[13:01:37][C][ld2410:040]: Icon: 'mdi:signal-distance-variant'
[13:01:37][C][ld2410:041]: StillTargetDistanceSensor 'Still Distance (cm)'
[13:01:37][C][ld2410:041]: Device Class: 'distance'
[13:01:37][C][ld2410:041]: State Class: ''
[13:01:37][C][ld2410:041]: Unit of Measurement: 'cm'
[13:01:37][C][ld2410:041]: Accuracy Decimals: 0
[13:01:37][C][ld2410:041]: Icon: 'mdi:signal-distance-variant'
[13:01:37][C][ld2410:042]: MovingTargetEnergySensor 'Move Energy (%)'
[13:01:37][C][ld2410:042]: State Class: ''
[13:01:37][C][ld2410:042]: Unit of Measurement: '%'
[13:01:37][C][ld2410:042]: Accuracy Decimals: 0
[13:01:37][C][ld2410:042]: Icon: 'mdi:motion-sensor'
[13:01:37][C][ld2410:043]: StillTargetEnergySensor 'Still Energy (%)'
[13:01:37][C][ld2410:043]: State Class: ''
[13:01:37][C][ld2410:043]: Unit of Measurement: '%'
[13:01:37][C][ld2410:043]: Accuracy Decimals: 0
[13:01:37][C][ld2410:043]: Icon: 'mdi:flash'
[13:01:38][C][ld2410:044]: DetectionDistanceSensor 'Detection Distance (cm)'
[13:01:39][C][ld2410:044]: Device Class: 'distance'
[13:01:39][C][ld2410:044]: State Class: ''
[13:01:39][C][ld2410:044]: Unit of Measurement: 'cm'
[13:01:39][C][ld2410:044]: Accuracy Decimals: 0
[13:01:39][C][ld2410:044]: Icon: 'mdi:signal-distance-variant'
[13:01:39][C][ld2410:046]: NthGateStillSesnsor 'G0 still energy'
[13:01:39][C][ld2410:046]: State Class: ''
[13:01:39][C][ld2410:046]: Unit of Measurement: '%'
[13:01:39][C][ld2410:046]: Accuracy Decimals: 0
[13:01:39][C][ld2410:046]: Icon: 'mdi:flash'
[13:01:39][C][ld2410:046]: NthGateStillSesnsor 'G1 still energy'
[13:01:39][C][ld2410:046]: State Class: ''
[13:01:39][C][ld2410:046]: Unit of Measurement: '%'
[13:01:39][C][ld2410:046]: Accuracy Decimals: 0
[13:01:39][C][ld2410:046]: Icon: 'mdi:flash'
[13:01:39][C][ld2410:046]: NthGateStillSesnsor 'G2 still energy'
[13:01:40][D][uart_debug:158]: <<< "\xC0\xF8\xFE\x06\xC6\x00\xC0\x00\xC0\x00>\x00\x00"
[13:01:40][D][uart_debug:158]: <<< "\xFC\xC0\x00\xFE\x00\xFE\x00\xF8\x00\x00\x00\xC0\x00\xC0\x00\x00"
[13:01:40][D][uart_debug:158]: <<< "\x82\xFE\x00\xF8\xC0\x00>\x00\x00\x00\x00"
[13:01:40][D][uart_debug:158]: <<< "\xC0>\x06\xF8\x00\x06\x00\x00\x00\x00"
[13:01:40][D][uart_debug:158]: <<< "\x00\xD0\xC68\x00>\x00\x00\x00\x00"
I’m using the standard code to connect - with added to get the UART debug.
uart:
id: ld2410_uart
rx_pin: 10
tx_pin: 9
baud_rate: 256000
parity: NONE
stop_bits: 1
debug:
direction: BOTH
dummy_receiver: false
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
ld2410:
uart_id: ld2410_uart
id: ld2410_comp
Has anyone any idea how to ‘read’ the data coming from the LD2410 as it’s not matching expected results and I’ve no way to connect the module directly to a windows device to try the app that I’ve been seeing.
Cheers in advance, Hugh!