From cae28341fe2963a5168c42e82eff1fed53b0a704 Mon Sep 17 00:00:00 2001 From: Commander1024 Date: Fri, 29 Aug 2025 08:03:15 +0200 Subject: [PATCH] =?UTF-8?q?Added=20webserver=20image/stream.=20Added=20rep?= =?UTF-8?q?lacement=20for=20Au=C3=9Fensensor=20(with=20cam).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esphome/kamera-balkon.yaml | 114 +++++++++++++++++++++++++++++++++ esphome/kamera-wohnzimmer.yaml | 16 ++++- 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 esphome/kamera-balkon.yaml diff --git a/esphome/kamera-balkon.yaml b/esphome/kamera-balkon.yaml new file mode 100644 index 0000000..3ad3291 --- /dev/null +++ b/esphome/kamera-balkon.yaml @@ -0,0 +1,114 @@ +substitutions: + name: kamera-balkon + friendly_name: Kamera Balkon + +esphome: + name: ${name} + friendly_name: ${friendly_name} + name_add_mac_suffix: false + project: + name: sensor.camera + version: "1.0" + min_version: 2022.1.0 + +esp32: + board: esp32cam + framework: + type: arduino + +wifi: + ssid: "Voltage-legacy" + password: !secret voltage_legacy_psk + # use_address: cam-balcony.home + power_save_mode: high + fast_connect: on + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Cam Balkon Fallback Hotspot" + password: !secret fallback_psk + +captive_portal: + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: !secret apikey + +ota: + platform: esphome + password: !secret ota + +# Initialize I²C +i2c: + - id: bus_a + sda: GPIO13 + scl: GPIO14 + scan: true + - id: bus_c + sda: GPIO26 + scl: GPIO27 + +# Camera +esp32_camera: + name: ${friendly_name} + external_clock: + pin: GPIO0 + frequency: 20MHz + i2c_id: + bus_c + data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35] + vsync_pin: GPIO25 + href_pin: GPIO23 + pixel_clock_pin: GPIO22 + power_down_pin: GPIO32 + resolution: SVGA + max_framerate: 24 fps + idle_framerate: 0.2 fps + jpeg_quality: 30 + agc_mode: auto + agc_gain_ceiling: 2x + wb_mode: auto + vertical_flip: true + horizontal_mirror: true + +esp32_camera_web_server: + - port: 8080 + mode: stream + - port: 8081 + mode: snapshot + +# Temp/humidity sensors +sensor: + - platform: wifi_signal + name: "WiFi Signalstärke" + update_interval: 60s + - platform: sht3xd + i2c_id: + bus_a + temperature: + name: "Balkon Temperatur" + filters: + - offset: -4.4 + humidity: + name: "Balkon Luftfeuchtigkeit" + address: 0x44 + heater_enabled: True + update_interval: 60s + +# Flash LED +output: +- platform: ledc + pin: GPIO4 + id: flash + channel: 2 + +# Define RGB mode for LED +light: + - platform: monochromatic + id: flashlight + name: "Blitzlicht" + output: flash diff --git a/esphome/kamera-wohnzimmer.yaml b/esphome/kamera-wohnzimmer.yaml index 00afac4..429d463 100644 --- a/esphome/kamera-wohnzimmer.yaml +++ b/esphome/kamera-wohnzimmer.yaml @@ -19,7 +19,7 @@ esp32: wifi: ssid: "Voltage-legacy" password: !secret voltage_legacy_psk - use_address: ${name}.home + use_address: cam-livingroom.home power_save_mode: high fast_connect: on @@ -60,9 +60,23 @@ esp32_camera: max_framerate: 24 fps idle_framerate: 0.2 fps jpeg_quality: 30 + agc_mode: auto + agc_gain_ceiling: 2x + wb_mode: auto vertical_flip: true horizontal_mirror: true +esp32_camera_web_server: + - port: 8080 + mode: stream + - port: 8081 + mode: snapshot + +sensor: + - platform: wifi_signal + name: "WiFi Signalstärke" + update_interval: 60s + # Flash LED output: - platform: ledc