Multiple LD2410 on same ESP32 board

Is there a way to connect more than one LD2410 sensor to the same ESP32 board? With the normal esp-home config I don’t see how to add another sensor.

1 Like

Faruk,
Did you ever figure out how to do this? I’m trying to do the same thing and the yaml config is not obvious to me.

Scott

1 Like

New ESPHome update solved this.

3 Likes

RaptorHunterFaruk Correia
Hello. could you share a yaml example in which there are several LD2410 on the same ESP32 board?

Hi, your yaml config would be appreciated. Wouldn’t you mind sharing it?

As documentation for the future, here is my configuration with 3x LD2410C and 1xBH1750

The ESP32 board must provide three UART interface, some ESP32 boards only have one or two UART interfaces, there are probably no more than three.

My Board:
Diymore 3 Stück ESP32 Wroom 32 Entwicklungsplatine NodeMCU ESP32 Module ESP WROOM 32 2,4 GHz Dual Core WLAN WiFi Bluetooth CP2102 Chip
https://www.amazon.de/gp/product/B09Z6RLS7R/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&th=1

esphome:
  name: ep012-wc-room
  friendly_name: ep012-wc-room

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  - platform: esphome
    password: "xxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ep012-Wc-Room Fallback Hotspot"
    password: "xxxxx"

captive_portal:

time:
  - platform: homeassistant
    id: homeassistant_time

# Webserver
web_server:
  port: 80
  #username: !secret web_server_username
  #password: !secret web_server_password

# I2C - fuer BH1750 Licht-Sensor
i2c:
  sda: GPIO21
  scl: GPIO22
  scan: true
  id: bus_a


# https://esphome.io/components/sensor/ld2410.html
uart:
  - id: uart_0
    tx_pin: GPIO01
    rx_pin: GPIO03
    baud_rate: 256000
    parity: NONE
    stop_bits: 1
  - id: uart_1
    tx_pin: GPIO05
    rx_pin: GPIO04
    baud_rate: 256000
    parity: NONE
    stop_bits: 1
  - id: uart_2
    tx_pin: GPIO17
    rx_pin: GPIO16
    baud_rate: 256000
    parity: NONE
    stop_bits: 1

ld2410:
  - id: ld2410_1
    uart_id: uart_0
    throttle: 1500ms
  - id: ld2410_2
    uart_id: uart_1
    throttle: 1500ms
  - id: ld2410_3
    uart_id: uart_2
    throttle: 1500ms

select:
  - platform: ld2410
    ld2410_id: ld2410_1
    distance_resolution:
      name: "R1 distance resolution"
    baud_rate:
      name: "R1 baud rate"
    light_function:
      name: "R1 light function"
    out_pin_level:
      name: "R1 out pin level"
  - platform: ld2410
    ld2410_id: ld2410_2
    distance_resolution:
      name: "R2 distance resolution"
    baud_rate:
      name: "R2 baud rate"
    light_function:
      name: "R2 light function"
    out_pin_level:
      name: "R2 out pin level"
  - platform: ld2410
    ld2410_id: ld2410_3
    distance_resolution:
      name: "R3 distance resolution"
    baud_rate:
      name: "R3 baud rate"
    light_function:
      name: "R3 light function"
    out_pin_level:
      name: "R3 out pin level"

binary_sensor:
  - platform: ld2410
    ld2410_id: ld2410_1
    has_target:
      name: "R1 Radar Target"
    has_moving_target:
      name: "R1 Radar Moving Target"
    has_still_target:
      name: "R1 Radar Still Target"
    out_pin_presence_status:
      name: "R1 out pin presence status"
  - platform: ld2410
    ld2410_id: ld2410_2
    has_target:
      name: "R2 Radar Target"
    has_moving_target:
      name: "R2 Radar Moving Target"
    has_still_target:
      name: "R2 Radar Still Target"
    out_pin_presence_status:
      name: "R2 out pin presence status"
  - platform: ld2410
    ld2410_id: ld2410_3
    has_target:
      name: "R3 Radar Target"
    has_moving_target:
      name: "R3 Radar Moving Target"
    has_still_target:
      name: "R3 Radar Still Target"
    out_pin_presence_status:
      name: "R3 out pin presence status"
  - platform: status
    name: "ESPHome Status"
    device_class: connectivity





sensor:
  - platform: wifi_signal
    name: "ESPHome Wi-Fi Signal"
    update_interval: 60s
    entity_category: diagnostic

    #BH1750 Licht-Sensor
  - platform: bh1750
    name: "BH1750 Illuminance"
    address: 0x23
    update_interval: 60s

  - platform: ld2410
    ld2410_id: ld2410_1
    light:
      name: "R1 light"
    moving_distance:
      name : "R1 Moving Distance"
    still_distance:
      name: "R1 Still Distance"
    moving_energy:
      name: "R1 Move Energy"
    still_energy:
      name: "R1 Still Energy"
    detection_distance:
      name: "R1 Detection Distance"
    g0:
      move_energy:
        name: "R1 g0 move energy"
      still_energy:
        name: "R1 g0 still energy"
    g1:
      move_energy:
        name: "R1 g1 move energy"
      still_energy:
        name: "R1 g1 still energy"
    g2:
      move_energy:
        name: "R1 g2 move energy"
      still_energy:
        name: "R1 g2 still energy"
    g3:
      move_energy:
        name: "R1 g3 move energy"
      still_energy:
        name: "R1 g3 still energy"
    g4:
      move_energy:
        name: "R1 g4 move energy"
      still_energy:
        name: "R1 g4 still energy"
    g5:
      move_energy:
        name: "R1 g5 move energy"
      still_energy:
        name: "R1 g5 still energy"
    g6:
      move_energy:
        name: "R1 g6 move energy"
      still_energy:
        name: "R1 g6 still energy"
    g7:
      move_energy:
        name: "R1 g7 move energy"
      still_energy:
        name: "R1 g7 still energy"
    g8:
      move_energy:
        name: "R1 g8 move energy"
      still_energy:
        name: "R1 g8 still energy"
  - platform: ld2410
    ld2410_id: ld2410_2
    light:
      name: "R2 light"
    moving_distance:
      name : "R2 Moving Distance"
    still_distance:
      name: "R2 Still Distance"
    moving_energy:
      name: "R2 Move Energy"
    still_energy:
      name: "R2 Still Energy"
    detection_distance:
      name: "R2 Detection Distance"
    g0:
      move_energy:
        name: "R2 g0 move energy"
      still_energy:
        name: "R2 g0 still energy"
    g1:
      move_energy:
        name: "R2 g1 move energy"
      still_energy:
        name: "R2 g1 still energy"
    g2:
      move_energy:
        name: "R2 g2 move energy"
      still_energy:
        name: "R2 g2 still energy"
    g3:
      move_energy:
        name: "R2 g3 move energy"
      still_energy:
        name: "R2 g3 still energy"
    g4:
      move_energy:
        name: "R2 g4 move energy"
      still_energy:
        name: "R2 g4 still energy"
    g5:
      move_energy:
        name: "R2 g5 move energy"
      still_energy:
        name: "R2 g5 still energy"
    g6:
      move_energy:
        name: "R2 g6 move energy"
      still_energy:
        name: "R2 g6 still energy"
    g7:
      move_energy:
        name: "R2 g7 move energy"
      still_energy:
        name: "R2 g7 still energy"
    g8:
      move_energy:
        name: "R2 g8 move energy"
      still_energy:
        name: "R2 g8 still energy"
  - platform: ld2410
    ld2410_id: ld2410_3
    light:
      name: "R3 light"
    moving_distance:
      name : "R3 Moving Distance"
    still_distance:
      name: "R3 Still Distance"
    moving_energy:
      name: "R3 Move Energy"
    still_energy:
      name: "R3 Still Energy"
    detection_distance:
      name: "R3 Detection Distance"
    g0:
      move_energy:
        name: "R3 g0 move energy"
      still_energy:
        name: "R3 g0 still energy"
    g1:
      move_energy:
        name: "R3 g1 move energy"
      still_energy:
        name: "R3 g1 still energy"
    g2:
      move_energy:
        name: "R3 g2 move energy"
      still_energy:
        name: "R3 g2 still energy"
    g3:
      move_energy:
        name: "R3 g3 move energy"
      still_energy:
        name: "R3 g3 still energy"
    g4:
      move_energy:
        name: "R3 g4 move energy"
      still_energy:
        name: "R3 g4 still energy"
    g5:
      move_energy:
        name: "R3 g5 move energy"
      still_energy:
        name: "R3 g5 still energy"
    g6:
      move_energy:
        name: "R3 g6 move energy"
      still_energy:
        name: "R3 g6 still energy"
    g7:
      move_energy:
        name: "R3 g7 move energy"
      still_energy:
        name: "R3 g7 still energy"
    g8:
      move_energy:
        name: "R3 g8 move energy"
      still_energy:
        name: "R3 g8 still energy"

switch:
  - platform: ld2410
    ld2410_id: ld2410_1
    engineering_mode:
      name: "R1 engineering mode"
    bluetooth:
      name: "R1 control bluetooth"
  - platform: ld2410
    ld2410_id: ld2410_2
    engineering_mode:
      name: "R2 engineering mode"
    bluetooth:
      name: "R2 control bluetooth"
  - platform: ld2410
    ld2410_id: ld2410_3
    engineering_mode:
      name: "R3 engineering mode"
    bluetooth:
      name: "R3 control bluetooth"
  - platform: restart
    name: "ESPHome Restart"

number:
  - platform: ld2410
    ld2410_id: ld2410_1
    timeout:
      name: "R1 timeout"
    light_threshold:
      name: "R1 light threshold"
    max_move_distance_gate:
      name: "R1 max move distance gate"
    max_still_distance_gate:
      name: "R1 max still distance gate"
    g0:
      move_threshold:
        name: "R1 g0 move threshold"
      still_threshold:
        name: "R1 g0 still threshold"
    g1:
      move_threshold:
        name: "R1 g1 move threshold"
      still_threshold:
        name: "R1 g1 still threshold"
    g2:
      move_threshold:
        name: "R1 g2 move threshold"
      still_threshold:
        name: "R1 g2 still threshold"
    g3:
      move_threshold:
        name: "R1 g3 move threshold"
      still_threshold:
        name: "R1 g3 still threshold"
    g4:
      move_threshold:
        name: "R1 g4 move threshold"
      still_threshold:
        name: "R1 g4 still threshold"
    g5:
      move_threshold:
        name: "R1 g5 move threshold"
      still_threshold:
        name: "R1 g5 still threshold"
    g6:
      move_threshold:
        name: "R1 g6 move threshold"
      still_threshold:
        name: "R1 g6 still threshold"
    g7:
      move_threshold:
        name: "R1 g7 move threshold"
      still_threshold:
        name: "R1 g7 still threshold"
    g8:
      move_threshold:
        name: "R1 g8 move threshold"
      still_threshold:
        name: "R1 g8 still threshold"
  - platform: ld2410
    ld2410_id: ld2410_2
    timeout:
      name: "R2 timeout"
    light_threshold:
      name: "R2 light threshold"
    max_move_distance_gate:
      name: "R2 max move distance gate"
    max_still_distance_gate:
      name: "R2 max still distance gate"
    g0:
      move_threshold:
        name: "R2 g0 move threshold"
      still_threshold:
        name: "R2 g0 still threshold"
    g1:
      move_threshold:
        name: "R2 g1 move threshold"
      still_threshold:
        name: "R2 g1 still threshold"
    g2:
      move_threshold:
        name: "R2 g2 move threshold"
      still_threshold:
        name: "R2 g2 still threshold"
    g3:
      move_threshold:
        name: "R2 g3 move threshold"
      still_threshold:
        name: "R2 g3 still threshold"
    g4:
      move_threshold:
        name: "R2 g4 move threshold"
      still_threshold:
        name: "R2 g4 still threshold"
    g5:
      move_threshold:
        name: "R2 g5 move threshold"
      still_threshold:
        name: "R2 g5 still threshold"
    g6:
      move_threshold:
        name: "R2 g6 move threshold"
      still_threshold:
        name: "R2 g6 still threshold"
    g7:
      move_threshold:
        name: "R2 g7 move threshold"
      still_threshold:
        name: "R2 g7 still threshold"
    g8:
      move_threshold:
        name: "R2 g8 move threshold"
      still_threshold:
        name: "R2 g8 still threshold"
  - platform: ld2410
    ld2410_id: ld2410_3
    timeout:
      name: "R3 timeout"
    light_threshold:
      name: "R3 light threshold"
    max_move_distance_gate:
      name: "R3 max move distance gate"
    max_still_distance_gate:
      name: "R3 max still distance gate"
    g0:
      move_threshold:
        name: "R3 g0 move threshold"
      still_threshold:
        name: "R3 g0 still threshold"
    g1:
      move_threshold:
        name: "R3 g1 move threshold"
      still_threshold:
        name: "R3 g1 still threshold"
    g2:
      move_threshold:
        name: "R3 g2 move threshold"
      still_threshold:
        name: "R3 g2 still threshold"
    g3:
      move_threshold:
        name: "R3 g3 move threshold"
      still_threshold:
        name: "R3 g3 still threshold"
    g4:
      move_threshold:
        name: "R3 g4 move threshold"
      still_threshold:
        name: "R3 g4 still threshold"
    g5:
      move_threshold:
        name: "R3 g5 move threshold"
      still_threshold:
        name: "R3 g5 still threshold"
    g6:
      move_threshold:
        name: "R3 g6 move threshold"
      still_threshold:
        name: "R3 g6 still threshold"
    g7:
      move_threshold:
        name: "R3 g7 move threshold"
      still_threshold:
        name: "R3 g7 still threshold"
    g8:
      move_threshold:
        name: "R3 g8 move threshold"
      still_threshold:
        name: "R3 g8 still threshold"

button:
  - platform: ld2410
    ld2410_id: ld2410_1
    factory_reset:
      entity_category: diagnostic
      name: "R1 factory reset"
    restart:
      entity_category: diagnostic
      name: "R1 restart"
    query_params:
      entity_category: diagnostic
      name: "R1 query params"
  - platform: ld2410
    ld2410_id: ld2410_2
    factory_reset:
      entity_category: diagnostic
      name: "R2 factory reset"
    restart:
      entity_category: diagnostic
      name: "R2 restart"
    query_params:
      entity_category: diagnostic
      name: "R2 query params"
  - platform: ld2410
    ld2410_id: ld2410_3
    factory_reset:
      entity_category: diagnostic
      name: "R3 factory reset"
    restart:
      entity_category: diagnostic
      name: "R3 restart"
    query_params:
      entity_category: diagnostic
      name: "R3 query params"

text_sensor:
  - platform: ld2410
    ld2410_id: ld2410_1
    version:
      name: "R1 firmware version"
    mac_address:
      name: "R1 ble mac address"
  - platform: ld2410
    ld2410_id: ld2410_2
    version:
      name: "R2 firmware version"
    mac_address:
      name: "R2 ble mac address"
  - platform: ld2410
    ld2410_id: ld2410_3
    version:
      name: "R3 firmware version"
    mac_address:
      name: "R3 ble mac address"
  - platform: version
    name: "ESPHome Version"
  - platform: wifi_info
    ip_address:
      name: "ESPHome IP Address"
    ssid:
      name: "ESPHome Connected SSID"
    #bssid:
    #  name: "ESPHome Connected BSSID"
    mac_address:
      name: "ESPHome Mac Wifi Address"
    scan_results:
      name: "ESPHome Latest Scan Results"
    dns_address:
      name: "ESPHome DNS Address"


  - platform: wifi_info
    ip_address:
      name: ESPHome IP Address
      disabled_by_default: true
      entity_category: diagnostic