ESP32 Cam - working!

Most likely but we are not able to help because you don’t provide the bare minimum information (yaml, logs) necessary to get help.

Sure about that? Did you do a deep dive into www.esphome.io yet?

what do you mean by deep dive exactly? I’ve searched for cam/camera… i’m not sure what i’m supposed to be searching for if not for either of those terms and there are only 2 pages dedicated to those, one for setting up the config to consider the pins of the cam and the other being the webserver aspect.

I didn’t post all my yamls as the question wasn’t relating to a config i’m trying and is failing, it is about the fact that I can’t work out how I am supposed to integrate it. But thanks for the passive aggressive reply.

And did you bother to read even the first sentence of this 2 pages?

The esp32_camera component allows you to use ESP32-based camera boards in ESPHome that directly integrate into Home Assistant through the native API.

The esp32_camera_web_server component allows you to use expose web server of ESP32-based camera boards in ESPHome that directly can be integrated into external surveillance or PVR software.

right, do you think i understand exactly what that means? I mean i wouldn’t have asked here if it made sense to me, would I??
Yes i read that… it says it “directly integrates” but how?! There doesn’t appear to be any aspect of integration other than i have a device in HA now which says it has a camera which (as I said before) “Idle” but i cannot see any way of actually accessing this camera within HA. If i click on the sensor itself it doesn’t show anything and that is , what i assume, is where I should be able to at least test it.

this unhelpful attitude is exactly why HA has such a reputation of being full of elitest know-it-alls.

1 Like

In HA add a picture glances card and add your camera to the camera entity field.

1 Like

directly integrate into Home Assistant through the native API.

Some more useful links for your deep dive into the esphome docs :wink:

And some think this is a helpdesk :wink:

Actually 9 out of 10 people are totally capable of asking a proper question including yaml and logs which typically will be answered very quickly.
On the other hand some people think asking a question is “art”, don’t RTFM or even bother to read this short thread how to as a good question:

If you still have troublesome experience you might wanna try to post some hard facts (yaml, logs) :bulb:

this is a web forum. it is literally designed for asking and answering questions as well as discussing things. don’t be such an obnoxious dick. I already told you that the question I asked didn’t even nessesitate posting logs or yaml files. Not sure why you fail to grasp that point. Maybe you’re just doubling down on that point to be more smug and elitest?
you are absolutely the sort of person on here which gives HA a bad name and puts off people trying to learn the intricacies of all of these systems.
I’m lucky in that I’m very technically minded, but in no way a dev, but I feel sorry for people such as my old father who is trying to stumble his way around getting HA setup with the likes of you giving responses like you do.

merry xmas.

1 Like

thankyou, I worked out in the end in as much as it seems having the web server configured seems to stop the HA integration from working and using the glances card works from that point.

Welcome. I had this in mind actually (and about 5 other reasons) but I didn’t want to play ping pong and poke in the dark. If you would have presented your yaml & logs this thing would have probably been solved in minutes (not hours :wink:). Let’s hope you learned some intrinsics how to ask better questions for the future :rocket:

By any chance you father is born '53 and you are son of @ilioSS53 ? If so please teach your father how to use code tags :laughing:

The camera was working from the time I setup it up (close to haf a year ago). Now, if I unplug the power, it fail to setup. If I am lucky, it will work if I reinstall, but I am not having such luck.

I have tried numerous fixes ranging from deleting from HA, changing GPIO pins, several reinstalls, and changing the hostname with no such luck. The camera part isn’t working but the pir sensor does. I have another new esp32 cam I have tried to setup and that is also failing to setup. Can someone suggest what else I can try or look at my config and see if there’s something missing or not right? I am out of ideas of what to do from here.

HA: 2021.12.8
Supervisor: 2021.12.2
HOST: 7.1

Error:

INFO Reading configuration /config/esphome/security-genkan.yaml...
INFO Starting log output from 192.168.1.94 using esphome API
INFO Successfully connected to 192.168.1.94
[11:35:33][I][app:102]: ESPHome version 2021.12.3 compiled on Jan 9 2022, 11:30:53
[11:35:34][C][wifi:488]: WiFi:
[11:35:34][C][wifi:350]: Local MAC: 10:87:1C:62:WJ:45
[11:35:34][C][wifi:351]: SSID: [redacted]
[11:35:34][C][wifi:352]: IP Address: 192.168.1.94
[11:35:34][C][wifi:354]: BSSID: [redacted]
[11:35:34][C][wifi:355]: Hostname: 'security-genkan'
[11:35:34][C][wifi:357]: Signal strength: -69 dB ▂▄▆█
[11:35:34][C][wifi:361]: Channel: 6
[11:35:34][C][wifi:363]: Gateway: 192.168.1.1
[11:35:34][C][logger:233]: Logger:
[11:35:34][C][logger:234]: Level: DEBUG
[11:35:34][C][gpio.output:010]: GPIO Binary Output:
[11:35:34][C][gpio.output:011]: Pin: GPIO12
[11:35:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'motion security-genkan occupancy'
[11:35:34][C][gpio.binary_sensor:015]: Device Class: 'motion'
[11:35:34][C][gpio.binary_sensor:016]: Pin: GPIO14
[11:35:34][C][light:098]: Light 'security-genkan light'
[11:35:34][C][esp32_camera:046]: ESP32 Camera:
[11:35:34][C][esp32_camera:047]: Name: security-genkan
[11:35:34][C][esp32_camera:050]: Board Has PSRAM: YES
[11:35:34][C][esp32_camera:057]: External Clock: Pin:13 Frequency:20000000
[11:35:34][C][esp32_camera:077]: Resolution: 640x480 (VGA)
[11:35:34][E][esp32_camera:096]: Setup Failed: ERROR
[11:35:34][C][captive_portal:144]: Captive Portal:
[11:35:34][C][ota:082]: Over-The-Air Updates:
[11:35:34][C][ota:083]: Address: 192.168.1.94:3232
[11:35:34][C][api:134]: API Server:
[11:35:34][C][wifi_signal.sensor:009]: WiFi Signal 'security-genkan WiFi Signal'
[11:35:34][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
[11:35:34][C][mdns:084]: mDNS:
[11:35:34][C][mdns:085]: Hostname: security-genkan

security-genkan.yaml

substitutions:
  name: security-genkan
  platform: ESP32
  board: esp-wrover-kit # esp32dev

esphome:
  name: $name
  platform: $platform
  board: $board

wifi:
  ssid: !secret ssid_1
  password: !secret ssid_pass
  fast_connect : true
  power_save_mode: none
  manual_ip:
    static_ip: 192.168.1.94
    subnet: 255.255.255.0
    gateway: 192.168.1.1

# Fallback portal 
captive_portal:
# Logging
logger:
# Uncomment this if you use Home Assistant
api:
  password: !secret ota_pass
ota:
  password: !secret ota_pass

esp32_camera:
  name: $name
  external_clock:
    pin: GPIO13 # or GPIO3 GPIO13
    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

# Image settings
  max_framerate: 1 fps
  resolution: 640x480
  jpeg_quality: 20
  contrast: 2
  saturation: 2

output:
  - platform: gpio
    pin: GPIO12
    id: gpio_12
    
light:
  - platform: binary
    output: gpio_12
    name: $name light

# Sensors
sensor:
  - platform: wifi_signal
    name: '$name WiFi Signal'
 
binary_sensor:
  - platform: gpio
    pin: GPIO14
    name: motion $name occupancy
    device_class: motion    

Did you already unplug and reattach the lens? In the past that worked for me when the camera setup always failed.

I have not tried it with the first one, but the second which is new in the package I had to insert the lens to the board for the initial setup didn’t work. Which leads me to believe it could be version issue either with HA or esphome??

Hi. Do you have to take off this MB from ESP32-CAM in order to use with HA? Or it can be used as it is. I mean: can you use through MB to power of ESP-CAM?

Hi,

Just to add to this thread, I got a M5Stack Timer Cam F working with the help of the yml file snippets posted by @daveyrb and @frank451, however needed to replace data pin GPIO17 with GPIO32 following the pinmap in [1]. Otherwise I ran into got invalid frame from camera! and last boot was an unhandled reset errors which were a bit cryptic for me.

Cheers,
Dinyar

[1] m5-docs

How about adding that to the esphome docs?

There are some new features in esp32cam in esphome 2022.2

Been looking trough all the post but did not find any recommendations…
Witch cam are recommended with highest resolution and decent frames?

Hello all,
trying to use this camera in an battery application to get every serveal hours an picture. Found a solution here: https://www.reddit.com/r/Esphome/comments/q14986/esp32cam_deep_sleep_occasional_wake_take_a_pic/

But I cannot compile:

Could not find file '/config/esphome/driver/rtc_io.h'. Please make sure it exists (full path: /config/esphome/driver/rtc_io.h).

It seems to be, this rtc_io is an lib whih is not available in ESPhome standard installation. Any idea from where to get and how to integrate?

Regards
Micha

https://www.google.com/search?q=rtc_io.h

Essentially every esp32 camera I have seen is based on the same chipset. Not to say that there are not manufacturing differences and the usual quality problems with cheaply put together devices with crappy capacitors, voltage regulators and the like, but the camera hardware is usually the same on all of them.