Skip to content

Instantly share code, notes, and snippets.

@haade-administrator
Last active February 20, 2023 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haade-administrator/3eb516ff987528c414b5bb273dc48fc3 to your computer and use it in GitHub Desktop.
Save haade-administrator/3eb516ff987528c414b5bb273dc48fc3 to your computer and use it in GitHub Desktop.
esp32-cam AI Thinker integration homeassistant esphome
substitutions:
devicename: esp-cam
friendly_name: espcam
esphome:
name: $devicename
esp32:
board: esp32cam
framework:
type: arduino
# Enable logging
logger:
# esp32_ble_tracker:
# Enable Home Assistant API
api:
reboot_timeout: 0s
encryption:
key: !secret api_key
ota:
password: !secret esp_cam_ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp-Cam Fallback Hotspot"
password: !secret esp_cam_ap_password
captive_portal:
esp32_camera:
name: $friendly_name
external_clock:
pin: GPIO0
frequency: 10MHz
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/Video settings, https://esphome.io/components/esp32_camera.html
max_framerate: 25 fps # default: 10 fps, max 60
idle_framerate: 0.2 fps # default: 0.1 fps - framerate for 'picture' in HA dashboard
resolution: 1024x768
jpeg_quality: 10
vertical_flip: False
contrast: 0 # default: 0, variable -2 to 2
brightness: 0 # default: 0, variable -2 to 2
saturation: 0 # default: 0, variable -2 to 2
# Server video/pictures, https://esphome.io/components/esp32_camera_web_server.html
esp32_camera_web_server:
- port: 8080
mode: stream
- port: 8081
mode: snapshot
time:
- platform: homeassistant
id: homeassistant_time
output:
#flashlight
- platform: gpio
pin: GPIO4
id: gpio_4
#statuslight led 33 for wifi connect
- platform: gpio
pin:
number: GPIO33
inverted: True
id: gpio_33
light:
#flashlight
- platform: binary
output: gpio_4
name: $friendly_name light
#statuslight led 33 for wifi connect
- platform: binary
output: gpio_33
name: $friendly_name wifi light state
sensor:
- platform: wifi_signal
name: $friendly_name Wifi signal
update_interval: 10s
- platform: uptime
name: $friendly_name Uptime
text_sensor:
- platform: version
name: $friendly_name ESPHome Version
- platform: wifi_info
ssid:
name: $friendly_name WiFi
switch:
- platform: restart
name: $friendly_name restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment