From 3adfa293cd2f3106a1371b8a7d9007a8c6e7d3dd Mon Sep 17 00:00:00 2001 From: Hubert Cornet Date: Sat, 6 Jan 2024 13:19:19 +0100 Subject: [PATCH] Ajouter esp32-s2 mini + LD2401.yaml --- esp32-s2 mini + LD2401.yaml | 76 +++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 esp32-s2 mini + LD2401.yaml diff --git a/esp32-s2 mini + LD2401.yaml b/esp32-s2 mini + LD2401.yaml new file mode 100644 index 0000000..e79e60b --- /dev/null +++ b/esp32-s2 mini + LD2401.yaml @@ -0,0 +1,76 @@ +esphome: + name: detect-r-office + friendly_name: detecteur radar office + platformio_options: + board_build.extra_flags: + - "-DARDUINO_USB_CDC_ON_BOOT=0" # Override, de + +esp32: + board: lolin_s2_mini + framework: + type: arduino + +# Enable logging +logger: + +ld2410: + +# Enable Home Assistant API +api: + encryption: + key: "otdJD8ielKqLCvj4qbyhkldgv+jt6/M722HD2FCFDYk=" + +ota: + password: "e3b8366aa77dd311736576507f47ed69" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Detect-R-Office Fallback Hotspot" + password: "d7jRAr6v15MP" + +captive_portal: + +web_server: + port: 80 + +uart: + tx_pin: GPIO18 + rx_pin: GPIO33 + baud_rate: 256000 + parity: NONE + stop_bits: 1 + +sensor: + - platform: ld2410 + moving_distance: #distance cible en mouvement + name : Moving Distance + still_distance: #distance cible immobile + name: Still Distance + moving_energy: #quantité de mouvement + name: Move Energy + still_energy: #quantité d'immobilité ?? + name: Still Energy + detection_distance: #distance de détection + name: Detection Distance + +binary_sensor: + - platform: ld2410 + has_target: #Présence + name: Presence + has_moving_target: #Cible mobile + name: Moving Target + has_still_target: #Cible immobile + name: Still Target + +number: + - platform: ld2410 + timeout: #Temps pour passer le binary sensor Présence à faux + name: timeout + max_move_distance_gate: #Distance de détection du mouvemenet 2-8 + name: max move distance gate + max_still_distance_gate: #Distance de détection d'immobilité 2-8 + name: max still distance gate