espHome esp32-C6 with mmWave LD2410

I bought an esp32-C6 from Seeed studio. I realize that it is not fully supported. I can get it working. It is on the network. But I can’t get any readings from my LD2410. Any advice would be appreciated. I am using the latest version of Home Assistant and ESPHome. Here is my yaml:

esphome:
  name: esp1
  friendly_name: esp1

esp32:
  board: esp32-c6-devkitm-1
  flash_size: 4MB
  variant: ESP32C6
  framework:
    type: esp-idf
    version: latest

logger:


web_server:
  port: 80
  
# Enable Home Assistant API
api:
  encryption:
    key: "Secret"

ota:
  - platform: esphome
    password: "Secret"

wifi:
  networks:
  - ssid: my_ssid
    password: Secret    
    manual_ip:
      static_ip: 192.168.1.131
      gateway: 192.168.1.1
      subnet: 255.255.255.0

captive_portal:

uart:
  id: LD2410_UART
  tx_pin: GPIO16
  rx_pin: GPIO17
  baud_rate: 256000

ld2410:
  uart_id: LD2410_UART
  throttle: 1500ms

select:
  - platform: ld2410
    distance_resolution:
      name: "distance resolution"
    baud_rate:
      name: "baud rate"
    light_function:
      name: light function
    out_pin_level:
      name: out pin level

binary_sensor:
  - platform: gpio
    pin: GPIO18
    name: "PIR Sensor"
    device_class: motion
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: out pin presence status
      
switch:
  - platform: ld2410
    engineering_mode:
      name: "engineering mode"

sensor:
  - platform: ld2410
    light:
      name: light
    moving_distance:
      name : Moving Distance
    still_distance:
      name: Still Distance
    moving_energy:
      name: Move Energy
    still_energy:
      name: Still Energy
    detection_distance:
      name: Detection Distance
    g0:
      move_energy:
        name: g0 move energy
      still_energy:
        name: g0 still energy
    g1:
      move_energy:
        name: g1 move energy
      still_energy:
        name: g1 still energy
    g2:
      move_energy:
        name: g2 move energy
      still_energy:
        name: g2 still energy
    g3:
      move_energy:
        name: g3 move energy
      still_energy:
        name: g3 still energy
    g4:
      move_energy:
        name: g4 move energy
      still_energy:
        name: g4 still energy
    g5:
      move_energy:
        name: g5 move energy
      still_energy:
        name: g5 still energy
    g6:
      move_energy:
        name: g6 move energy
      still_energy:
        name: g6 still energy
    g7:
      move_energy:
        name: g7 move energy
      still_energy:
        name: g7 still energy
    g8:
      move_energy:
        name: g8 move energy
      still_energy:
        name: g8 still energy

number:
  - platform: ld2410
    timeout:
      name: timeout
    light_threshold:
      name: light threshold
    max_move_distance_gate:
      name: max move distance gate
    max_still_distance_gate:
      name: max still distance gate
    g0:
      move_threshold:
        name: g0 move threshold
      still_threshold:
        name: g0 still threshold
    g1:
      move_threshold:
        name: g1 move threshold
      still_threshold:
        name: g1 still threshold
    g2:
      move_threshold:
        name: g2 move threshold
      still_threshold:
        name: g2 still threshold
    g3:
      move_threshold:
        name: g3 move threshold
      still_threshold:
        name: g3 still threshold
    g4:
      move_threshold:
        name: g4 move threshold
      still_threshold:
        name: g4 still threshold
    g5:
      move_threshold:
        name: g5 move threshold
      still_threshold:
        name: g5 still threshold
    g6:
      move_threshold:
        name: g6 move threshold
      still_threshold:
        name: g6 still threshold
    g7:
      move_threshold:
        name: g7 move threshold
      still_threshold:
        name: g7 still threshold
    g8:
      move_threshold:
        name: g8 move threshold
      still_threshold:
        name: g8 still threshold  
1 Like

I’m on the same train, I’m experimenting with different versions of esp-idf, I’ll keep you updated if I can find something

I can share with you my configs, finally able to make it work, if you enable the bluetooth proxy it will fall:

esphome:
  name: esp32c6_presence_1
  friendly_name: 'ESP32C6 Presence 1'

esp32:
  board: esp32-c6-devkitm-1
  variant: esp32c6
  framework:
    type: esp-idf
    platform_version: 6.9.0
    version: 5.3.1
    
    sdkconfig_options:
      CONFIG_ESPTOOLPY_FLASHSIZE_4MB: y



###########################################################

uart:
  tx_pin: GPIO16
  rx_pin: GPIO17
  parity: NONE
  data_bits: 8
  stop_bits: 1
  baud_rate: 256000
  

ld2410:
  id: ld2410_radar

binary_sensor:
  - platform: ld2410
    has_target:
      name: Presence
    has_moving_target:
      name: Moving Target
    has_still_target:
      name: Still Target
    out_pin_presence_status:
      name: out pin presence status        

sensor:
  - platform: ld2410
    light:
      name: light
    moving_distance:
      name : Moving Distance
    still_distance:
      name: Still Distance
    moving_energy:
      name: Move Energy
    still_energy:
      name: Still Energy
    detection_distance:
      name: Detection Distance
    g0:
      move_energy:
        name: g0 move energy
      still_energy:
        name: g0 still energy
    g1:
      move_energy:
        name: g1 move energy
      still_energy:
        name: g1 still energy
    g2:
      move_energy:
        name: g2 move energy
      still_energy:
        name: g2 still energy
    g3:
      move_energy:
        name: g3 move energy
      still_energy:
        name: g3 still energy
    g4:
      move_energy:
        name: g4 move energy
      still_energy:
        name: g4 still energy
    g5:
      move_energy:
        name: g5 move energy
      still_energy:
        name: g5 still energy
    g6:
      move_energy:
        name: g6 move energy
      still_energy:
        name: g6 still energy
    g7:
      move_energy:
        name: g7 move energy
      still_energy:
        name: g7 still energy
    g8:
      move_energy:
        name: g8 move energy
      still_energy:
        name: g8 still energy

  - platform: wifi_signal 
    name: Wifi Signal
    id: wifi_signal_db
    filters:
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
    update_interval: 60s
    unit_of_measurement: "%"
    entity_category: "diagnostic"


switch:
  - platform: ld2410
    engineering_mode:
      name: "engineering mode"
    # bluetooth:
    #   name: "control bluetooth"

number:
  - platform: ld2410
    timeout:
      name: timeout
    light_threshold:
      name: light threshold
    max_move_distance_gate:
      name: max move distance gate
    max_still_distance_gate:
      name: max still distance gate
    g0:
      move_threshold:
        name: g0 move threshold
      still_threshold:
        name: g0 still threshold
    g1:
      move_threshold:
        name: g1 move threshold
      still_threshold:
        name: g1 still threshold
    g2:
      move_threshold:
        name: g2 move threshold
      still_threshold:
        name: g2 still threshold
    g3:
      move_threshold:
        name: g3 move threshold
      still_threshold:
        name: g3 still threshold
    g4:
      move_threshold:
        name: g4 move threshold
      still_threshold:
        name: g4 still threshold
    g5:
      move_threshold:
        name: g5 move threshold
      still_threshold:
        name: g5 still threshold
    g6:
      move_threshold:
        name: g6 move threshold
      still_threshold:
        name: g6 still threshold
    g7:
      move_threshold:
        name: g7 move threshold
      still_threshold:
        name: g7 still threshold
    g8:
      move_threshold:
        name: g8 move threshold
      still_threshold:
        name: g8 still threshold

text_sensor:
  - platform: ld2410
    version:
      name: "firmware version"
    mac_address:
      name: "mac address"

select:
  - platform: ld2410
    distance_resolution:
      name: "distance resolution"
    light_function:
      name: light function
    out_pin_level:
      name: out pin level


button:
  - platform: restart
    icon: mdi:power-cycle
    name: "ESP Reboot"   
  - platform: ld2410
    restart:
      name: "restart"
    query_params:
      name: query params

# Enable logging
logger:
  baud_rate: 0

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

ota:
  - platform: esphome
    password: "YourPSW"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32C6Test Fallback Hotspot"
    password: "YourPSW"
  
captive_portal:

Thank you for sharing that, Edoargo. Unfortunately, I am still not getting anything from the sensors.

Do you have a LD2410B or LD2410C? If so, they have bluetooth so you can try connecting to them via the HLK Radar Tool app from a phone to see if they are powering up and working.
Other things to check:

  • the LD2410 is powered using 5V and not 3.3V
  • the TX pin from the ESP32 board is connected to the RX pin on the LD2410
  • the RX pin from the ESP32 board is connected to the TX pin on the LD2410

Thanks for the suggestions. I have the LD2410 (not B or C) so no bluetooth. Ecoardo got his working by turning off the bluetooth on the esp32-c6. I am pretty sure the connections are correct. Right now I am trying to get it working using a RaspberryPi Zero W that I already have.

I bought a LD2410C. It worked using Edoardo’s yaml. Hooray!