From 9f9d3fadd5bbca0ba4e79241628b22d774a7e715 Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Sat, 25 Nov 2023 21:07:14 +0100 Subject: [PATCH] ajout fichiers de config d'exemple --- .../config-finale.txt | 123 ++++++++++++++++++ .../index.gmi | 5 + .../premiere-config.txt | 33 +++++ 3 files changed, 161 insertions(+) create mode 100644 tech/2023-11-15_capteurs-millimetriques-esphome/config-finale.txt create mode 100644 tech/2023-11-15_capteurs-millimetriques-esphome/premiere-config.txt diff --git a/tech/2023-11-15_capteurs-millimetriques-esphome/config-finale.txt b/tech/2023-11-15_capteurs-millimetriques-esphome/config-finale.txt new file mode 100644 index 0000000..5ccb774 --- /dev/null +++ b/tech/2023-11-15_capteurs-millimetriques-esphome/config-finale.txt @@ -0,0 +1,123 @@ +esphome: + name: presence-bureau + friendly_name: Présence Bureau + platformio_options: + board_build.extra_flags: + - "-DARDUINO_USB_CDC_ON_BOOT=0" # Override, defaults to '-DARDUINO_USB_CDC_ON_BOOT=1' + +esp32: + board: lolin_s2_mini + framework: + type: arduino + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "Nc7FgnMmVURqsIDNOe9BJ500f86fXPN0ar00pgBQb5g=" + +ota: + password: "c27ed55a655306897d779dec5e642a5f" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Presence-Bureau Fallback Hotspot" + password: "WnpkIdcznbOM" + +captive_portal: + + +ld2410: + +uart: + tx_pin: GPIO18 + rx_pin: GPIO33 + baud_rate: 256000 + parity: none + stop_bits: 1 + +sensor: + - platform: ld2410 + light: + name: light + moving_distance: + name : Moving Distance + still_distance: + name: Still Distance + moving_energy: + name: Move Energy + still_energy: + name: Still Energy + detection_distance: + name: Detection Distance + +binary_sensor: + - platform: ld2410 + has_target: + name: Presence + has_moving_target: + name: Moving Target + has_still_target: + name: Still Target + +number: + - platform: ld2410 + timeout: + name: timeout + light_threshold: + name: light threshold + max_move_distance_gate: + name: max move distance gate + max_still_distance_gate: + name: max still distance gate + g0: + move_threshold: + name: g0 move threshold + still_threshold: + name: g0 still threshold + g1: + move_threshold: + name: g1 move threshold + still_threshold: + name: g1 still threshold + g2: + move_threshold: + name: g2 move threshold + still_threshold: + name: g2 still threshold + g3: + move_threshold: + name: g3 move threshold + still_threshold: + name: g3 still threshold + g4: + move_threshold: + name: g4 move threshold + still_threshold: + name: g4 still threshold + g5: + move_threshold: + name: g5 move threshold + still_threshold: + name: g5 still threshold + g6: + move_threshold: + name: g6 move threshold + still_threshold: + name: g6 still threshold + g7: + move_threshold: + name: g7 move threshold + still_threshold: + name: g7 still threshold + g8: + move_threshold: + name: g8 move threshold + still_threshold: + name: g8 still threshold \ No newline at end of file diff --git a/tech/2023-11-15_capteurs-millimetriques-esphome/index.gmi b/tech/2023-11-15_capteurs-millimetriques-esphome/index.gmi index fc9c0e8..9c04e94 100644 --- a/tech/2023-11-15_capteurs-millimetriques-esphome/index.gmi +++ b/tech/2023-11-15_capteurs-millimetriques-esphome/index.gmi @@ -42,6 +42,8 @@ Si ce n'est pas fait, installez le Dashboard ESPHome tel qu'expliqué sur le lie - Ajouter ces même lignes dans la configuration sur Home Assistant au même endroit que précédemment, cliquer sur "Save" puis la croix - Enregistrer la configuration dans votre éditeur de texte en lui donnant un nom finissant par ".yaml", tel que "capteur-bureau.yaml" +=> premiere-config.txt Votre fichier de configuration devrait ressembler à celui-ci ! + => https://youtu.be/DjN9L8Cagnw?t=389 Vous pouvez désormais visionner la vidéo des frères Poulain au chapitre "Installation de ESP Home et python" Une fois Python et ESPHome installés sur votre ordinateur et le Wemos S2 Mini branché à votre PC en maintenant le bouton "0" puis en le relanchant une fois branché, vous pouvez lancer la commande suivante (en remplaçant "capteur-bureau.yaml" par votre nom de configuration) : @@ -138,6 +140,9 @@ number: still_threshold: name: g4 still threshold ``` + +=> config-finale.txt Votre fichier de configuration devrait ressembler à celui-ci ! + - Cliquer sur les 3 points verticaux dans le rectangle de votre nouveau capteur de présence, puis sélectionner "Validate" - Si "INFO Configuration is valid!" est indiqué tout en bas, c'est que tout est bon et que vous pouvez passer à la suite ! Sinon c'est que vous avez fait une erreur dans votre configuration - Fermer la fenêtre en cliquant sur "Close" diff --git a/tech/2023-11-15_capteurs-millimetriques-esphome/premiere-config.txt b/tech/2023-11-15_capteurs-millimetriques-esphome/premiere-config.txt new file mode 100644 index 0000000..0c4347b --- /dev/null +++ b/tech/2023-11-15_capteurs-millimetriques-esphome/premiere-config.txt @@ -0,0 +1,33 @@ +esphome: + name: presence-bureau + friendly_name: Présence Bureau + platformio_options: + board_build.extra_flags: + - "-DARDUINO_USB_CDC_ON_BOOT=0" # Override, defaults to '-DARDUINO_USB_CDC_ON_BOOT=1' + +esp32: + board: lolin_s2_mini + framework: + type: arduino + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "Nc7FgnMmVURqsIDNOe9BJ500f86fXPN0ar00pgBQb5g=" + +ota: + password: "c27ed55a655306897d779dec5e642a5f" + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Presence-Bureau Fallback Hotspot" + password: "WnpkIdcznbOM" + +captive_portal: \ No newline at end of file