XIAO ESP32C3 not sending mmWave sensor data

Hi,

I just got my hands on some:
Seeed-XIAO-ESP32C3
Seeed 24GHz mmWave Sensor

Seeed got a blog post containing a tutorial on how to set this up with ESPHome.

I’ve of course followed the tutorial very thoroughly. The ESP will connect to Home Assistant, but it won’t send me any sensor data at all. Logs are not telling me anything, it’s like the mmWave sensor is not even connected to the ESP. I have tripple checked the wiring, tried with three different esp’s and sensors.

Help me please :slight_smile:

ESPHome log:

INFO Reading configuration /config/esphome/ny.yaml...
INFO Starting log output from ny.local using esphome API
INFO Successfully connected to ny.local
[23:53:06][I][app:102]: ESPHome version 2023.3.1 compiled on Mar 25 2023, 21:01:17
[23:53:06][C][wifi:504]: WiFi:
[23:53:06][C][wifi:362]:   Local MAC: 34:85:18:05:43:E0
[23:53:06][C][wifi:363]:   SSID: [redacted]
[23:53:06][C][wifi:364]:   IP Address: 192.168.1.101
[23:53:06][C][wifi:366]:   BSSID: [redacted]
[23:53:06][C][wifi:367]:   Hostname: 'ny'
[23:53:06][C][wifi:369]:   Signal strength: -46 dB ▂▄▆█
[23:53:06][C][wifi:373]:   Channel: 6
[23:53:06][C][wifi:374]:   Subnet: 255.255.255.0
[23:53:06][C][wifi:375]:   Gateway: 192.168.1.1
[23:53:06][C][wifi:376]:   DNS1: 192.168.1.1
[23:53:06][C][wifi:377]:   DNS2: 0.0.0.0
[23:53:06][C][logger:293]: Logger:
[23:53:06][C][logger:294]:   Level: DEBUG
[23:53:06][C][logger:295]:   Log Baud Rate: 115200
[23:53:06][C][logger:296]:   Hardware UART: USB_SERIAL_JTAG
[23:53:06][C][uart.idf:116]: UART Bus:
[23:53:06][C][uart.idf:117]:   Number: 0
[23:53:06][C][uart.idf:118]:   TX Pin: GPIO21
[23:53:06][C][uart.idf:119]:   RX Pin: GPIO20
[23:53:06][C][uart.idf:121]:   RX Buffer Size: 256
[23:53:06][C][uart.idf:123]:   Baud Rate: 115200 baud
[23:53:06][C][uart.idf:124]:   Data Bits: 8
[23:53:06][C][uart.idf:125]:   Parity: NONE
[23:53:06][C][uart.idf:126]:   Stop bits: 1
[23:53:06][C][template.select:065]: Template Select 'Standard Scene mode'
[23:53:06][C][template.select:065]:   Icon: 'mdi:hoop-house'
[23:53:06][C][template.select:066]:   Update Interval: 60.0s
[23:53:06][C][template.select:069]:   Optimistic: YES
[23:53:06][C][template.select:070]:   Initial Option: Living room
[23:53:06][C][template.select:071]:   Restore Value: NO
[23:53:06][C][template.select:065]: Template Select 'Standard unmanned time'
[23:53:06][C][template.select:065]:   Icon: 'mdi:timeline-clock'
[23:53:06][C][template.select:066]:   Update Interval: 60.0s
[23:53:06][C][template.select:069]:   Optimistic: YES
[23:53:06][C][template.select:070]:   Initial Option: None
[23:53:06][C][template.select:071]:   Restore Value: NO
[23:53:06][C][template.select:065]: Template Select 'Custom Presence of perception boundary'
[23:53:06][C][template.select:066]:   Update Interval: 60.0s
[23:53:06][C][template.select:069]:   Optimistic: YES
[23:53:06][C][template.select:070]:   Initial Option: 0.5m
[23:53:06][C][template.select:071]:   Restore Value: NO
[23:53:06][C][template.select:065]: Template Select 'Custom Motion trigger boundary'
[23:53:06][C][template.select:066]:   Update Interval: 60.0s
[23:53:06][C][template.select:069]:   Optimistic: YES
[23:53:06][C][template.select:070]:   Initial Option: 0.5m
[23:53:06][C][template.select:071]:   Restore Value: NO
[23:53:06][C][template.number:050]: Template Number 'Standard sensitivity'
[23:53:06][C][template.number:050]:   Icon: 'mdi:archive-check-outline'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 2.0s
[23:53:06][C][template.number:050]: Template Number 'Standard Maximum detectable range of moving target'
[23:53:06][C][template.number:050]:   Icon: 'mdi:map-marker-path'
[23:53:06][C][template.number:050]:   Unit of Measurement: 'cm'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Standard Maximum detectable range of stationary target'
[23:53:06][C][template.number:050]:   Icon: 'mdi:map-marker-path'
[23:53:06][C][template.number:050]:   Unit of Measurement: 'cm'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Judgment threshold exists'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Motion amplitude trigger threshold'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Mode Settings'
[23:53:06][C][template.number:050]:   Icon: 'mdi:cog'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Mode Settings End'
[23:53:06][C][template.number:050]:   Icon: 'mdi:cog'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Custom Mode Query'
[23:53:06][C][template.number:050]:   Icon: 'mdi:cog'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Motion trigger time'
[23:53:06][C][template.number:050]:   Icon: 'mdi:camera-timer'
[23:53:06][C][template.number:050]:   Unit of Measurement: 'ms'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Movement to rest time'
[23:53:06][C][template.number:050]:   Icon: 'mdi:camera-timer'
[23:53:06][C][template.number:050]:   Unit of Measurement: 'ms'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.number:050]: Template Number 'Custom Time of entering unmanned state'
[23:53:06][C][template.number:050]:   Icon: 'mdi:camera-timer'
[23:53:06][C][template.number:050]:   Unit of Measurement: 'ms'
[23:53:06][C][template.number:051]:   Optimistic: NO
[23:53:06][C][template.number:052]:   Update Interval: 60.0s
[23:53:06][C][template.text_sensor:021]: Template Sensor 'Standard Product model'
[23:53:06][C][template.text_sensor:021]:   Icon: 'mdi:information-outline'
[23:53:06][C][template.text_sensor:021]: Template Sensor 'Standard Product ID'
[23:53:06][C][template.text_sensor:021]:   Icon: 'mdi:information-outline'
[23:53:06][C][template.text_sensor:021]: Template Sensor 'Standard Hardware model'
[23:53:06][C][template.text_sensor:021]:   Icon: 'mdi:information-outline'
[23:53:06][C][template.text_sensor:021]: Template Sensor 'Standard Firmware version'
[23:53:07][C][template.text_sensor:021]:   Icon: 'mdi:information-outline'
[23:53:07][C][template.text_sensor:021]: Template Sensor 'Standard protocol type'
[23:53:07][C][template.text_sensor:021]:   Icon: 'mdi:information-outline'
[23:53:07][C][template.text_sensor:021]: Template Sensor 'Standard moving direction'
[23:53:07][C][template.text_sensor:021]:   Icon: 'mdi:walk'
[23:53:07][C][template.text_sensor:021]: Template Sensor 'Standard Sports information'
[23:53:07][C][template.text_sensor:021]:   Icon: 'mdi:human-greeting'
[23:53:07][C][template.text_sensor:021]: Template Sensor 'Standard Presence information'
[23:53:07][C][template.text_sensor:021]:   Icon: 'mdi:motion-sensor'
[23:53:07][C][template.text_sensor:021]: Template Sensor 'Custom Presence of detection'
[23:53:07][C][template.text_sensor:021]:   Icon: 'mdi:signal-distance-variant'
[23:53:07][C][template.switch:076]: Template Switch 'Custom Infor output switch'
[23:53:07][C][template.switch:078]:   Icon: 'mdi:electric-switch'
[23:53:07][C][template.switch:081]:   Assumed State: YES
[23:53:07][C][template.switch:099]:   Restore Mode: restore defaults to OFF
[23:53:07][C][template.switch:060]:   Restore State: NO
[23:53:07][C][template.switch:061]:   Optimistic: NO
[23:53:07][C][template.sensor:023]: Template Sensor 'Custom Motion distance'
[23:53:07][C][template.sensor:023]:   State Class: ''
[23:53:07][C][template.sensor:023]:   Unit of Measurement: ''
[23:53:07][C][template.sensor:023]:   Accuracy Decimals: 1
[23:53:07][C][template.sensor:023]:   Icon: 'mdi:signal-distance-variant'
[23:53:07][C][template.sensor:024]:   Update Interval: 60.0s
[23:53:07][C][template.sensor:023]: Template Sensor 'Custom Static distance'
[23:53:07][C][template.sensor:023]:   State Class: ''
[23:53:07][C][template.sensor:023]:   Unit of Measurement: ''
[23:53:07][C][template.sensor:023]:   Accuracy Decimals: 1
[23:53:07][C][template.sensor:023]:   Icon: 'mdi:signal-distance-variant'
[23:53:07][C][template.sensor:024]:   Update Interval: 60.0s
[23:53:07][C][template.sensor:023]: Template Sensor 'Custom Spatial static value'
[23:53:07][C][template.sensor:023]:   State Class: ''
[23:53:07][C][template.sensor:023]:   Unit of Measurement: ''
[23:53:07][C][template.sensor:023]:   Accuracy Decimals: 1
[23:53:07][C][template.sensor:023]:   Icon: 'mdi:counter'
[23:53:07][C][template.sensor:024]:   Update Interval: 60.0s
[23:53:07][C][template.sensor:023]: Template Sensor 'Custom Spatial motion value'
[23:53:07][C][template.sensor:023]:   State Class: ''
[23:53:07][C][template.sensor:023]:   Unit of Measurement: ''
[23:53:07][C][template.sensor:023]:   Accuracy Decimals: 1
[23:53:07][C][template.sensor:023]:   Icon: 'mdi:counter'
[23:53:07][C][template.sensor:024]:   Update Interval: 60.0s
[23:53:07][C][template.sensor:023]: Template Sensor 'Custom Motion speed'
[23:53:07][C][template.sensor:023]:   State Class: ''
[23:53:07][C][template.sensor:023]:   Unit of Measurement: ''
[23:53:07][C][template.sensor:023]:   Accuracy Decimals: 1
[23:53:07][C][template.sensor:023]:   Icon: 'mdi:run-fast'
[23:53:07][C][template.sensor:024]:   Update Interval: 60.0s
[23:53:07][C][mdns:108]: mDNS:
[23:53:07][C][mdns:109]:   Hostname: ny
[23:53:07][C][ota:093]: Over-The-Air Updates:
[23:53:07][C][ota:094]:   Address: ny.local:3232
[23:53:07][C][ota:097]:   Using Password.
[23:53:07][C][api:138]: API Server:
[23:53:07][C][api:139]:   Address: ny.local:6053
[23:53:07][C][api:141]:   Using noise encryption: YES

ESPHome sensor .yaml:

esphome:
  name: ny
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3
  includes:
  - R24dvd.h

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG
  level: VERY_VERBOSE

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

ota:
  password: "**********"

wifi:
  ssid: Tunling
  password: *********

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

uart:
  id: uart_bus
  baud_rate:  115200
  rx_pin: 20
  tx_pin: 21
 
select:
  - platform: template
    name: "Standard Scene mode"
    id: scene_mode
    icon: mdi:hoop-house
    optimistic: true
    options:
      - "Living room"
      - "Area detection"
      - "Washroom"
      - "Bedroom"
    initial_option: "Living room"
    set_action:
      - logger.log:
            format: "set action option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(scene_mode).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xB9;
                  return {0x53,0x59,0x05,0x07,0x00,0x01,value,crc,0x54,0x43};

  - platform: template
    name: "Standard unmanned time"
    id: unmanned_time
    icon: mdi:timeline-clock
    optimistic: true
    options:
      - "None"
      - "10s"
      - "30s"
      - "1min"
      - "2min" 
      - "5min" 
      - "10min"
      - "30min"
      - "1hour"
    initial_option: "None"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value();
                  uint8_t crc = value + 0x37;
                  return {0x53,0x59,0x80,0x0a,0x00,0x01,value,crc,0x54,0x43};
 
  - platform: template
    name: "Custom Presence of perception boundary"
    id: custom_presence_of_perception_boundary
    optimistic: true
    options:
      - "0.5m"
      - "1.0m"
      - "1.5m"
      - "2.0m" 
      - "2.5m" 
      - "3.0m"
      - "3.5m"
      - "4.0m"
      - "4.5m"
      - "5.0m"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xBF;
                  return {0x53,0x59,0x08,0x0a,0x00,0x01,value,crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion trigger boundary"
    id: custom_motion_trigger_boundary
    optimistic: true
    options:
      - "0.5m"
      - "1.0m"
      - "1.5m"
      - "2.0m" 
      - "2.5m" 
      - "3.0m"
      - "3.5m"
      - "4.0m"
      - "4.5m"
      - "5.0m"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xC0;
                  return {0x53,0x59,0x08,0x0b,0x00,0x01,value,crc,0x54,0x43};
 
number:
  - platform: template
    id: sensitivity
    name: "Standard sensitivity"
    icon: mdi:archive-check-outline
    min_value: 0
    max_value: 3
    optimistic: false
    step: 1
    update_interval: 2s
    set_action:
      - uart.write: !lambda
                    uint8_t crc = x + 0xBA;
                    return {0x53,0x59,0x05,0x08,0x00,0x01,(uint8_t)x,crc,0x54,0x43};
 
  - platform: template
    name: "Standard Maximum detectable range of moving target"
    id: moving_target_detection_max_distance
    icon: mdi:map-marker-path
    unit_of_measurement: "cm"
    min_value: 0
    max_value: 65536
    step: 500
    set_action:
      - uart.write: !lambda
                    int h_num = (int)x >> 8;
                    int l_num = (int)x & 0xff;
                    int crc = 0xB6 + h_num + l_num;
                    return {0x53,0x59,0x07,0x01,0x00,0x02,(uint8_t)(h_num),(uint8_t)(l_num),(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Standard Maximum detectable range of stationary target"
    id: static_target_detection_max_distance
    icon: mdi:map-marker-path
    unit_of_measurement: cm
    min_value: 0
    max_value: 65536
    step: 500
    set_action:
      - uart.write: !lambda
                    int h_num = (int)x >> 8;
                    int l_num = (int)x & 0xff;
                    int crc = 0xB9 + h_num + l_num;
                    return {0x53,0x59,0x07,0x04,0x00,0x02,(uint8_t)(h_num),(uint8_t)(l_num),(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Judgment threshold exists"
    id: custom_judgment_threshold_exists
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBD + (int)x;
                    return {0x53,0x59,0x08,0x08,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion amplitude trigger threshold"
    id: custom_motion_amplitude_trigger_threshold
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBE + (int)x;
                    return {0x53,0x59,0x08,0x09,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Mode Settings"
    id: custom_mode_settings
    icon: mdi:cog
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBB + (int)x;
                    return {0x53,0x59,0x05,0x09,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Mode Settings End"
    id: custom_mode_setting_completed
    icon: mdi:cog
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBC + (int)x;
                    return {0x53,0x59,0x05,0x0a,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Custom Mode Query"
    icon: mdi:cog
    id: custom_mode_query
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0x3B + (int)x;
                    return {0x53,0x59,0x05,0x89,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion trigger time"
    id: custom_motion_trigger_time
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC4 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0c,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Movement to rest time"
    id: custom_movement_to_rest_time
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC5 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0d,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Time of entering unmanned state"
    id: custom_time_of_enter_unmanned
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC6 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0e,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
text_sensor:
- platform: custom
  lambda: |-
    auto my_custom_sensor = new MyCustomTextSensor();
    App.register_component(my_custom_sensor);
    return {my_custom_sensor->Heartbeat};
 
  text_sensors:
    - name: "Standard Heartbeat"
      icon: mdi:connection
 
- platform: template
  name: "Standard Product model"
  id: product_mode
  icon: mdi:information-outline
  on_raw_value:
    then:
      - logger.log: text_sensor on_raw_value
 
- platform: template
  name: "Standard Product ID"
  id: product_id
  icon: mdi:information-outline
 
- platform: template
  name: "Standard Hardware model"
  id: hardware_model
  icon: mdi:information-outline
 
- platform: template
  name: "Standard Firmware version"
  id: firmware_version
  icon: mdi:information-outline
 
- platform: template
  name: "Standard protocol type"
  id: protocol_type
  icon: mdi:information-outline
 
- platform: template
  name: "Standard moving direction"
  id: keep_away
  icon: mdi:walk
 
- platform: template
  name: "Standard Sports information"
  id: motion_status
  icon: mdi:human-greeting
 
- platform: template
  name: "Standard Presence information"
  id: someoneExists
  icon: "mdi:motion-sensor"
 
- platform: template
  name: "Custom Presence of detection"
  id: custom_presence_of_detection
  icon: mdi:signal-distance-variant
 
# - platform: template
#   name: "Custom Motion distance"
#   id: custom_motion_distance
 
# - platform: template
#   name: "Custom Static distance"
#   id: custom_static_distance
 
# - platform: template
#   name: "Custom Spatial static value"
#   id: custom_spatial_static_value
 
# - platform: template
#   name: "Custom Spatial motion value"
#   id: custom_spatial_motion_value
 
# - platform: template
#   name: "Custom Motion speed"
#   id: custom_motion_speed
 
 
button:
  - platform: template
    name: "Standard reset"
    id: "reset"
    icon: mdi:reload
    on_press:
      then:
        - logger.log: Button Pressed
        - uart.write: [0x53,0x59,0x01,0x02,0x00,0x01,0x0F,0xBF,0x54,0x43]
 
switch:
  - platform: template
    id: output_info_switch
    name: "Custom Infor output switch"
    icon: mdi:electric-switch
    assumed_state: true
    turn_on_action:
      - uart.write: [0x53,0x59,0x08,0x00,0x00,0x01,0x01,0xB6,0x54,0x43]
      - delay: 1s
      - lambda: !lambda |-
          id(product_mode).publish_state("");
          id(product_id).publish_state("");
          id(hardware_model).publish_state("");
          id(firmware_version).publish_state("");
          id(protocol_type).publish_state("");
    turn_off_action:
      - uart.write: [0x53,0x59,0x08,0x00,0x00,0x01,0x00,0xB5,0x54,0x43]

sensor:
- platform: custom
  lambda: |-
    auto my_custom_sensor = new UartReadLineSensor(id(uart_bus));
    App.register_component(my_custom_sensor);
    return {
      my_custom_sensor->movementSigns,
      my_custom_sensor->inited,
    };
  sensors:
    - name: "Standard body movement"
      id: movementSigns
      icon: "mdi:human-greeting-variant"
      device_class: "temperature"
      state_class: "measurement"

    - name: "Standard inited"
      id: inited
      icon: mdi:all-inclusive
 
- platform: template
  name: "Custom Motion distance"
  id: custom_motion_distance
  icon: mdi:signal-distance-variant
  on_value:
    then:
      # - logger.log: Custom Motion distance on_value
      - logger.log:
            format: "Custom Motion distance on_value : %d"
            args: ["x"]
  on_raw_value:
    then:
      - logger.log:
            format: "Custom Motion distance on_raw_value : %d"
            args: ["x"]
 
 
- platform: template
  name: "Custom Static distance"
  id: custom_static_distance
  icon: mdi:signal-distance-variant

- platform: template
  name: "Custom Spatial static value"
  id: custom_spatial_static_value
  icon: mdi:counter

- platform: template
  name: "Custom Spatial motion value"
  id: custom_spatial_motion_value
  icon: mdi:counter

- platform: template
  name: "Custom Motion speed"
  id: custom_motion_speed
  icon: mdi:run-fast

Link to the blog post as I could not post more than two links as a new forum user :stuck_out_tongue:

This code is simply crazy. All serial port operations are in the yaml source code. Compared with the ld2410b library, it is much simplified.

The time of the posted log is too short, and the feedback information of the serial port cannot be seen from it.

Same problem here, did you solve the problem?
I also can’t turn on the sensor with the lighting button

Yep! See this post:

Tried that and still same problem, Soldered the wires to ensure connection and still no com with the module. R24d does get power because it feels warm.

Hmm… weird. Are you sure you have tx/rx wired correctly?
tx - rx
rx - tx
Post your config please :slight_smile:

Yup TX to RX and RX to TX. Also tried to switch TX TX .

Someone said to try D2 D3 and again same, Can’t even turn it on, Straight back to OFF.

# part 1:
esphome:
  name: detectiepad
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3
  includes:
  - R24dvd.h

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: esp-idf

#Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG
  level: DEBUG

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

ota:
  password: "EDIT"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.1.50
    gateway: 192.168.1.11
    subnet: 255.255.255.0
    dns1: 192.168.1.11

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Xiao-Esp32 Fallback Hotspot"
    password: "EDIT"
   
# part 3:
uart:
  id: uart_bus
  baud_rate:  115200
  rx_pin: 2
  tx_pin: 3
 
select:
  - platform: template
    name: "Standard Scene mode"
    id: scene_mode
    icon: mdi:hoop-house
    optimistic: true
    options:
      - "Living room"
      - "Area detection"
      - "Washroom"
      - "Bedroom"
    initial_option: "Living room"
    set_action:
      - logger.log:
            format: "set action option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(scene_mode).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xB9;
                  return {0x53,0x59,0x05,0x07,0x00,0x01,value,crc,0x54,0x43};

  - platform: template
    name: "Standard unmanned time"
    id: unmanned_time
    icon: mdi:timeline-clock
    optimistic: true
    options:
      - "None"
      - "10s"
      - "30s"
      - "1min"
      - "2min" 
      - "5min" 
      - "10min"
      - "30min"
      - "1hour"
    initial_option: "None"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value();
                  uint8_t crc = value + 0x37;
                  return {0x53,0x59,0x80,0x0a,0x00,0x01,value,crc,0x54,0x43};
 
  - platform: template
    name: "Custom Presence of perception boundary"
    id: custom_presence_of_perception_boundary
    optimistic: true
    options:
      - "0.5m"
      - "1.0m"
      - "1.5m"
      - "2.0m" 
      - "2.5m" 
      - "3.0m"
      - "3.5m"
      - "4.0m"
      - "4.5m"
      - "5.0m"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xBF;
                  return {0x53,0x59,0x08,0x0a,0x00,0x01,value,crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion trigger boundary"
    id: custom_motion_trigger_boundary
    optimistic: true
    options:
      - "0.5m"
      - "1.0m"
      - "1.5m"
      - "2.0m" 
      - "2.5m" 
      - "3.0m"
      - "3.5m"
      - "4.0m"
      - "4.5m"
      - "5.0m"
    set_action:
      - logger.log:
            format: "Chosen option: %s"
            args: ["x.c_str()"]
      - uart.write: !lambda
                  auto index = id(unmanned_time).index_of(x);
                  uint8_t value = (uint8_t)index.value() + 1;
                  uint8_t crc = value + 0xC0;
                  return {0x53,0x59,0x08,0x0b,0x00,0x01,value,crc,0x54,0x43};
 
number:
  - platform: template
    id: sensitivity
    name: "Standard sensitivity"
    icon: mdi:archive-check-outline
    min_value: 0
    max_value: 3
    optimistic: false
    step: 1
    update_interval: 2s
    set_action:
      - uart.write: !lambda
                    uint8_t crc = x + 0xBA;
                    return {0x53,0x59,0x05,0x08,0x00,0x01,(uint8_t)x,crc,0x54,0x43};
 
  - platform: template
    name: "Standard Maximum detectable range of moving target"
    id: moving_target_detection_max_distance
    icon: mdi:map-marker-path
    unit_of_measurement: "cm"
    min_value: 0
    max_value: 65536
    step: 500
    set_action:
      - uart.write: !lambda
                    int h_num = (int)x >> 8;
                    int l_num = (int)x & 0xff;
                    int crc = 0xB6 + h_num + l_num;
                    return {0x53,0x59,0x07,0x01,0x00,0x02,(uint8_t)(h_num),(uint8_t)(l_num),(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Standard Maximum detectable range of stationary target"
    id: static_target_detection_max_distance
    icon: mdi:map-marker-path
    unit_of_measurement: cm
    min_value: 0
    max_value: 65536
    step: 500
    set_action:
      - uart.write: !lambda
                    int h_num = (int)x >> 8;
                    int l_num = (int)x & 0xff;
                    int crc = 0xB9 + h_num + l_num;
                    return {0x53,0x59,0x07,0x04,0x00,0x02,(uint8_t)(h_num),(uint8_t)(l_num),(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Judgment threshold exists"
    id: custom_judgment_threshold_exists
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBD + (int)x;
                    return {0x53,0x59,0x08,0x08,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion amplitude trigger threshold"
    id: custom_motion_amplitude_trigger_threshold
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBE + (int)x;
                    return {0x53,0x59,0x08,0x09,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Mode Settings"
    id: custom_mode_settings
    icon: mdi:cog
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBB + (int)x;
                    return {0x53,0x59,0x05,0x09,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Mode Settings End"
    id: custom_mode_setting_completed
    icon: mdi:cog
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0xBC + (int)x;
                    return {0x53,0x59,0x05,0x0a,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Custom Mode Query"
    icon: mdi:cog
    id: custom_mode_query
    min_value: 0
    max_value: 250
    step: 1
    set_action:
      - uart.write: !lambda
                    int crc = 0x3B + (int)x;
                    return {0x53,0x59,0x05,0x89,0x00,0x01,(uint8_t)x,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Motion trigger time"
    id: custom_motion_trigger_time
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC4 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0c,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Movement to rest time"
    id: custom_movement_to_rest_time
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC5 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0d,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
  - platform: template
    name: "Custom Time of entering unmanned state"
    id: custom_time_of_enter_unmanned
    icon: mdi:camera-timer
    unit_of_measurement: "ms"
    min_value: 0
    max_value: 4294967295
    step: 5000
    set_action:
      - uart.write: !lambda
                    int crc = 0xC6 + (int)x;
                    int h24_num = ((int)x >> 24) & 0xff;
                    int h16_num = ((int)x >> 16) & 0xff;
                    int h8_num = ((int)x >> 8) & 0xff;
                    int l8_num = (int)x & 0xff;
                    return {0x53,0x59,0x08,0x0e,0x00,0x04,(uint8_t)h24_num,(uint8_t)h16_num,(uint8_t)h8_num,(uint8_t)l8_num,(uint8_t)crc,0x54,0x43};
 
text_sensor:
- platform: custom
  lambda: |-
    auto my_custom_sensor = new MyCustomTextSensor();
    App.register_component(my_custom_sensor);
    return {my_custom_sensor->Heartbeat};
 
  text_sensors:
    - name: "Standard Heartbeat"
      icon: mdi:connection
 
- platform: template
  name: "Standard Product model"
  id: product_mode
  icon: mdi:information-outline
  on_raw_value:
    then:
      - logger.log: text_sensor on_raw_value
 
- platform: template
  name: "Standard Product ID"
  id: product_id
  icon: mdi:information-outline
 
- platform: template
  name: "Standard Hardware model"
  id: hardware_model
  icon: mdi:information-outline
 
- platform: template
  name: "Standard Firmware version"
  id: firmware_version
  icon: mdi:information-outline
 
- platform: template
  name: "Standard protocol type"
  id: protocol_type
  icon: mdi:information-outline
 
- platform: template
  name: "Standard moving direction"
  id: keep_away
  icon: mdi:walk
 
- platform: template
  name: "Standard Sports information"
  id: motion_status
  icon: mdi:human-greeting
 
- platform: template
  name: "Standard Presence information"
  id: someoneExists
  icon: "mdi:motion-sensor"
 
- platform: template
  name: "Custom Presence of detection"
  id: custom_presence_of_detection
  icon: mdi:signal-distance-variant
 
# - platform: template
#   name: "Custom Motion distance"
#   id: custom_motion_distance
 
# - platform: template
#   name: "Custom Static distance"
#   id: custom_static_distance
 
# - platform: template
#   name: "Custom Spatial static value"
#   id: custom_spatial_static_value
 
# - platform: template
#   name: "Custom Spatial motion value"
#   id: custom_spatial_motion_value
 
# - platform: template
#   name: "Custom Motion speed"
#   id: custom_motion_speed
 
 
button:
  - platform: template
    name: "Standard reset"
    id: "reset"
    icon: mdi:reload
    on_press:
      then:
        - logger.log: Button Pressed
        - uart.write: [0x53,0x59,0x01,0x02,0x00,0x01,0x0F,0xBF,0x54,0x43]
 
switch:
  - platform: template
    id: output_info_switch
    name: "Custom Infor output switch"
    icon: mdi:electric-switch
    assumed_state: true
    turn_on_action:
      - uart.write: [0x53,0x59,0x08,0x00,0x00,0x01,0x01,0xB6,0x54,0x43]
      - delay: 1s
      - lambda: !lambda |-
          id(product_mode).publish_state("");
          id(product_id).publish_state("");
          id(hardware_model).publish_state("");
          id(firmware_version).publish_state("");
          id(protocol_type).publish_state("");
    turn_off_action:
      - uart.write: [0x53,0x59,0x08,0x00,0x00,0x01,0x00,0xB5,0x54,0x43]

sensor:
- platform: custom
  lambda: |-
    auto my_custom_sensor = new UartReadLineSensor(id(uart_bus));
    App.register_component(my_custom_sensor);
    return {
      my_custom_sensor->movementSigns,
      my_custom_sensor->inited,
    };
  sensors:
    - name: "Standard body movement"
      id: movementSigns
      icon: "mdi:human-greeting-variant"
      device_class: "temperature"
      state_class: "measurement"

    - name: "Standard inited"
      id: inited
      icon: mdi:all-inclusive
 
- platform: template
  name: "Custom Motion distance"
  id: custom_motion_distance
  icon: mdi:signal-distance-variant
  on_value:
    then:
      # - logger.log: Custom Motion distance on_value
      - logger.log:
            format: "Custom Motion distance on_value : %d"
            args: ["x"]
  on_raw_value:
    then:
      - logger.log:
            format: "Custom Motion distance on_raw_value : %d"
            args: ["x"]
 
 
- platform: template
  name: "Custom Static distance"
  id: custom_static_distance
  icon: mdi:signal-distance-variant

- platform: template
  name: "Custom Spatial static value"
  id: custom_spatial_static_value
  icon: mdi:counter

- platform: template
  name: "Custom Spatial motion value"
  id: custom_spatial_motion_value
  icon: mdi:counter

- platform: template
  name: "Custom Motion speed"
  id: custom_motion_speed
  icon: mdi:run-fast

    

On install I did notice this:

Logs when turning module on with lightning button.

[17:22:09][D][switch:013]: 'Custom Infor output switch' Turning ON.
[17:22:10][D][main:339]: text_sensor on_raw_value
[17:22:10][D][text_sensor:067]: 'Standard Product model': Sending state ''
[17:22:10][D][text_sensor:067]: 'Standard Product ID': Sending state ''
[17:22:10][D][text_sensor:067]: 'Standard Hardware model': Sending state ''
[17:22:10][D][text_sensor:067]: 'Standard Firmware version': Sending state ''
[17:22:10][D][text_sensor:067]: 'Standard protocol type': Sending state ''

Did you get anywhere with this? I am having the same issues, perhaps it is something with the xiao chips? I am not having any luck getting uart data from a ld2410b either…

No, still same problem

Not sure this is the same problem, I had my modules initially working for a few minutes then they stopped and I tried everything.
Found a recent update on the seeedstudio tutorial saying:
“As of June 1, 2023 troubleshooting has revealed that if you set any value or change any scene in the dashboard of ESPHome, there is a possibility that the radar will go down, we would like to inform you that the engineers of Seeed Studio are currently working intensively to troubleshoot the problem, until then, please do not adjust the values of the dashboard at will !!!”

I have the same issue here, I bought 10 sensors and already tried 3 of them, before hooking to the ESP32C3 I did try them with USB-UART bridge to make sure they were working with the PC. One out of the 3 trials I got the sensor working for a while then it stopped. After that I tried it with PC and it just didn’t work anymore. I seriously doube the HW of the sensor design.

There was an issue with the SW from Seeed Studio for the ESP32C3 that caused the mmWave sensor to go in a blocked state. They have provided an SW update, but I thing it does not “unlock” devices that do not respond any longer. See also: Seeed Studio XIAO ESP32C3 Wiki in the “Getting started” section.