Hi
I bought ESP32-WROVER-DEV board which has the camera module integrated. You only need to attach actual camera. I thought that would be simpler this way, but now I cannot get it to work. The board works otherwise, but the camera setup fails. Can anyone confirm is my configuration correct or advice to correct direction?
I have used the example configuration which I think is for this board. Not 100% sure though…
esp32_camera:
external_clock:
pin: GPIO21
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO4, GPIO5, GPIO18, GPIO19, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
name: Cam
And this is what I get (after reset button):
[D][esp-idf:000]: E (551) camera: Camera probe failed with error 0xff(ERROR)
[E][esp32_camera:024]: esp_camera_init failed: ERROR
[E][component:113]: Component esp32_camera was marked as failed.
And then:
[C][logger:295]: Log Baud Rate: 115200
[C][logger:296]: Hardware UART: UART0
[C][esp32_camera:048]: ESP32 Camera:
[C][esp32_camera:049]: Name: Cam
[C][esp32_camera:050]: Internal: NO
[C][esp32_camera:052]: Data Pins: D0:4 D1:5 D2:18 D3:19 D4:36 D5:39 D6:34 D7:35
[C][esp32_camera:053]: VSYNC Pin: 25
[C][esp32_camera:054]: HREF Pin: 23
[C][esp32_camera:055]: Pixel Clock Pin: 22
[C][esp32_camera:056]: External Clock: Pin:21 Frequency:20000000
[C][esp32_camera:060]: I2C Pins: SDA:26 SCL:27
[C][esp32_camera:062]: Reset Pin: -1
[C][esp32_camera:080]: Resolution: 640x480 (VGA)
[E][esp32_camera:099]: Setup Failed: ERROR
Any help would be very much appreciated.
nickrout
(Nick Rout)
January 25, 2023, 10:38pm
2
I’m not sure if camera works with esp-idf, have you tried Arduino?
I have not. Totally newbie on this. Do you think I should go on that road? Would a separate camera module work on esp-idf, with the same board?
Just noticed this:
[C][esp32_camera:050]: Internal: NO
Do I need to change some setting so that the integrated module would be used? Or does that even mean that…
Today I have configured Arduino IDE but still no luck. Cannot get the camera working. This is the board I have:
Does anyone know can the camera work with ESPHOME? If not, what is the board I should use in Arduino IDE? I was trying to setup the “camera web server” example. What should be the camera model?
I start to think it would be easier to buy some other board with a separate camera module…
nickrout
(Nick Rout)
January 28, 2023, 3:48am
5
I wasn’t suggesting Arduino IDE, I was suggesting the Arduino framework in Esphome.
Right, I misunderstood you. I tried to change the framework only to find out that both webserver and camera code should be changed to follow the changed framework. Found that to be too much. Better to buy a board that works according to the examples.
nickrout
(Nick Rout)
January 28, 2023, 8:52pm
7
I don’t think that is so. But at least at that price you can just bin it
OzGav
(Oz Gav)
January 29, 2023, 1:16am
8
I have recently bought what looks to be the same board and I’m having the same problem. So far I have flashed it with ESPHOME and tried a bunch of combinations of configurations. I have then programmed it via the Arduino IDE and still no luck. If I flash it with any other code it seems to work fine but as soon as I try to activate the camera it fails. I’m still not sure if I simply don’t have the PIN numbers correct?
nickrout
(Nick Rout)
January 29, 2023, 1:27am
9
These things are very susceptible to dirty or poor placement of the little flat cable that joins the camera to the esp32. Unplugging, cleaning with white spirit and re seating can do wonders.
1 Like
FYI; Received the Freenove ESP32 Wrover board and it works immediately with the ESPHOME example code.
OzGav
(Oz Gav)
February 2, 2023, 3:31pm
11
Do you mean the code in your first post?
Yes. The same example can be found here: ESP32 Camera Component — ESPHome
Misiukas
(Antonio Misiukas Neto)
February 2, 2023, 3:59pm
13
I have 5 of these running smoothly with the esphome example code for over 1 year
k8n
February 2, 2023, 6:41pm
14
Make sure you use the right variant (e.g. mine work(ed) with the “Ai-Thinker” config)
However it looks like esp32cam is completely broken in latest esphome:
opened 01:07PM - 14 Dec 22 UTC
### The problem
Nach dem Update auf Current version: 2022.12.0, bekomme ich im … Log der ESP32-Cam folgenden Fehler (Log):
INFO Starting log output from esp_cam_yt.local using esphome API
INFO Successfully connected to esp_cam_yt.local
[13:57:34][I][app:102]: ESPHome version 2022.12.0 compiled on Dec 14 2022, 12:30:16
[13:57:34][C][wifi:504]: WiFi:
[13:57:34][C][wifi:362]: Local MAC: EC:62:60:76:BB:94
[13:57:34][C][wifi:363]: SSID: [redacted]
[13:57:34][C][wifi:364]: IP Address: 192.168.1.67
[13:57:34][C][wifi:366]: BSSID: [redacted]
[13:57:34][C][wifi:367]: Hostname: 'esp_cam_yt'
[13:57:34][C][wifi:369]: Signal strength: -29 dB ▂▄▆█
[13:57:34][C][wifi:373]: Channel: 13
[13:57:34][C][wifi:374]: Subnet: 255.255.255.0
[13:57:34][C][wifi:375]: Gateway: 192.168.1.2
[13:57:34][C][wifi:376]: DNS1: 192.168.1.2
[13:57:34][C][wifi:377]: DNS2: 0.0.0.0
[13:57:34][C][logger:293]: Logger:
[13:57:34][C][logger:294]: Level: DEBUG
[13:57:34][C][logger:295]: Log Baud Rate: 115200
[13:57:34][C][logger:296]: Hardware UART: UART0
[13:57:34][C][gpio.output:010]: GPIO Binary Output:
[13:57:34][C][gpio.output:011]: Pin: GPIO4
[13:57:34][C][light:104]: Light 'ESP32Cam light'
[13:57:34][C][esp32_camera:048]: ESP32 Camera:
[13:57:34][C][esp32_camera:049]: Name: esp32_cam
[13:57:34][C][esp32_camera:050]: Internal: NO
[13:57:34][C][esp32_camera:052]: Data Pins: D0:5 D1:18 D2:19 D3:21 D4:36 D5:39 D6:34 D7:35
[13:57:34][C][esp32_camera:053]: VSYNC Pin: 25
[13:57:34][C][esp32_camera:054]: HREF Pin: 23
[13:57:34][C][esp32_camera:055]: Pixel Clock Pin: 22
[13:57:34][C][esp32_camera:056]: External Clock: Pin:0 Frequency:10000000
[13:57:34][C][esp32_camera:060]: I2C Pins: SDA:26 SCL:27
[13:57:34][C][esp32_camera:062]: Reset Pin: -1
[13:57:34][C][esp32_camera:080]: Resolution: 640x480 (VGA)
**[13:57:34][E][esp32_camera:099]: Setup Failed: ESP_FAIL**
[13:57:34][C][status:034]: Status Binary Sensor 'ESP32Cam status'
[13:57:34][C][status:034]: Device Class: 'connectivity'
[13:57:34][C][psram:020]: PSRAM:
[13:57:34][C][psram:021]: Available: NO
[13:57:34][C][captive_portal:088]: Captive Portal:
[13:57:34][C][mdns:103]: mDNS:
[13:57:34][C][mdns:104]: Hostname: esp_cam_yt
[13:57:34][C][ota:093]: Over-The-Air Updates:
[13:57:34][C][ota:094]: Address: esp_cam_yt.local:3232
[13:57:34][C][ota:097]: Using Password.
[13:57:34][C][api:138]: API Server:
[13:57:34][C][api:139]: Address: esp_cam_yt.local:6053
[13:57:34][C][api:143]: Using noise encryption: NO
[13:57:34][C][wifi_signal.sensor:009]: WiFi Signal 'ESP32Cam WiFi Signal'
[13:57:34][C][wifi_signal.sensor:009]: Device Class: 'signal_strength'
[13:57:34][C][wifi_signal.sensor:009]: State Class: 'measurement'
[13:57:34][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm'
[13:57:34][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
### Which version of ESPHome has the issue?
2022.12.0
### What type of installation are you using?
Home Assistant Add-on
### Which version of Home Assistant has the issue?
Home Assistant 2022.12.5 Supervisor 2022.11.2 Operating System 9.4 Frontend 20221213.0 - latest
### What platform are you using?
ESP32
### Board
ESP-32 Cam mit MB / ESP32-CAM-MB WIFI Bluetooth-Entwicklungsboard OV2640 Kameramodul CH340G
### Component causing the issue
_No response_
### Example YAML snippet
```yaml
esphome:
name: esp_cam
platform: ESP32
board: esp32dev
wifi:
ssid: "3OG-EXT"
password: "**************"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "3OG"
password: "*************"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "***************"
ota:
password: "***************"
esp32_camera:
name: esp32_cam
external_clock:
pin: GPIO0
frequency: 10MHz
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
output:
- platform: gpio
pin: GPIO4
id: gpio_4
binary_sensor:
- platform: status
name: "ESP32Cam status"
sensor:
- platform: wifi_signal
name: "ESP32Cam WiFi Signal"
update_interval: 30s
light:
- platform: binary
output: gpio_4
name: "ESP32Cam light"
```
### Anything in the logs that might be useful for us?
```txt
INFO Reading configuration /config/esphome/test.yaml...
WARNING 'esp_cam_yt': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
WARNING GPIO0 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from esp_cam_yt.local using esphome API
INFO Successfully connected to esp_cam_yt.local
[14:00:51][I][app:102]: ESPHome version 2022.12.0 compiled on Dec 14 2022, 12:30:16
[14:00:51][C][wifi:504]: WiFi:
[14:00:51][C][wifi:362]: Local MAC: EC:62:60:76:BB:94
[14:00:51][C][wifi:363]: SSID: [redacted]
[14:00:51][C][wifi:364]: IP Address: 192.168.1.67
[14:00:51][C][wifi:366]: BSSID: [redacted]
[14:00:51][C][wifi:367]: Hostname: 'esp_cam_yt'
[14:00:51][C][wifi:369]: Signal strength: -31 dB ▂▄▆█
[14:00:51][C][wifi:373]: Channel: 13
[14:00:51][C][wifi:374]: Subnet: 255.255.255.0
[14:00:51][C][wifi:375]: Gateway: 192.168.1.2
[14:00:51][C][wifi:376]: DNS1: 192.168.1.2
[14:00:51][C][wifi:377]: DNS2: 0.0.0.0
[14:00:51][C][logger:293]: Logger:
[14:00:51][C][logger:294]: Level: DEBUG
[14:00:51][C][logger:295]: Log Baud Rate: 115200
[14:00:51][C][logger:296]: Hardware UART: UART0
[14:00:51][C][gpio.output:010]: GPIO Binary Output:
[14:00:51][C][gpio.output:011]: Pin: GPIO4
[14:00:51][C][light:104]: Light 'ESP32Cam light'
[14:00:51][C][esp32_camera:048]: ESP32 Camera:
[14:00:51][C][esp32_camera:049]: Name: esp32_cam
[14:00:51][C][esp32_camera:050]: Internal: NO
[14:00:51][C][esp32_camera:052]: Data Pins: D0:5 D1:18 D2:19 D3:21 D4:36 D5:39 D6:34 D7:35
[14:00:51][C][esp32_camera:053]: VSYNC Pin: 25
[14:00:51][C][esp32_camera:054]: HREF Pin: 23
[14:00:51][C][esp32_camera:055]: Pixel Clock Pin: 22
[14:00:51][C][esp32_camera:056]: External Clock: Pin:0 Frequency:10000000
[14:00:51][C][esp32_camera:060]: I2C Pins: SDA:26 SCL:27
[14:00:51][C][esp32_camera:062]: Reset Pin: -1
[14:00:51][C][esp32_camera:080]: Resolution: 640x480 (VGA)
[14:00:51][E][esp32_camera:099]: Setup Failed: ESP_FAIL
[14:00:52][C][status:034]: Status Binary Sensor 'ESP32Cam status'
[14:00:52][C][status:034]: Device Class: 'connectivity'
[14:00:52][C][psram:020]: PSRAM:
[14:00:52][C][psram:021]: Available: NO
[14:00:52][C][captive_portal:088]: Captive Portal:
[14:00:52][C][mdns:103]: mDNS:
[14:00:52][C][mdns:104]: Hostname: esp_cam_yt
[14:00:52][C][ota:093]: Over-The-Air Updates:
[14:00:52][C][ota:094]: Address: esp_cam_yt.local:3232
[14:00:52][C][ota:097]: Using Password.
[14:00:52][C][api:138]: API Server:
[14:00:52][C][api:139]: Address: esp_cam_yt.local:6053
[14:00:52][C][api:143]: Using noise encryption: NO
[14:00:52][C][wifi_signal.sensor:009]: WiFi Signal 'ESP32Cam WiFi Signal'
[14:00:52][C][wifi_signal.sensor:009]: Device Class: 'signal_strength'
[14:00:52][C][wifi_signal.sensor:009]: State Class: 'measurement'
[14:00:52][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm'
[14:00:52][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
```
### Additional information
Vor dem Update auf 2022.12.0 hat noch alles funktioniert. War vor dem Update noch auf dem Kamera-Bild, alles OK. Der Fehler taucht nur nach dem Update auf 2022.12.0 bei der ESP32-Cam auf, meine 16 Stück ESP8266 funktionieren ohne Probleme.
3 Likes
g0tmk
December 31, 2023, 6:17pm
17
An unstable 5v0/GND connection to my dev board caused this error to appear during camera init
2 Likes
Lifth1309
(Lifth1309)
October 1, 2024, 3:15pm
18
Thanks a lot. I suddenly had the same error on a working board/camera at a new location. After reading your comment i tried a different power supply and the error was gone!
1 Like