Add new configuration for ESP32-H2C camera with web server and sensor support
This commit is contained in:
94
Cameras/esp32-h2c-camera.yml
Normal file
94
Cameras/esp32-h2c-camera.yml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
substitutions:
|
||||||
|
device_name: esp32-h2c-camera
|
||||||
|
friendly_name: "3D Printer Camera"
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: ${device_name}
|
||||||
|
friendly_name: ${friendly_name}
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-s3-devkitc-1
|
||||||
|
framework:
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
# Required for ESP32 camera buffering.
|
||||||
|
psram:
|
||||||
|
|
||||||
|
logger:
|
||||||
|
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: !secret api_encryption_key
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: !secret ota_password
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wifi_iot_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
ap:
|
||||||
|
ssid: "${friendly_name} Fallback"
|
||||||
|
password: !secret fallback_password
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
i2c:
|
||||||
|
- id: camera_i2c
|
||||||
|
sda: GPIO8
|
||||||
|
scl: GPIO9
|
||||||
|
scan: false
|
||||||
|
|
||||||
|
esp32_camera:
|
||||||
|
name: "${friendly_name}"
|
||||||
|
external_clock:
|
||||||
|
pin: GPIO5
|
||||||
|
frequency: 20MHz
|
||||||
|
i2c_id: camera_i2c
|
||||||
|
data_pins: [GPIO16, GPIO18, GPIO21, GPIO17, GPIO14, GPIO7, GPIO6, GPIO4]
|
||||||
|
vsync_pin: GPIO1
|
||||||
|
href_pin: GPIO2
|
||||||
|
pixel_clock_pin: GPIO15
|
||||||
|
|
||||||
|
# Start conservative for reliability; increase later if stable.
|
||||||
|
resolution: 640x480
|
||||||
|
jpeg_quality: 12
|
||||||
|
max_framerate: 10 fps
|
||||||
|
idle_framerate: 0.2 fps
|
||||||
|
frame_buffer_count: 1
|
||||||
|
|
||||||
|
# Common orientation defaults for this module.
|
||||||
|
vertical_flip: false
|
||||||
|
horizontal_mirror: false
|
||||||
|
brightness: 1
|
||||||
|
|
||||||
|
# Camera endpoints:
|
||||||
|
# Stream: http://<ip>:8080
|
||||||
|
# Snapshot: http://<ip>:8081
|
||||||
|
esp32_camera_web_server:
|
||||||
|
- port: 8080
|
||||||
|
mode: stream
|
||||||
|
- port: 8081
|
||||||
|
mode: snapshot
|
||||||
|
|
||||||
|
switch:
|
||||||
|
# DFRobot board IR illumination control pin.
|
||||||
|
- platform: gpio
|
||||||
|
name: "${friendly_name} IR LED"
|
||||||
|
pin: GPIO47
|
||||||
|
restore_mode: ALWAYS_OFF
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: "${friendly_name} WiFi Signal"
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
|
- platform: uptime
|
||||||
|
name: "${friendly_name} Uptime"
|
||||||
|
|
||||||
|
button:
|
||||||
|
- platform: restart
|
||||||
|
name: "${friendly_name} Restart"
|
||||||
Reference in New Issue
Block a user