Hello,
I have an ESP32 with two LD2410C connected via UART.
Now one of them totally works, but for the other one (S2 in my config), only the binary sensors work, the rest (Engineering Mode, gate values, timeout, max still(/moving gate) doesn’t work…
How could I fix this?
My config is the following:
esphome:
name: ld2410-esp32-01
friendly_name: ld2410-esp32-01
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
level: DEBUG
baud_rate: 0
# Enable Home Assistant API
api:
encryption:
key: "IArm3ZGuqL1HLZXXbu4/L0ciw1TDSagu6THKP8LnFdo="
ota:
- platform: esphome
password: "3373716c7967d461cf4bd0ce1ba42e9a"
wifi:
networks:
- ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: NONE
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Ld2410-Esp32 Fallback Hotspot"
password: "AhxmD317i7r1"
captive_portal:
uart:
- id: ld2410_uart
tx_pin: 26
rx_pin: 32
baud_rate: 256000
parity: NONE
stop_bits: 1
- id: ld2410_uart_2
tx_pin: 21
rx_pin: 25
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2410:
- uart_id: ld2410_uart
id: ld2410_comp
throttle: 1000ms
- uart_id: ld2410_uart_2
id: ld2410_comp_2
throttle: 1000ms
select:
- platform: ld2410
ld2410_id: ld2410_comp
distance_resolution:
name: S1 distance resolution
- platform: ld2410
ld2410_id: ld2410_comp_2
distance_resolution:
name: S2 distance resolution
button:
- platform: restart
name: Reboot ESP32
- platform: ld2410
ld2410_id: ld2410_comp
factory_reset:
name: "S1 factory reset"
restart:
name: "S1 restart"
query_params:
name: S1 query params
- platform: ld2410
ld2410_id: ld2410_comp_2
factory_reset:
name: "S2 factory reset"
restart:
name: "S2 restart"
query_params:
name: S2 query params
number:
- platform: ld2410
ld2410_id: ld2410_comp
timeout:
name: S1 timeout
mode: box
max_move_distance_gate:
name: S1 max move distance gate
mode: box
max_still_distance_gate:
name: S1 max still distance gate
mode: box
g0:
move_threshold:
name: S1 g0 move threshold
mode: box
still_threshold:
name: S1 g0 still threshold
mode: box
g1:
move_threshold:
name: S1 g1 move threshold
mode: box
still_threshold:
name: S1 g1 still threshold
mode: box
g2:
move_threshold:
name: S1 g2 move threshold
mode: box
still_threshold:
mode: box
name: S1 g2 still threshold
g3:
move_threshold:
name: S1 g3 move threshold
mode: box
still_threshold:
name: S1 g3 still threshold
mode: box
g4:
move_threshold:
name: S1 g4 move threshold
mode: box
still_threshold:
name: S1 g4 still threshold
mode: box
g5:
move_threshold:
name: S1 g5 move threshold
mode: box
still_threshold:
name: S1 g5 still threshold
mode: box
g6:
move_threshold:
name: S1 g6 move threshold
mode: box
still_threshold:
name: S1 g6 still threshold
mode: box
g7:
move_threshold:
name: S1 g7 move threshold
mode: box
still_threshold:
name: S1 g7 still threshold
mode: box
g8:
move_threshold:
name: S1 g8 move threshold
mode: box
still_threshold:
name: S1 g8 still threshold
mode: box
- platform: ld2410
ld2410_id: ld2410_comp_2
timeout:
name: S2 timeout
mode: box
max_move_distance_gate:
name: S2 max move distance gate
mode: box
max_still_distance_gate:
name: S2 max still distance gate
mode: box
g0:
move_threshold:
name: S2 g0 move threshold
mode: box
still_threshold:
name: S2 g0 still threshold
mode: box
g1:
move_threshold:
name: S2 g1 move threshold
mode: box
still_threshold:
name: S2 g1 still threshold
mode: box
g2:
move_threshold:
name: S2 g2 move threshold
mode: box
still_threshold:
name: S2 g2 still threshold
mode: box
g3:
move_threshold:
name: S2 g3 move threshold
mode: box
still_threshold:
name: S2 g3 still threshold
mode: box
g4:
move_threshold:
name: S2 g4 move threshold
mode: box
still_threshold:
name: S2 g4 still threshold
mode: box
g5:
move_threshold:
name: S2 g5 move threshold
mode: box
still_threshold:
name: S2 g5 still threshold
mode: box
g6:
move_threshold:
name: S2 g6 move threshold
mode: box
still_threshold:
name: S2 g6 still threshold
mode: box
g7:
move_threshold:
name: S2 g7 move threshold
mode: box
still_threshold:
name: S2 g7 still threshold
mode: box
g8:
move_threshold:
name: S2 g8 move threshold
mode: box
still_threshold:
name: S2 g8 still threshold
mode: box
switch:
- platform: ld2410
ld2410_id: ld2410_comp
engineering_mode:
name: "S1 engineering mode"
bluetooth:
name: S1 control Bluetooth
- platform: ld2410
ld2410_id: ld2410_comp_2
engineering_mode:
name: "S2 engineering mode"
bluetooth:
name: S2 control Bluetooth
sensor:
- platform: ld2410
ld2410_id: ld2410_comp
moving_distance:
name: "S1 Moving distance (cm)"
still_distance:
name: "S1 Still Distance (cm)"
moving_energy:
name: "S1 Move Energy (%)"
still_energy:
name: "S1 Still Energy (%)"
detection_distance:
name: "S1 Distance Detection (cm)"
g0:
move_energy:
name: S1 g0 move energy
still_energy:
name: S1 g0 still energy
g1:
move_energy:
name: S1 g1 move energy
still_energy:
name: S1 g1 still energy
g2:
move_energy:
name: S1 g2 move energy
still_energy:
name: S1 g2 still energy
g3:
move_energy:
name: S1 g3 move energy
still_energy:
name: S1 g3 still energy
g4:
move_energy:
name: S1 g4 move energy
still_energy:
name: S1 g4 still energy
g5:
move_energy:
name: S1 g5 move energy
still_energy:
name: S1 g5 still energy
g6:
move_energy:
name: S1 g6 move energy
still_energy:
name: S1 g6 still energy
g7:
move_energy:
name: S1 g7 move energy
still_energy:
name: S1 g7 still energy
g8:
move_energy:
name: S1 g8 move energy
still_energy:
name: S1 g8 still energy
- platform: ld2410
ld2410_id: ld2410_comp_2
moving_distance:
name: "S2 Moving distance (cm)"
still_distance:
name: "S2 Still Distance (cm)"
moving_energy:
name: "S2 Move Energy (%)"
still_energy:
name: "S2 Still Energy (%)"
detection_distance:
name: "S2 Distance Detection (cm)"
g0:
move_energy:
name: S2 g0 move energy
still_energy:
name: S2 g0 still energy
g1:
move_energy:
name: S2 g1 move energy
still_energy:
name: S2 g1 still energy
g2:
move_energy:
name: S2 g2 move energy
still_energy:
name: S2 g2 still energy
g3:
move_energy:
name: S2 g3 move energy
still_energy:
name: S2 g3 still energy
g4:
move_energy:
name: S2 g4 move energy
still_energy:
name: S2 g4 still energy
g5:
move_energy:
name: S2 g5 move energy
still_energy:
name: S2 g5 still energy
g6:
move_energy:
name: S2 g6 move energy
still_energy:
name: S2 g6 still energy
g7:
move_energy:
name: S2 g7 move energy
still_energy:
name: S2 g7 still energy
g8:
move_energy:
name: S2 g8 move energy
still_energy:
name: S2 g8 still energy
binary_sensor:
- platform: ld2410
ld2410_id: ld2410_comp
has_target:
name: S1 Presence
has_moving_target:
name: S1 Moving Target
has_still_target:
name: S1 Still Target
- platform: ld2410
ld2410_id: ld2410_comp_2
has_target:
name: S2 Presence
has_moving_target:
name: S2 Moving Target
has_still_target:
name: S2 Still Target
Best regards
Aaron