Forked from kippesikgithub (thanks!) Added some links and info, and adjusted to my needs
LD2410B mmwave Presence & Motion detection with temperature, humidity, (lux) sensors for ~€9,- (housing: ~€6,-)
LD2410B mmwave Presence & Motion detection + ESP8266 (Wemos d1 mini) / ESP32-S2 mini Board in ESPHome for Home Assistant, Homey etc. Can be combined with temperature, humidity and lux sensor, but I don't use lux sensor here. The LD2410B can be updated to measure luminance as well (I've read somewhere)
- ESP8266 (Wemos d1 mini)(€ 2.00): https://nl.aliexpress.com/item/4001157391459.html
OR - ESP32-S2 mini (€ 2.20): https://nl.aliexpress.com/item/1005004344359250.html
- LD2410B (with Bluetooth) sensor (€ 3.50): https://a.aliexpress.com/_mqyYb5S
-
- cable for LD2410B (€ 1.50): https://nl.aliexpress.com/item/1005004971647691.html
- DHT11 digital Humidity & Temperature sensor (€ 1.00) https://nl.aliexpress.com/item/32840892862.html
- Luminance sensor KY-018 3pin (€ 0.80): https://nl.aliexpress.com/item/32820189174.html
- 3D-printed housing: https://www.thingiverse.com/thing:5631878 Price example: 6x housing+lid, white, € 35 all-in, (printics.nl)
Download this repository: https://github.com/PeterKawa/esp_motion_mmwave/archive/refs/heads/main.zip
copy the code from the downloaded file uart_read_line_sensor_ld2410v3.h
into a new file in the /config/esphome directory, using for example 'Studio Code server';
Do the same with the downloaded file esp8266-template.yaml
and/or esp32-S2-template.yaml
use the 'File editor' and upload those 2 files to /config/esphome
In HA, install the ESPhome add-on;
Extended ESPhome how-to: https://esphome.io/guides/getting_started_hassio.html
How to connect the stuff
5V <-> VCC
GND <-> GND
TX <-> RX
RX <-> TX
D7 <-> OUT
(ESPHome example code: esp8266-template.yaml)
5V <-> VCC
GND <-> GND
GPIO18 <-> RX
GPIO33 <-> TX
GPIO5 <-> OUT
(ESPHome example code: esp32-S2-template.yaml)
Connect the LD2410B cable:
Solder three wires to the DHT11:
3.3V <-> VDD
GND <-> GND
D2 <-> DATA
3V3 <-> VDD
GND <-> GND
GPIO9 <-> DATA
3V3 <-> Middle pin
GND <-> - (minus sign)
GPIO3 <-> S
Make sure you change all the !secret values, or create them in your /config/esphome/secrets.yaml
Merge (do NOT overwrite), so MERGE the example yaml code (esp8266-template.yaml
or esp32-S2-template.yaml
) to the yaml code of a new device in ESPhome. You should keep the unique device keys and password stuff;
In the end, the new device yaml should look the same as the example yaml, except from these details:
# Enable Home Assistant API
api:
encryption:
key: "KeepTheGeneratedKey"
ota:
password: "KeepOtaPassword"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "KeepDeviceNameAsSsid"
password: "KeepGeneratedPassword"
Once finished and sensor is online, you can add it to Home assistant. Often it is recognized already by the ESPHome integration
You can monitor the distance & sensitivity by temporary enabling show_target_stats
And hidden from view inside a (fake) flower pot ;-)
- iphone: https://apps.apple.com/ae/app/hlkradartool/id1638651152
- android: https://www.pgyer.com/Lq8p
- The app is in Mandarin, but it switches to English when you set your phone's language to English
https://community.home-assistant.io/t/mmwave-wars-one-sensor-module-to-rule-them-all/453260/2