Skip to content

esp32-cam-mb

Small an cheap cam modules for simple self build Home Assistant integrated Webcam. More information at components/esp32_camera.

Usage

Implementation

packages:
  base: !include
    file: ./base.yaml
    vars:
      project_name: "ESP.Smart-Wifi-CAM"
      project_version: "espcam32"

# Enable logging
logger:
    #level: VERBOSE
    tx_buffer_size: 256
    baud_rate: 115200

esp32:
    #board: esp32cam
    board: esp32dev
    framework:
        type: arduino

esp32_camera:
    name: ${name}
    id: ${id}
    external_clock:
        pin: GPIO0
        frequency: 8MHz #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
    resolution: 1920x1080 #800x600 #1024x768 #640x480
    jpeg_quality: 30 # max. 63
    #max_framerate: 1.0fps
    #idle_framerate: 0.2fps
    vertical_flip: true
    horizontal_mirror: false
    brightness: 2 # -2 to 2
    contrast: 1 # -2 to 2
    special_effect: none
    # exposure settings
    aec_mode: auto
    aec2: false
    ae_level: 0
    aec_value: 300
    # gain settings
    agc_mode: auto
    agc_gain_ceiling: 2x
    agc_value: 0
    # white balance setting
    wb_mode: auto

esp32_camera_web_server:
  - port: 8080
    mode: stream
  - port: 8081
    mode: snapshot

output:
    # white LED
    - platform: ledc
      channel: 2
      pin: GPIO4
      id: ${id}_espCamLED
    # red status light
    - platform: gpio
      pin:
          number: GPIO33
          inverted: True
      id: ${id}_gpio_33
light:
    - platform: monochromatic
      output: ${id}_espCamLED
      name: ${name} light
      id: ${id}_light
    - platform: binary
      output: ${id}_gpio_33
      name: ${name} led
      id: ${id}_led

switch:
    - platform: restart
      name: ${name} restart
      id: ${id}_restart