ajout fichiers de config d'exemple

This commit is contained in:
OniriCorpe 2023-11-25 21:07:14 +01:00
parent 7bfb461889
commit 9f9d3fadd5
3 changed files with 161 additions and 0 deletions

View file

@ -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

View file

@ -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"

View file

@ -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: