projets:home-assistant:aquaponie:sat-composteur
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| projets:home-assistant:aquaponie:sat-composteur [24/05/2025 22:44 ] – créée Oliver Watté | projets:home-assistant:aquaponie:sat-composteur [24/05/2025 23:07 ] (Version actuelle) – [Hardware] Oliver Watté | ||
|---|---|---|---|
| Ligne 4: | Ligne 4: | ||
| surveiller la température du compost. | surveiller la température du compost. | ||
| + | |||
| + | |||
| + | ===== 🌡️ Plages de température typiques dans un composteur ===== | ||
| + | |||
| + | ^ Phase ^ Température | ||
| + | | 💤 Phase mésophile | ||
| + | | 🔥 Phase thermophile | ||
| + | | 🔻 Refroidissement | ||
| + | | 🧊 Trop froid | < 10 °C | ||
| + | | 🧨 Trop chaud | > 70 °C | ||
| + | |||
| ===== Hardware ===== | ===== Hardware ===== | ||
| * micro-contrôleur : ESP32C3 de chez Seeed ('' | * micro-contrôleur : ESP32C3 de chez Seeed ('' | ||
| - | * 2 sondes de température DS18B20 | + | * 2 [[projets: |
| + | {{ : | ||
| ===== Yaml ESPHome ==== | ===== Yaml ESPHome ==== | ||
| + | |||
| + | |||
| + | <file yaml composteur.yaml > | ||
| + | |||
| + | substitutions: | ||
| + | devicename: composteur | ||
| + | friendly_devicename: | ||
| + | |||
| + | esphome: | ||
| + | name: ${devicename} | ||
| + | friendly_name: | ||
| + | |||
| + | esp32: | ||
| + | variant: ESP32C3 | ||
| + | board: seeed_xiao_esp32c3 | ||
| + | framework: | ||
| + | type: arduino | ||
| + | |||
| + | # Enable logging | ||
| + | logger: | ||
| + | # level: VERY_VERBOSE | ||
| + | |||
| + | # Enable Home Assistant API | ||
| + | api: | ||
| + | encryption: | ||
| + | key: " | ||
| + | |||
| + | ota: | ||
| + | - platform: esphome | ||
| + | password: " | ||
| + | |||
| + | wifi: | ||
| + | ssid: !secret wifi_ssid | ||
| + | password: !secret wifi_password | ||
| + | |||
| + | # Enable fallback hotspot (captive portal) in case wifi connection fails | ||
| + | ap: | ||
| + | ssid: " | ||
| + | password: " | ||
| + | |||
| + | captive_portal: | ||
| + | |||
| + | one_wire: | ||
| + | # D6 | ||
| + | - platform: gpio | ||
| + | pin: GPIO21 | ||
| + | id: bus_ds18b20_1 | ||
| + | |||
| + | # D7 | ||
| + | - platform: gpio | ||
| + | pin: GPIO20 | ||
| + | id: bus_ds18b20_2 | ||
| + | |||
| + | sensor: | ||
| + | - platform: dallas_temp | ||
| + | one_wire_id: | ||
| + | name: " | ||
| + | resolution: 12 | ||
| + | update_interval: | ||
| + | |||
| + | - platform: dallas_temp | ||
| + | one_wire_id: | ||
| + | name: " | ||
| + | resolution: 12 | ||
| + | update_interval: | ||
| + | |||
| + | - platform: wifi_signal | ||
| + | name: " | ||
| + | update_interval: | ||
| + | |||
| + | - platform: uptime | ||
| + | name: " | ||
| + | id: ${devicename}_uptime_sensor | ||
| + | update_interval: | ||
| + | on_raw_value: | ||
| + | then: | ||
| + | - text_sensor.template.publish: | ||
| + | id: ${devicename}_uptime_human | ||
| + | state: !lambda |- | ||
| + | int seconds = round(id(${devicename}_uptime_sensor).raw_state); | ||
| + | int days = seconds / (24 * 3600); | ||
| + | seconds = seconds % (24 * 3600); | ||
| + | int hours = seconds / 3600; | ||
| + | seconds = seconds % 3600; | ||
| + | int minutes = seconds / 60; | ||
| + | seconds = seconds % 60; | ||
| + | return ( | ||
| + | (days ? String(days) + "j " : "" | ||
| + | (hours ? String(hours) + "h " : "" | ||
| + | (minutes ? String(minutes) + "m " : "" | ||
| + | (String(seconds) + " | ||
| + | ).c_str(); | ||
| + | |||
| + | text_sensor: | ||
| + | - platform: wifi_info | ||
| + | ip_address: | ||
| + | name: " | ||
| + | id: ${devicename}_ip_address | ||
| + | |||
| + | - platform: template | ||
| + | name: " | ||
| + | id: ${devicename}_uptime_human | ||
| + | icon: mdi: | ||
| + | |||
| + | - platform: version | ||
| + | name: " | ||
| + | id: ${devicename}_ESPHome_Version | ||
| + | | ||
| + | </ | ||
| + | |||
| + | ===== Intégration Home Assistant ==== | ||
| + | |||
| + | ==== Panneau de contrôle ==== | ||
| + | {{ : | ||
| + | |||
| + | ==== Code pour jauge température ==== | ||
| + | <file yaml jauge.yaml> | ||
| + | type: gauge | ||
| + | entity: sensor.composteur_temp_rature_1_composteur | ||
| + | min: 5 | ||
| + | max: 80 | ||
| + | severity: | ||
| + | green: 10 | ||
| + | yellow: 40 | ||
| + | red: 65 | ||
| + | needle: true | ||
| + | name: Compartiment 1 | ||
| + | |||
| + | </ | ||
| + | |||
| + | ==== Code pour courbes de températures ==== | ||
| + | <file yaml courbes.yaml> | ||
| + | chart_type: line | ||
| + | period: 5minute | ||
| + | type: statistics-graph | ||
| + | entities: | ||
| + | - sensor.composteur_temp_rature_1_composteur | ||
| + | - sensor.composteur_temp_rature_2_composteur | ||
| + | stat_types: | ||
| + | - mean | ||
| + | - min | ||
| + | - max | ||
| + | </ | ||
| + | |||
projets/home-assistant/aquaponie/sat-composteur.1748126655.txt.gz · Dernière modification : 24/05/2025 22:44 de Oliver Watté