projets:home-assistant:aquaponie:sat-camera
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-camera [24/05/2025 23:40 ] – créée Oliver Watté | projets:home-assistant:aquaponie:sat-camera [25/05/2025 00:39 ] (Version actuelle) – [Hardware] Oliver Watté | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
{{ : | {{ : | ||
+ | |||
+ | |||
+ | ===== Hardware ===== | ||
+ | |||
+ | ESP32Cam TimerX : https:// | ||
+ | ===== Code yaml ESPhome ===== | ||
+ | |||
+ | <file yaml camera.yaml> | ||
+ | substitutions: | ||
+ | devicename: camera_bassin | ||
+ | friendly_devicename: | ||
+ | | ||
+ | esphome: | ||
+ | name: ${devicename} | ||
+ | friendly_name: | ||
+ | |||
+ | esp32: | ||
+ | board: esp32dev | ||
+ | framework: | ||
+ | type: arduino | ||
+ | |||
+ | # Enable logging | ||
+ | logger: | ||
+ | |||
+ | # 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: | ||
+ | | ||
+ | esp32_camera: | ||
+ | name: TimerX Camera | ||
+ | external_clock: | ||
+ | pin: GPIO27 | ||
+ | frequency: 20MHz | ||
+ | i2c_pins: | ||
+ | sda: GPIO25 | ||
+ | scl: GPIO23 | ||
+ | data_pins: [GPIO32, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19] | ||
+ | vsync_pin: GPIO22 | ||
+ | href_pin: GPIO26 | ||
+ | pixel_clock_pin: | ||
+ | # | ||
+ | resolution: 800x600 | ||
+ | jpeg_quality: | ||
+ | max_framerate: | ||
+ | idle_framerate: | ||
+ | vertical_flip: | ||
+ | horizontal_mirror: | ||
+ | |||
+ | button: | ||
+ | - platform: restart | ||
+ | name: " | ||
+ | |||
+ | sensor: | ||
+ | - 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 | ||
+ | | ||
+ | |||
+ | |||
+ | </ | ||
projets/home-assistant/aquaponie/sat-camera.1748130026.txt.gz · Dernière modification : 24/05/2025 23:40 de Oliver Watté