XIAO esp32s3 sense (with camera) on ESPhome

I’m trying to integrate my XIAO esp32s3 camera feed through ESPhome in to Home Assistant.

Based on the pin docs from Seeed pinout sheet

but is doesn’t work.

This is my ESPhome config:

# my camconfig
esp32_camera:
  name: My Camera
  external_clock:
    pin: GPIO10
    frequency: 20MHz
  i2c_pins:
    sda: GPIO40
    scl: GPIO39
  data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
  vsync_pin: GPIO38
  href_pin: GPIO47
  pixel_clock_pin: GPIO13
  # reset_pin: GPIO48
  resolution: 640x480
  jpeg_quality: 10

Any idea how to get this to work?

Not sure if you have figured this out yet, but I have it working with esphome with the following yaml:

esphome:
  name: #####
  friendly_name: #####
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32s3
    board_build.extra_flags:
    - "-DARDUINO_HW_CDC_ON_BOOT=0"

i2c:
  sda: GPIO40
  scl: GPIO39
  scan: True

esp32:
  board: seeed_xiao_esp32s3
  variant: esp32s3
  framework:
    type: arduino
    version: latest
    platform_version: 6.3.2

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

esp32_camera:
  name: Lounge Camera
  external_clock:
    pin: GPIO10
    frequency: 20MHz
  i2c_pins:
    sda: GPIO40
    scl: GPIO39
  data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
  vsync_pin: GPIO38
  href_pin: GPIO47
  pixel_clock_pin: GPIO13
  resolution: 640x480
2 Likes

install works, but I cant get a picture or video in Home Assistant in the Generic Camera component.
What should the settings look like?
TCP/UDP/Multicast/HTTP?
Basic or Digest authentication?
is SSL needed/supported?

Also rtsp://192.168.178.75:8080 doesn’t work in VLC (rtsp://camtest.local:8080)

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

the web server code is included, so you may access through HTTP://IP:8080

Hello !
Do you know if we could configure the microphone with esphome to get sound from Home Assistant interface when we get the video stream ?

Thanks for your help

Regards

Ben

1 Like

I’d like to know the answer too. :rofl:

1 Like

You can try this code, just change wifi code .Finally I used Camera and LED successful

esphome:
  name: xiao-cam
  # friendly_name: xiao-cam

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


# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "Fabc3YZ2bYG7x8WhupncrCMPqZuPMwxyeCPsgrbQIAI="

ota:
  password: "412c844a7b10765fcd89954e7587e5af"

wifi:
  ssid: "J09 502"
  password: "qwertyuiop111"
  # use_address: elkontrol1
  # use_address: elkontrol1.local

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Xiao Fallback Hotspot1"
    password: "YpeK5OYS4Xej"



captive_portal:
# Example configuration entry
external_components:
  - source:
      type: git
      url: https://github.com/MichaKersloot/esphome_custom_components
    components: [ esp32_camera ]

esp32_camera:
  external_clock:
    pin: GPIO10
    frequency: 20MHz
  i2c_pins:
    sda: GPIO40
    scl: GPIO39
  data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
  vsync_pin: GPIO38
  href_pin: GPIO47
  pixel_clock_pin: GPIO13

  # Image settings
  name: My Camera
  # ...

switch:
  - platform: gpio
    name: "User_led1"
    pin: 21


1 Like

how are you able to use GPIO40 and GPIO39 twice in this config. doesnt seem like it works.
however below worked for me. a combo of a few of these :wink:


esphome:
  name: xiao-cam
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32s3
    board_build.extra_flags:
    - "-DARDUINO_HW_CDC_ON_BOOT=0"

esp32:
  board: seeed_xiao_esp32s3
  variant: esp32s3
  framework:
    type: arduino
    version: latest
    platform_version: 6.3.2

# Enable logging
logger:
  level: VERBOSE
  tx_buffer_size: 256

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

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

  manual_ip:
    static_ip: 
    gateway: 
    subnet: 
    dns1: 
    dns2: 8.8.8.8
ota:
  - platform: esphome
    password: ""

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

esp32_camera:
  external_clock:
    pin: GPIO10
    frequency: 20MHz
  i2c_pins:
    sda: GPIO40
    scl: GPIO39
  data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
  vsync_pin: GPIO38
  href_pin: GPIO47
  pixel_clock_pin: GPIO13

  # Image settings
  name: My Camera
switch:
  - platform: gpio
    name: "User_led1"
    pin: 21

output:
# white LED
  - platform: ledc
    channel: 2
    pin: GPIO4
    id: espcam
# red status light
  - platform: gpio
    pin:
      number: GPIO33
      inverted: True
    id: gpio_33
light:
  - platform: monochromatic
    output: espcam
    name: esp-cam light
  - platform: binary
    output: gpio_33
    name: esp-cam led