Skip to content

LD2410 mmWave Presence Sensor with ESPHome

Medium 45 min

LD2410 is a mmWave radar sensor that can detect human presence - even when you’re sitting completely still. Perfect for bathroom, office or other rooms where PIR sensors fail.

LD2410 mmWave overview

FeaturePIR SensormmWave (LD2410)
Movement✅ Yes✅ Yes
Stationary person❌ No✅ Yes (detects breathing)
Through glass/plastic❌ No✅ Yes
Distance measurement❌ No✅ Yes
False positivesManyFew (with tuning)
Price~$3~$7
ComponentModelPrice
mmWave sensorHiLink LD2410C (recommended)$5-8
MicrocontrollerESP32 or ESP8266 (D1 Mini)$4-7
WiresDupont jumper wires$2
USB cableMicro USB for power$3
Enclosure3D printed or bought$0-7
Total~$15-30
ModelPinsBluetoothRecommendation
LD24101.25mm (needs adapter)No⚠️ Hard to solder
LD2410B1.25mm (needs adapter)Yes⚠️ Hard to solder
LD2410C2.54mm standardYesRecommended

LD2410 mmWave to ESP32 wiring diagram

D1 Mini LD2410C
─────── ───────
3.3V ─────── VCC
GND ─────── GND
D7 (RX) ─────── TX
D8 (TX) ─────── RX
substitutions:
device_name: "ld2410-bathroom"
friendly_name: "Bathroom Presence"
esphome:
name: ${device_name}
friendly_name: ${friendly_name}
esp32:
board: esp32dev
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
baud_rate: 0 # Important! Disable serial logging
api:
encryption:
key: !secret api_encryption_key
ota:
platform: esphome
password: !secret ota_password
# UART for LD2410
uart:
id: ld2410_uart
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 256000
parity: NONE
stop_bits: 1
# LD2410 sensor
ld2410:
id: ld2410_sensor
uart_id: ld2410_uart
binary_sensor:
- platform: ld2410
has_target:
name: "${friendly_name} Presence"
device_class: occupancy
has_moving_target:
name: "${friendly_name} Movement"
device_class: motion
has_still_target:
name: "${friendly_name} Stationary"
device_class: occupancy
sensor:
- platform: ld2410
moving_distance:
name: "${friendly_name} Moving Distance"
unit_of_measurement: "cm"
still_distance:
name: "${friendly_name} Still Distance"
unit_of_measurement: "cm"
detection_distance:
name: "${friendly_name} Detection Distance"
unit_of_measurement: "cm"
moving_energy:
name: "${friendly_name} Moving Energy"
still_energy:
name: "${friendly_name} Still Energy"

Here’s the complete configuration ready to copy-paste:

substitutions:
device_name: "bathroom-presence"
friendly_name: "Bathroom"
esphome:
name: ${device_name}
friendly_name: ${friendly_name}
esp32:
board: esp32dev
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "${device_name}-AP"
password: "12345678"
captive_portal:
logger:
baud_rate: 0
api:
encryption:
key: !secret api_encryption_key
ota:
platform: esphome
password: !secret ota_password
uart:
id: ld2410_uart
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 256000
parity: NONE
stop_bits: 1
ld2410:
id: ld2410_sensor
uart_id: ld2410_uart
timeout: 5s
max_move_distance: 3m
max_still_distance: 2.25m
binary_sensor:
- platform: ld2410
has_target:
name: "${friendly_name} Presence"
device_class: occupancy
has_moving_target:
name: "${friendly_name} Movement"
device_class: motion
has_still_target:
name: "${friendly_name} Stationary"
device_class: occupancy
sensor:
- platform: ld2410
detection_distance:
name: "${friendly_name} Distance"
moving_energy:
name: "${friendly_name} Moving Energy"
internal: true
still_energy:
name: "${friendly_name} Still Energy"
internal: true
- platform: wifi_signal
name: "${friendly_name} WiFi Signal"
update_interval: 60s
switch:
- platform: ld2410
engineering_mode:
name: "${friendly_name} Engineering Mode"
internal: true
button:
- platform: restart
name: "${friendly_name} Restart"
  1. In Home Assistant, find your LD2410 device
  2. Enable the Engineering Mode switch
  3. Now you can see energy values for each gate

Rule of thumb:

  • Move threshold: Set 10-20 above what you see when room is empty
  • Still threshold: Set 5-10 above baseline
  • Lower = more sensitive (more false positives)
  • Higher = less sensitive (might miss presence)
automation:
- alias: "Bathroom light ON on presence"
trigger:
- platform: state
entity_id: binary_sensor.bathroom_presence
to: "on"
action:
- service: light.turn_on
target:
entity_id: light.bathroom
- alias: "Bathroom light OFF when empty"
trigger:
- platform: state
entity_id: binary_sensor.bathroom_presence
to: "off"
for:
seconds: 30
action:
- service: light.turn_off
target:
entity_id: light.bathroom
PlacementRecommendation
Height1.5-2m above floor
AnglePoint downward 15-30°
AvoidDirectly at windows/doors
RangeMax 6m effective range

Kommentarer