wonder if you can help please, i am trying to set up a generic esp32cam to run on esphome and display store snapshots if there is movement (either from detection from the camera or pirs running through HA,
At the moment i am totally failing to even have the esphome part working.
Would someone be able to walk me through this, please?
Well first step here is to get already ESP32-CAM works with HA ! Have you been able to falsh it successfully with ESPHome and get video of it in HA ? Then you’ll move to next step for detection !
You’ll find some threads about ESP32-CAM here that should help you and guide you to success and also ESPHome website
@Jon_Miles Please read documentation on ESPHome website as I suggested you https://esphome.io/components/esp32_camera.html as it contains all explanations to write a correct configuration file for it The file you showed is just basic setup of ESP without any components in it so for sure you camera can’t work just like that ! Basically now you add to add at your existing config file the part that declares the camera and its configuration and you should get better result then !
Once done and ESP32 reflashed, you’ll just need to add it in HA via Integration menu -> ESPHome -> indicate IP of ESP32 module and then you should be able to access the video stream in HA !
I have tried following that - and still failed, should the config replace all the information in the YAML, be added to the end? none of that is mentioned on the page…
Nope it should be added as part you have in your config file for now is just the basic to declare type of ESP, how it connects, ota capabilities but it tells nothing about what it should do or handle !! You should read the esphome website to get a better view of the whole thing
For info here is my config file for my ESP32-CAM I use on my 3D printer
esphomeyaml:
name: camera
platform: ESP32
board: esp-wrover-kit
wifi:
ssid: 'xxxxxxxx'
password: 'xxxxxx'
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.64
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
web_server:
esp32_camera:
name: 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: SXGA
jpeg_quality: 40
max_framerate: 4fps
saturation: 1
switch:
- platform: gpio
pin: GPIO4
name: "Flash"
- platform: gpio
pin: GPIO33
inverted: true
name: "Status LED"
and
esphomeyaml:
name: camera
platform: ESP32
board: esp32dev
wifi:
ssid: 'xxxxx'
password: 'xxxxxx'
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.64
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
web_server:
esp32_camera:
name: 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: SXGA
jpeg_quality: 40
max_framerate: 4fps
saturation: 1
switch:
- platform: gpio
pin: GPIO4
name: "Flash"
- platform: gpio
pin: GPIO33
inverted: true
name: "Status LED"