I’m new in Home Assistant environment and I’m having issues to add an ESP32-CAM to my environement.
I’m on it for almost 6h and I really don’t understand what’s going on (neither Chat GPT nor Mistral AI)…
I have installed Add-ons ESPHome Device Builder and Frigate
My ESP32-CAM is recognized in ESPHome, when I clic Visit I have something:
esphome:
name: esp32_cam
platformio_options:
board_build.f_cpu: 240000000L
esp32:
board: esp32cam
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
# OTA configuration
ota:
platform: esphome
wifi:
ssid: "XXXXXXXXXXX"
password: "YYYYYYYYY"
# Camera configuration
esp32_camera:
name: "ESP32 Camera"
external_clock:
pin: GPIO0
frequency: 20MHz
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: 640x480
jpeg_quality: 10
# Enable the web server to view the camera feed
web_server:
port: 80
# Enable the RTSP server
esp32_camera_web_server:
port: 8080
mode: stream
The RTSP is not viewable with VLC nor ffplay
I tried this in frigate.yaml
Summary
mqtt:
enabled: false
cameras:
esp32_cam: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: rtsp://192.168.1.15:554/stream # <----- The stream you want to use for detection
roles:
- detect
detect:
enabled: false # <---- disable detection until you have a working camera feed
width: 1280
height: 720
fps: 5
objects:
track:
- person
- car
zones:
front_door:
coordinates: 0,0,1,0,1,1,0,1
objects:
- person
But it refused to start, here are the logs
Summary
2025-04-16 16:38:58.630258916 [2025-04-16 18:38:58] frigate.video ERROR : esp32_cam: Unable to read frames from ffmpeg process.
2025-04-16 16:38:58.630575619 [2025-04-16 18:38:58] frigate.video ERROR : esp32_cam: Unable to read frames from ffmpeg process.
2025-04-16 16:38:58.630842249 [2025-04-16 18:38:58] frigate.video ERROR : esp32_cam: ffmpeg process is not running. exiting capture thread...
2025-04-16 16:39:04.198009095 [INFO] Starting go2rtc healthcheck service...
2025-04-16 16:39:18.397200324 [2025-04-16 18:39:18] watchdog.esp32_cam ERROR : Ffmpeg process crashed unexpectedly for esp32_cam.
2025-04-16 16:39:18.406328932 [2025-04-16 18:39:18] watchdog.esp32_cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-04-16 16:39:18.406335358 [2025-04-16 18:39:18] ffmpeg.esp32_cam.detect ERROR : [tcp @ 0x559db7be60] Connection to tcp://192.168.1.15:554?timeout=5000000 failed: Connection refused
2025-04-16 16:39:18.406339432 [2025-04-16 18:39:18] ffmpeg.esp32_cam.detect ERROR : rtsp://192.168.1.15:554/stream: Connection refused
esphome:
name: esp32_cam_1
platformio_options:
board_build.f_cpu: 240000000L
esp32:
board: esp32cam
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
# OTA configuration
ota:
platform: esphome
wifi:
ssid: "xxxxxxxxx"
password: "yyyyyyyyyy"
# Camera configuration
esp32_camera:
name: "ESP32 Camera"
external_clock:
pin: GPIO0
frequency: 20MHz
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: 640x480
jpeg_quality: 10
# Enable the web server to view the camera feed
web_server:
port: 80
# Enable the RTSP server
esp32_camera_web_server:
- port: 8080
mode: stream
- port: 8081
mode: snapshot
ESP32 is pingable on 192.168.1.15
http://192.168.1.15:8080/stream and http://192.168.1.15:8081/snapshot are unreacheable
VLC can’t read http://192.168.1.15:8080/stream
And by the way Frigate is not able to start using
frigate.yaml
mqtt:
enabled: false
cameras:
esp32cam_1: # <------ Name the camera
enabled: true
ffmpeg:
inputs:
- path: http://192.168.1.15:8080/stream # <----- The stream you want to use for detection
roles:
- detect
detect:
enabled: false # <---- disable detection until you have a working camera feed
width: 640
height: 480
fps: 5
objects:
track:
- person
- car
zones:
front_door:
coordinates: 0,0,1,0,1,1,0,1
objects:
- person
Frigate logs
2025-04-18 07:09:21.384681504 [2025-04-18 09:09:21] frigate.video ERROR : esp32cam_1: Unable to read frames from ffmpeg process.
2025-04-18 07:09:21.385233189 [2025-04-18 09:09:21] frigate.video ERROR : esp32cam_1: ffmpeg process is not running. exiting capture thread...
2025-04-18 07:09:25.592211872 [INFO] Starting go2rtc healthcheck service...
2025-04-18 07:09:41.041784349 [2025-04-18 09:09:41] watchdog.esp32cam_1 ERROR : Ffmpeg process crashed unexpectedly for esp32cam_1.
2025-04-18 07:09:41.041790831 [2025-04-18 09:09:41] watchdog.esp32cam_1 ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2025-04-18 07:09:41.041798053 [2025-04-18 09:09:41] ffmpeg.esp32cam_1.detect ERROR : [tcp @ 0x558f45c660] Connection to tcp://192.168.1.15:8080 failed: Connection refused
2025-04-18 07:09:41.041829182 [2025-04-18 09:09:41] ffmpeg.esp32cam_1.detect ERROR : http://192.168.1.15:8080/stream: Connection refused
It all depends on what you are trying to do. Some people are lured by the promise of more mega pixels. In some cases more is better, but in a lot of cases (fewer, but much) better pixels are a lot better. In particular, challenging lighting conditions (pretty much everything indoors and many things outdoors) demand better pixels. The more mega pixels sensors only work better under ideal lighting conditions, which are rare (unless you can control it exceptionally well).
Either before or after attempting to get two AI services to figure it out for you, did you or either AI think to go look at the Esphome documentation for the esp32-cam throughout any of that 6 hours of pleading with the Chatbots?
It would have taken you 5min to look at the documentation and find out that it doesnt support RTSP and it even explains how to stream it of http so you can use the feed somewhere else. It actually answers your question in the very first few sentences at the top of the page and wouldn’t have taken 5min even.
I would strongly suggest that next time you have an issue, start looking for the answer in the documentation so that you actually get an answer to begin with and it will be the correct answer. I would also suggest you not make it a habit of relying on a chatbot to do your research or let it do the critical thinking that you should be doing yourself.
Hi Jaggana, the ESPHome builder version does not provide a RTSP stream. You need to setup the go2rtc module of frigate to accept the https stream or you need to flash the esp with an rtsp software set. I howve done both. The front door is running the ESPhome module as it can take a picture very fast. The downside is that frigate needs to transcode the stream what is very processor demanding. The other cameras around my house produce a rtsp stream and do not need recoding by the grigate server. Downturn is that the can not take instand pictures ond demand by heome asssitanrt. If you find ESPhome builder software that does make an rtsp stream than please keep me posted.