m5stack / UnitCamS3-UserDemo

UnitCamS3 user demo for hardware evaluation.
MIT License
8 stars 6 forks source link

ESPHome #9

Open moimart opened 4 months ago

moimart commented 4 months ago

Hi,

I've tried to make this module work with esphome and by reading the source code, I got the pinout properly I think. My current config is below. Am I missing something to configure?

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

psram:
  mode: octal
  speed: 80MHz

output:
- platform: ledc
  pin: GPIO14
  id: flash32

esp32_camera:
  external_clock:
    pin: GPIO11
    frequency: 20Mhz
  i2c_pins:
    sda: GPIO17
    scl: GPIO41
  data_pins:
    - GPIO6  # D0
    - GPIO15 # D1
    - GPIO16 # D2
    - GPIO7  # D3
    - GPIO5  # D4
    - GPIO10 # D5
    - GPIO4  # D6
    - GPIO13 # D7
  vsync_pin: GPIO42
  href_pin: GPIO18
  pixel_clock_pin: GPIO12
  resolution: 640x480
  jpeg_quality: 10
  name: camera-eye

esp32_camera_web_server:
  - port: 8080
    mode: stream
  - port: 8081
    mode: snapshot
jcheng09 commented 2 months ago

did you figure this out? also running into troubles configuring this camera on ESPhome. Are you using the standard OV2640 or the 5MP model?

Your config is basically identical to what I was just trying. I believe the pinout is correct for the OV2640 version but not sure certain about the board. I also thought esp32-s3-devkitc-1 was the best fit.

moimart commented 2 months ago
esphome:
  name: unitcam-1
  friendly_name: unitcam-1

esp32:
  board: esp32s3box
  framework:
    type: arduino

esp32_camera:
  external_clock:
    pin: GPIO11
    frequency: 20Mhz
  i2c_pins:
    sda: GPIO17
    scl: GPIO41
  data_pins:
    - GPIO6  # D0
    - GPIO15 # D1
    - GPIO16 # D2
    - GPIO7  # D3
    - GPIO5  # D4
    - GPIO10 # D5
    - GPIO4  # D6
    - GPIO13 # D7
  vsync_pin: GPIO42
  href_pin: GPIO18
  pixel_clock_pin: GPIO12
  resolution: 1600X1200
  jpeg_quality: 10
  max_framerate: 10 fps
  aec_mode: auto
  agc_mode: auto
  wb_mode: auto
  ae_level: 2
  contrast: 2
  saturation: -1
  brightness: 2
  name: camera-eye

esp32_camera_web_server:
  - port: 8081
    mode: snapshot

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "YOUR_KEY_HERE"

ota:
  - platform: esphome
    password: "A_PASSWORD_HERE"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Unitcam-1 Fallback Hotspot"
    password: "A_PASSWORD_HERE"

captive_portal:
moimart commented 2 months ago

works like a charm

jcheng09 commented 2 months ago

Thanks! this is for the OV2640 model?

moimart commented 2 months ago

Yes. It is.