Advertisement
razvanu

HLK-LD2410C and ESP32-C3 super mini

Mar 14th, 2025 (edited)
282
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.62 KB | Source Code | 0 0
  1. esphome:
  2.   name: esphome-web-5ffecc
  3.   friendly_name: ESPHome Web 5ffecc
  4.   min_version: 2024.11.0
  5.   name_add_mac_suffix: false
  6.  
  7. esp32:
  8.   board: esp32-c3-devkitm-1
  9.   framework:
  10.     type: arduino
  11.  
  12. # Enable logging
  13. logger:
  14. # Enable Home Assistant API
  15. api:
  16.   encryption:
  17.     key: "anEmi+p54nf3jU21Eko8oxdQwiuXqTiBkW56EyaKcDw="
  18.  
  19. ota:
  20.   - platform: esphome
  21.  
  22. wifi:
  23.   ssid: !secret wifi_ssid
  24.   password: !secret wifi_password
  25.  
  26.   # Enable fallback hotspot (captive portal) in case wifi connection fails
  27.   ap:
  28.     ssid: "Ps1 Fallback Hotspot"
  29.    
  30. captive_portal:
  31. # ---------------------------------------------------------------------------------
  32.  
  33. light:
  34.   - platform: binary
  35.     name: "Blue Status Light"
  36.     output: light_output
  37.     id: led_light
  38.     restore_mode: ALWAYS_OFF
  39.  
  40. output:
  41.   - platform: gpio
  42.     pin: GPIO2
  43.     id: light_output
  44.  
  45. uart:
  46.   id: ld2410_uart
  47.   tx_pin: GPIO3 # TX_pin
  48.   rx_pin: GPIO4 # RX_pin
  49.   baud_rate: 256000
  50.   parity: NONE
  51.   stop_bits: 1
  52.  
  53. ld2410:
  54.   uart_id: ld2410_uart
  55.   throttle: 1500ms
  56.   id: ld2410_comp
  57.  
  58. select:
  59.   - platform: ld2410
  60.     distance_resolution:
  61.       name: distance resolution
  62.     baud_rate:
  63.       name: baud rate
  64.     light_function:
  65.       name: light function
  66.     out_pin_level:
  67.       name: out pin level
  68.  
  69. button:
  70.   - platform: ld2410
  71.     factory_reset:
  72.       name: "factory reset"
  73.     restart:
  74.       name: "restart"
  75.     query_params:
  76.       name: query params
  77.  
  78. number:
  79.   - platform: ld2410
  80.     timeout:
  81.       name: timeout
  82.     max_move_distance_gate:
  83.       name: max move distance gate
  84.     max_still_distance_gate:
  85.       name: max still distance gate
  86.     g0:
  87.       move_threshold:
  88.         name: g0 move threshold
  89.       still_threshold:
  90.         name: g0 still threshold
  91.     g1:
  92.       move_threshold:
  93.         name: g1 move threshold
  94.       still_threshold:
  95.         name: g1 still threshold
  96.     g2:
  97.       move_threshold:
  98.         name: g2 move threshold
  99.       still_threshold:
  100.         name: g2 still threshold
  101.     g3:
  102.       move_threshold:
  103.         name: g3 move threshold
  104.       still_threshold:
  105.         name: g3 still threshold
  106.     g4:
  107.       move_threshold:
  108.         name: g4 move threshold
  109.       still_threshold:
  110.         name: g4 still threshold
  111.     g5:
  112.       move_threshold:
  113.         name: g5 move threshold
  114.       still_threshold:
  115.         name: g5 still threshold
  116.     g6:
  117.       move_threshold:
  118.         name: g6 move threshold
  119.       still_threshold:
  120.         name: g6 still threshold
  121.     g7:
  122.       move_threshold:
  123.         name: g7 move threshold
  124.       still_threshold:
  125.         name: g7 still threshold
  126.     g8:
  127.       move_threshold:
  128.         name: g8 move threshold
  129.       still_threshold:
  130.         name: g8 still threshold
  131.     light_threshold:
  132.       name: light threshold
  133.  
  134. text_sensor:
  135.   - platform: ld2410
  136.     version:
  137.       name: "presenece sensor version"
  138.     mac_address:
  139.       name: "presenece sensor mac address"
  140.  
  141. switch:
  142.   - platform: ld2410
  143.     engineering_mode:
  144.       name: "engineering mode"
  145.     bluetooth:
  146.       name: control Bluetooth
  147.  
  148. sensor:
  149.   - platform: internal_temperature
  150.     name: "Internal Temperature"
  151.  
  152.   - platform: ld2410
  153.     moving_distance:
  154.       name: "Moving distance (cm)"
  155.     still_distance:
  156.       name: "Still Distance (cm)"
  157.     moving_energy:
  158.       name: "Move Energy (%)"
  159.     still_energy:
  160.       name: "Still Energy (%)"
  161.     detection_distance:
  162.       name: "Distance Detection (cm)"
  163.     g0:
  164.       move_energy:
  165.         name: g0 move energy
  166.       still_energy:
  167.         name: g0 still energy
  168.     g1:
  169.       move_energy:
  170.         name: g1 move energy
  171.       still_energy:
  172.         name: g1 still energy
  173.     g2:
  174.       move_energy:
  175.         name: g2 move energy
  176.       still_energy:
  177.         name: g2 still energy
  178.     g3:
  179.       move_energy:
  180.         name: g3 move energy
  181.       still_energy:
  182.         name: g3 still energy
  183.     g4:
  184.       move_energy:
  185.         name: g4 move energy
  186.       still_energy:
  187.         name: g4 still energy
  188.     g5:
  189.       move_energy:
  190.         name: g5 move energy
  191.       still_energy:
  192.         name: g5 still energy
  193.     g6:
  194.       move_energy:
  195.         name: g6 move energy
  196.       still_energy:
  197.         name: g6 still energy
  198.     g7:
  199.       move_energy:
  200.         name: g7 move energy
  201.       still_energy:
  202.         name: g7 still energy
  203.     g8:
  204.       move_energy:
  205.         name: g8 move energy
  206.       still_energy:
  207.         name: g8 still energy
  208.     light:
  209.       name: light
  210.  
  211. binary_sensor:
  212.   - platform: ld2410
  213.     has_target:
  214.       name: Presence
  215.     has_moving_target:
  216.       name: Moving Target
  217.     has_still_target:
  218.       name: Still Target
  219.  
Advertisement
Comments
  • razvanu
    43 days
    # text 0.09 KB | 0 0
    1. https://www.printables.com/model/767970-presence-sensor-case-esp32-c3-super-mini-ld2410c-r
Add Comment
Please, Sign In to add comment
Advertisement