Advertisement
lacrima08

ld2410

Dec 5th, 2023 (edited)
840
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. esphome:
  2. name: presence-2
  3. friendly_name: Presence 2
  4. platformio_options:
  5. board_build.extra_flags:
  6. - "-DARDUINO_USB_CDC_ON_BOOT=0"
  7.  
  8. esp32:
  9. board: lolin_s2_mini
  10. framework:
  11. type: arduino
  12.  
  13. # Enable logging
  14. logger:
  15.  
  16. # Enable Home Assistant API
  17. api:
  18. encryption:
  19. key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  20.  
  21. ota:
  22. password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  23.  
  24. wifi:
  25. ssid: !secret wifi_ssid
  26. password: !secret wifi_password
  27.  
  28. # Enable fallback hotspot (captive portal) in case wifi connection fails
  29. ap:
  30. ssid: "Presence-2 Fallback Hotspot"
  31. password: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  32.  
  33. captive_portal:
  34.  
  35. web_server:
  36. port: 80
  37. version: 2
  38. local: true
  39.  
  40. ld2410:
  41.  
  42. uart:
  43. tx_pin: GPIO18
  44. rx_pin: GPIO33
  45. baud_rate: 256000
  46. parity: NONE
  47. stop_bits: 1
  48.  
  49. i2c:
  50. - id: bus_a
  51. sda: 12
  52. scl: 11
  53. scan: true
  54.  
  55. sensor:
  56. - platform: ld2410
  57. light:
  58. name: light
  59. moving_distance:
  60. name: Moving Distance
  61. still_distance:
  62. name: Still Distance
  63. moving_energy:
  64. name: Moving Energy
  65. still_energy:
  66. name: Still Energy
  67. detection_distance:
  68. name: Detection Distance
  69. g0:
  70. move_energy:
  71. name: g0 move energy
  72. still_energy:
  73. name: g0 still energy
  74. g1:
  75. move_energy:
  76. name: g1 move energy
  77. still_energy:
  78. name: g1 still energy
  79. g2:
  80. move_energy:
  81. name: g2 move energy
  82. still_energy:
  83. name: g2 still energy
  84.  
  85. - platform: bh1750
  86. name: "BH1750 Illuminance"
  87. address: 0x23
  88. update_interval: 10s
  89. id: bh1750_sensor
  90.  
  91. binary_sensor:
  92. - platform: ld2410
  93. has_target:
  94. name: Presence
  95. has_moving_target:
  96. name: Moving Target
  97. has_still_target:
  98. name: Still Target
  99. out_pin_presence_status:
  100. name: out pin presence status
  101.  
  102. number:
  103. - platform: ld2410
  104. timeout:
  105. name: timeout
  106. light_threshold:
  107. name: light threshold
  108. max_move_distance_gate:
  109. name: max move distance gate
  110. max_still_distance_gate:
  111. name: max still distance gate
  112. g0:
  113. move_threshold:
  114. name: g0 move threshold
  115. still_threshold:
  116. name: g0 still threshold
  117. g1:
  118. move_threshold:
  119. name: g1 move threshold
  120. still_threshold:
  121. name: g1 still threshold
  122. g2:
  123. move_threshold:
  124. name: g2 move threshold
  125. still_threshold:
  126. name: g2 still threshold
  127.  
  128. switch:
  129. - platform: ld2410
  130. engineering_mode:
  131. name: Engineering Mode
  132. bluetooth:
  133. name: Control Bluetooth
  134.  
  135. button:
  136. - platform: ld2410
  137. factory_reset:
  138. name: "factory reset"
  139. restart:
  140. name: "restart"
  141. query_params:
  142. name: query params
  143.  
  144. select:
  145. - platform: ld2410
  146. distance_resolution:
  147. name: "distance resolution"
  148. baud_rate:
  149. name: "baud rate"
  150. light_function:
  151. name: light function
  152. out_pin_level:
  153. name: out pin level
  154.  
  155. text_sensor:
  156. - platform: ld2410
  157. version:
  158. name: "firmware version"
  159. - platform: wifi_info
  160. ip_address:
  161. name: ESP IP Address
  162. ssid:
  163. name: ESP Connected SSID
  164. bssid:
  165. name: ESP Connected BSSID
  166. mac_address:
  167. name: ESP Mac Wifi Address
  168.  
  169.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement