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
Citric
December 12, 2023, 8:27am
6
I’d like to know the answer too.
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
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
drill
September 21, 2025, 7:49am
9
I just came across the same issue, trying to include the S3 Sense into my home assistant (via ESP Home)
However, none of the above solutions seem to work.
Is there a solution to stream video and sound at the same time when opening the video in home assistant?
The main issue is usually mismatched pin mapping between the OV2640 (camera module) and the ESP32-S3. On the Seeed Studio XIAO ESP32S3 Sense, the pin mapping is not the same as ESP32-CAM modules, and ESPhome doesn’t auto-detect.
According to Seeed’s documentation and other working configs, the correct mapping should be:
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
power_down_pin: GPIO21
reset_pin: GPIO1
resolution: 640x480
jpeg_quality: 10
max_framerate: 15 fps
reset_pin should be GPIO1 (you had it commented out / wrong).
power_down_pin required on this board, GPIO21. Without it, the OV2640 often won’t initialize.
The rest of your pins (D0–D7, XCLK, PCLK, VSYNC, HREF, SCCB) look correct from the datasheet.
Try the config above and watch the ESPHome logs (esphome logs my_camera.yaml). You should see lines like I (12345) camera: Detected OV2640 camera.
If you get initialization errors, double-check that your board has the camera firmly clicked into the Sense expansion board. A loose fit can cause weird failures.
Try to lower the resolution to 320x240 at first — some boards brown out at high resolution without enough current.
Here is a XIAO ESP32-S3 sense based project that you may find interesting. VisionFlow: Smart Glasses with Camera, Mic, and Motion Sense - Share Project - PCBWay
1 Like
Citric
November 3, 2025, 10:45am
11
Recently, I had some time to research how to use the XIAO ESP32S3 Sense camera with the latest ESPHome. Here’s the complete reference code:
substitutions:
name: "xiao-esp32-s3-camera"
friendly_name: "XIAO ESP32-S3 Camera"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
name_add_mac_suffix: true
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
psram:
mode: octal
speed: 80MHz
logger:
level: VERBOSE
tx_buffer_size: 256
# Enable Home Assistant API
api:
encryption:
key: "k/QxEx306Vcg1PpiO9VXl+wOBKsVNlXVL/7y5A+FmTU="
ota:
- platform: esphome
password: "cfbe34b762b17c1e3e3e669f3a1452fe"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Xiao-Esp Fallback Hotspot"
password: "jIIBvJNnOz1V"
captive_portal:
# Example configuration entry
i2c:
- id: camera_i2c
sda: GPIO40
scl: GPIO39
esp32_camera:
external_clock:
pin: GPIO10
frequency: 20MHz
i2c_id: camera_i2c
data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
vsync_pin: GPIO38
href_pin: GPIO47
pixel_clock_pin: GPIO13
name: My Camera
1 Like
EnesA20
November 6, 2025, 8:46am
12
This works for mee very well, the speed is good and the quality is very stable.
esphome:
name: esp32s3
platformio_options:
build_flags: -DBOARD_HAS_PSRAM
board_build.arduino.memory_type: qio_opi
board_build.f_flash: 80000000L
board_build.flash_mode: qio
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# PSRAM expliciet aanzetten in octal 80 MHz
psram:
mode: octal
speed: 80MHz
# Logging inschakelen
logger:
# Home Assistant‑API inschakelen
api:
# Over‑the‑air‑update inschakelen
ota:
# Wi‑Fi‑configuratie
wifi:
power_save_mode: none
ssid: !secret wifi_ssid
password: !secret wifi_password
# Fallback hotspot activeren als de wifi‑verbinding faalt
ap:
ssid: "Esp32-S3-Cam Fallback Hotspot"
password: "BfnntuzN9G3t"
# Captive portal configuratie
captive_portal:
i2c:
- id: camera_i2c
sda: GPIO40
scl: GPIO39
frequency: 400kHz
# Configuratie voor de ESP32‑camera
esp32_camera:
id: espcam
name: My Camera
external_clock:
pin: GPIO10
frequency: 20MHz
i2c_id: camera_i2c
data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
vsync_pin: GPIO38
href_pin: GPIO47
pixel_clock_pin: GPIO13
resolution: 800x600 # SVGA
jpeg_quality: 28
frame_buffer_count: 2
# optioneel eerst testen met lagere resolutie:
# resolution: 640x480 # VGA
aec_mode: auto
aec2: true
ae_level: 2
agc_mode: auto
agc_gain_ceiling: 128x
wb_mode: auto
brightness: 1 # -2..+2
contrast: 1 # -2..+2
saturation: -1 # -2..+2, iets lager dempt ruisachtig kleurzwabberen
# Webserver voor de camera
esp32_camera_web_server:
- port: 8080
mode: stream
- port: 8081
mode: snapshot