Die ESP32Cam habe ich per esphome.io eingebunden. Das funktioniert auch soweit.
Nun möchte ich den Stream aber auch im esp32 Webserver (Port:80) (Komponente web_server) einbinden und nicht über den separaten espcam-webserver (Port:8080) (Komponente: esp32_camera_web_server).
Hier meine .yaml für den esp32-cam von AZDelivery:
substitutions:
hostname: cam1
esphome:
name: $hostname
friendly_name: Cam1
esp32:
board: esp32cam
# framework:
# type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "{APIKEY}"
ota:
- platform: esphome
password: "{pass_OTA}"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Cam1 Fallback Hotspot"
password: "{pass_AP}"
captive_portal:
# To have a "next url" for improv serial
web_server:
port: 80
version: 3
local: true
#Configuration
esp32_camera:
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
# Image settings
name: $hostname stream
# max_framerate: 24 fps
# idle_framerate: 0.2 fps
# resolution: SVGA
vertical_flip: false
horizontal_mirror: false
# jpeg_quality: 30
contrast: 1
brightness: 0.
saturation: 0.
esp32_camera_web_server:
- port: 8080
mode: STREAM
- port: 8081
mode: SNAPSHOT
output:
# flashlight
- platform: gpio
pin: GPIO4
id: gpio_4
# statuslight
- platform: gpio
pin:
number: GPIO33
inverted: True
id: gpio_33
light:
#flashlight
- platform: binary
output: gpio_4
name: $hostname light
id: flash
#statuslight
- platform: binary
output: gpio_33
name: $hostname Status
sensor:
- platform: wifi_signal
name: $hostname WiFi Signal
update_interval: 60s
- platform: uptime
name: $hostname Uptime
text_sensor:
- platform: wifi_info
ssid:
name: $hostname WiFi_info
switch:
- platform: restart
name: $hostname restart
binary_sensor:
- platform: status
name: $hostname status
# Bewegungssensor
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
name: "Sensore Präsenz"
device_class: motion