Advertisement
Guest User

Sensor Esp32

a guest
Mar 24th, 2024
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.79 KB | None | 0 0
  1. esphome:
  2. name: pir-sensor
  3. friendly_name: PIR-Sensor
  4.  
  5. esp32:
  6. board: esp32dev
  7. framework:
  8. type: arduino
  9.  
  10. # Enable logging
  11. logger:
  12.  
  13. # Enable Home Assistant API
  14. #api:
  15. # encryption:
  16. # key: "XXX"
  17.  
  18. ota:
  19. password: "XXX"
  20.  
  21. wifi:
  22. ssid: !secret wifi_ssid
  23. password: !secret wifi_password
  24. power_save_mode: none
  25.  
  26. manual_ip:
  27. static_ip: 192.168.1.X
  28. gateway: 192.168.1.254
  29. subnet: 255.255.255.0
  30. dns1: 192.168.1.X
  31.  
  32. # Enable fallback hotspot (captive portal) in case wifi connection fails
  33. #ap:
  34. # ssid: "Pir-Sensor Fallback Hotspot"
  35. # password: "XXX"
  36.  
  37. #captive_portal:
  38.  
  39. #esp32_ble_tracker:
  40.  
  41. uart:
  42. id: ld2410_uart
  43. tx_pin: 17
  44. rx_pin: 16
  45. baud_rate: 256000
  46. parity: NONE
  47. stop_bits: 1
  48.  
  49. ld2410:
  50. uart_id: ld2410_uart
  51.  
  52. number:
  53. - platform: ld2410
  54. timeout:
  55. name: Timeout
  56. light_threshold:
  57. name: Light Threshold
  58. max_move_distance_gate:
  59. name: Max Move Distance Gate
  60. max_still_distance_gate:
  61. name: Max Still Distance Gate
  62. g0:
  63. move_threshold:
  64. name: g0 move threshold
  65. still_threshold:
  66. name: g0 still threshold
  67. g1:
  68. move_threshold:
  69. name: g1 move threshold
  70. still_threshold:
  71. name: g1 still threshold
  72. g2:
  73. move_threshold:
  74. name: g2 move threshold
  75. still_threshold:
  76. name: g2 still threshold
  77. g3:
  78. move_threshold:
  79. name: g3 move threshold
  80. still_threshold:
  81. name: g3 still threshold
  82. g4:
  83. move_threshold:
  84. name: g4 move threshold
  85. still_threshold:
  86. name: g4 still threshold
  87. g5:
  88. move_threshold:
  89. name: g5 move threshold
  90. still_threshold:
  91. name: g5 still threshold
  92. g6:
  93. move_threshold:
  94. name: g6 move threshold
  95. still_threshold:
  96. name: g6 still threshold
  97. g7:
  98. move_threshold:
  99. name: g7 move threshold
  100. still_threshold:
  101. name: g7 still threshold
  102. g8:
  103. move_threshold:
  104. name: g8 move threshold
  105. still_threshold:
  106. name: g8 still threshold
  107.  
  108. select:
  109. - platform: ld2410
  110. distance_resolution:
  111. name: Distance Resolution
  112. baud_rate:
  113. name: Baud Rate
  114. light_function:
  115. name: Light Function
  116. out_pin_level:
  117. name: Out Pin Level
  118.  
  119. sensor:
  120. - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
  121. name: "WiFi Signal dB"
  122. id: wifi_signal_db
  123. update_interval: 60s
  124. entity_category: "diagnostic"
  125.  
  126. - platform: copy # Reports the WiFi signal strength in %
  127. source_id: wifi_signal_db
  128. name: "WiFi Signal Percent"
  129. filters:
  130. - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  131. unit_of_measurement: "Signal %"
  132. entity_category: "diagnostic"
  133. device_class: ""
  134.  
  135. - platform: ld2410
  136. light:
  137. name: Light
  138. moving_distance:
  139. name : Moving Distance
  140. still_distance:
  141. name: Still Distance
  142. moving_energy:
  143. name: Move Energy
  144. still_energy:
  145. name: Still Energy
  146. detection_distance:
  147. name: Detection Distance
  148. g0:
  149. move_energy:
  150. name: g0 move energy
  151. still_energy:
  152. name: g0 still energy
  153. g1:
  154. move_energy:
  155. name: g1 move energy
  156. still_energy:
  157. name: g1 still energy
  158. g2:
  159. move_energy:
  160. name: g2 move energy
  161. still_energy:
  162. name: g2 still energy
  163. g3:
  164. move_energy:
  165. name: g3 move energy
  166. still_energy:
  167. name: g3 still energy
  168. g4:
  169. move_energy:
  170. name: g4 move energy
  171. still_energy:
  172. name: g4 still energy
  173. g5:
  174. move_energy:
  175. name: g5 move energy
  176. still_energy:
  177. name: g5 still energy
  178. g6:
  179. move_energy:
  180. name: g6 move energy
  181. still_energy:
  182. name: g6 still energy
  183. g7:
  184. move_energy:
  185. name: g7 move energy
  186. still_energy:
  187. name: g7 still energy
  188. g8:
  189. move_energy:
  190. name: g8 move energy
  191. still_energy:
  192. name: g8 still energy
  193.  
  194. binary_sensor:
  195. - platform: ld2410
  196. has_target:
  197. name: Presence
  198. has_moving_target:
  199. name: Moving Target
  200. has_still_target:
  201. name: Still Target
  202. out_pin_presence_status:
  203. name: Out Pin Presence Status
  204.  
  205. switch:
  206. - platform: ld2410
  207. engineering_mode:
  208. name: Engineering Mode
  209. bluetooth:
  210. name: Control Bluetooth
  211.  
  212. button:
  213. - platform: ld2410
  214. factory_reset:
  215. name: Factory Reset
  216. restart:
  217. name: Restart
  218. query_params:
  219. name: Query Params
  220.  
  221. text_sensor:
  222. - platform: ld2410
  223. version:
  224. name: Firmware Version
  225. mac_address:
  226. name: MAC
  227.  
  228. mqtt:
  229. broker: 192.168.1.X
  230. username: "XXX"
  231. password: "XXX"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement