esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
294 stars 38 forks source link

[E][esp32_camera:099]: Setup Failed: ESP_FAIL #3908

Closed Herzblut21 closed 1 year ago

Herzblut21 commented 1 year ago

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: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: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: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][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:021]: Available: NO [13:57:34][C][captive_portal:088]: Captive Portal:

[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

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?

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.

theggz commented 1 year ago

Same problem here since updating ESPHome to version 2022.12.0. Any idea how to solve this ?

Herzblut21 commented 1 year ago

I unfortunately not yet.

migsun commented 1 year ago

same here, after update the cam/webserver can't start.

[E][esp32_camera:099]: Setup Failed: ESP_ERR_NOT_FOUND [E][esp32_camera_web_server:097]: Setup Failed

Herzblut21 commented 1 year ago

even after the update to version 2022.12.1 the error is still there.

frustreermeneer commented 1 year ago

Same problem here.

esphome:
  name: esp32cam
  comment: Living Room - Aquarium Camera

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "xxxxxxxxxx"

wifi:
  networks:
  - ssid: !secret wifi_ssid_1
    password: !secret wifi_password_1
  - ssid: !secret wifi_ssid_2
    password: !secret wifi_password_2
  domain: ".local"
  ap:
    ssid: "ESP32Cam Fallback Hotspot"

  manual_ip:
    static_ip: 192.168.0.97
    gateway: 192.168.0.1
    subnet: 255.255.255.0

mqtt:
  broker: 192.168.0.2

captive_portal:

# Example configuration entry
esp32_camera:
  name: ESP32CAM1
  external_clock:
    pin: GPIO27
    frequency: 20MHz
  i2c_pins:
    sda: GPIO25
    scl: GPIO23
  data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19]
  vsync_pin: GPIO22
  href_pin: GPIO26
  pixel_clock_pin: GPIO21
  resolution: 640x480
  jpeg_quality: 20
  brightness: 2

i2c:
  sda: GPIO14
  scl: GPIO13

font:
  - file: "fonts/ubuntu.ttf"
    id: ubuntu
    size: 12

text_sensor:
  - platform: mqtt_subscribe
    name: "Display text line 1"
    id: displaytext1
    topic: esp32cam/displaytext1

  - platform: mqtt_subscribe
    name: "Display text line 2"
    id: displaytext2
    topic: esp32cam/displaytext2

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x32"
    address: 0x3C
    lambda: |-
      it.printf(0,  0, id(ubuntu), "%s", id(displaytext1).state.c_str());
      it.printf(0, 16, id(ubuntu), "%s", id(displaytext2).state.c_str());    
[10:24:47][C][esp32_camera:048]: ESP32 Camera:
[10:24:47][C][esp32_camera:049]:   Name: ESP32CAM1
[10:24:47][C][esp32_camera:050]:   Internal: NO
[10:24:47][C][esp32_camera:052]:   Data Pins: D0:17 D1:35 D2:34 D3:5 D4:39 D5:18 D6:36 D7:19
[10:24:47][C][esp32_camera:053]:   VSYNC Pin: 22
[10:24:47][C][esp32_camera:054]:   HREF Pin: 26
[10:24:47][C][esp32_camera:055]:   Pixel Clock Pin: 21
[10:24:47][C][esp32_camera:056]:   External Clock: Pin:27 Frequency:20000000
[10:24:47][C][esp32_camera:060]:   I2C Pins: SDA:25 SCL:23
[10:24:47][C][esp32_camera:062]:   Reset Pin: -1
[10:24:48][C][esp32_camera:080]:   Resolution: 640x480 (VGA)
[10:24:48][E][esp32_camera:099]:   Setup Failed: ESP_FAIL
Herzblut21 commented 1 year ago

I don't understand why something keeps popping up, you can't test it before publication. Today's update (version 2022.12.1) didn't help either, still the same error. Could it be that someone from Microsoft is working there, it's always the case with them that after an update it works less than before the update. :-)

migsun commented 1 year ago

Update installed, same behavior.

theggz commented 1 year ago

Is there a way to specify the version to use the one before the update that caused the error ? I have two camera and both are now unusable since I made the update...

Herzblut21 commented 1 year ago

Unfortunately I don't know, because there was probably a firmware update.

errorkallu commented 1 year ago

same issue for me on 2022.12.3

diginfo commented 1 year ago

Same here, on 2022.12.1, I restored back to 2022.12.0 and same problem with that, I dont have any older backups

diginfo commented 1 year ago

Is there a way to specify the version to use the one before the update that caused the error ? I have two camera and both are now unusable since I made the update...

Depends how long your backups go back, you can do a partial restore on the backup that was done by the esphome update, unfortunately mine are 7 days rolling only and I dont have older versions.

Not aure if it would be possible to restore a partial backup from someone else's backup who may have an older working version

davidmikulik commented 1 year ago

The same issue here: esphome: name: xxx

esp32: board: esp32dev framework: type: arduino

Enable logging

logger:

Enable Home Assistant API

api: encryption: key: "cccc"

ota: password: "c"

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap: ssid: "xxxFallback Hotspot" password: "xxxx"

captive_portal:

bluetooth_proxy:

esp32_camera: external_clock: pin: GPIO27 frequency: 20MHz i2c_pins: sda: GPIO25 scl: GPIO23 data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19] vsync_pin: GPIO22 href_pin: GPIO26 pixel_clock_pin: GPIO21

reset_pin: GPIO15

Image settings

name: camkladno

resolution: 640x480 jpeg_quality: 10

[13:30:31][C][wifi:362]: Local MAC: FC:F5:C4:01:6E:F4 [13:30:31][C][wifi:363]: SSID: [redacted] [13:30:31][C][wifi:364]: IP Address: 10.0.0.248 [13:30:31][C][wifi:366]: BSSID: [redacted]

[13:30:31][C][wifi:369]: Signal strength: -76 dB ▂▄▆█ [13:30:31][C][wifi:373]: Channel: 11 [13:30:31][C][wifi:374]: Subnet: 255.255.255.0 [13:30:31][C][wifi:375]: Gateway: 10.0.0.1 [13:30:31][C][wifi:376]: DNS1: 10.0.0.1 [13:30:31][C][wifi:377]: DNS2: 0.0.0.0

[13:30:31][C][logger:294]: Level: DEBUG [13:30:31][C][logger:295]: Log Baud Rate: 115200 [13:30:31][C][logger:296]: Hardware UART: UART0 [13:30:31][C][esp32_camera:048]: ESP32 Camera: [13:30:31][C][esp32_camera:049]: Name: xxx [13:30:31][C][esp32_camera:050]: Internal: NO [13:30:31][C][esp32_camera:052]: Data Pins: D0:17 D1:35 D2:34 D3:5 D4:39 D5:18 D6:36 D7:19 [13:30:31][C][esp32_camera:053]: VSYNC Pin: 22 [13:30:31][C][esp32_camera:054]: HREF Pin: 26 [13:30:31][C][esp32_camera:055]: Pixel Clock Pin: 21 [13:30:31][C][esp32_camera:056]: External Clock: Pin:27 Frequency:20000000 [13:30:31][C][esp32_camera:060]: I2C Pins: SDA:25 SCL:23 [13:30:31][C][esp32_camera:062]: Reset Pin: -1 [13:30:31][C][esp32_camera:080]: Resolution: 640x480 (VGA) [13:30:31][E][esp32_camera:099]: Setup Failed: ESP_FAIL

[13:30:31][C][psram:021]: Available: NO [13:30:31][C][captive_portal:088]: Captive Portal:

[13:30:31][C][mdns:104]: Hostname: xxxx [13:30:31][C][ota:093]: Over-The-Air Updates: [13:30:31][C][ota:094]: Address: xxxx.local:3232 [13:30:31][C][ota:097]: Using Password. [13:30:31][C][api:138]: API Server: [13:30:31][C][api:139]: Address: xxxx.local:6053 [13:30:31][C][api:141]: Using noise encryption: YES [13:30:32][W][api.connection:081]: Home Assistant 2022.12.7 (::FFFF:10.0.0.192): Connection reset

diginfo commented 1 year ago

Is there a way to specify the version to use the one before the update that caused the error ? I have two camera and both are now unusable since I made the update...

Depends how long your backups go back, you can do a partial restore on the backup that was done by the esphome update, unfortunately mine are 7 days rolling only and I dont have older versions.

Not aure if it would be possible to restore a partial backup from someone else's backup who may have an older working version

Fortunately I installed a stand-alone esphome on proxmox back in October, I updated to the 2022.11.5 version and the camera is working again.

hulleyg commented 1 year ago

I have the same issue on Home Assistant 2022.12.7 and ESPHome 2022.12.2. I don't have a backup from Home Assistant 2022.11.5

esp32: board: esp-wrover-kit framework: type: arduino

INFO Starting log output from camera-1.local using esphome API INFO Successfully connected to camera-1.local [18:48:15][I][app:102]: ESPHome version 2022.12.2 compiled on Dec 20 2022, 18:39:31

[18:48:15][C][wifi:362]: Local MAC: 40:22:D8:F0:C5:B4 [18:48:15][C][wifi:363]: SSID: [redacted] [18:48:15][C][wifi:364]: IP Address: [18:48:15][C][wifi:366]: BSSID: [redacted]

[18:48:15][C][wifi:369]: Signal strength: -65 dB ▂▄▆█ [18:48:15][C][wifi:373]: Channel: 8 [18:48:15][C][wifi:374]: Subnet: 255.255.255.0

[18:48:15][C][wifi:377]: DNS2: 0.0.0.0

[18:48:15][C][logger:294]: Level: DEBUG [18:48:15][C][logger:295]: Log Baud Rate: 115200 [18:48:15][C][logger:296]: Hardware UART: UART0 [18:48:15][C][esp32_camera:048]: ESP32 Camera: [18:48:15][C][esp32_camera:049]: Name: Camera 1 [18:48:15][C][esp32_camera:050]: Internal: NO [18:48:15][C][esp32_camera:052]: Data Pins: D0:5 D1:18 D2:19 D3:21 D4:36 D5:39 D6:34 D7:35 [18:48:15][C][esp32_camera:053]: VSYNC Pin: 25 [18:48:15][C][esp32_camera:054]: HREF Pin: 23 [18:48:15][C][esp32_camera:055]: Pixel Clock Pin: 22 [18:48:15][C][esp32_camera:056]: External Clock: Pin:0 Frequency:20000000 [18:48:15][C][esp32_camera:060]: I2C Pins: SDA:26 SCL:27 [18:48:15][C][esp32_camera:062]: Reset Pin: -1 [18:48:15][C][esp32_camera:080]: Resolution: 640x480 (VGA) [18:48:15][E][esp32_camera:099]: Setup Failed: ESP_FAIL

[18:48:15][C][psram:021]: Available: NO [18:48:15][C][captive_portal:088]: Captive Portal:

[18:48:15][C][mdns:104]: Hostname: camera-1 [18:48:15][C][ota:093]: Over-The-Air Updates: [18:48:15][C][ota:094]: Address: camera-1.local:3232 [18:48:15][C][ota:097]: Using Password. [18:48:15][C][api:138]: API Server: [18:48:15][C][api:139]: Address: camera-1.local:6053 [18:48:15][C][api:141]: Using noise encryption: YES

Herzblut21 commented 1 year ago

Even after the update to 2022.12.2 no improvement.

migsun commented 1 year ago

I replaced my both ESP32Cams. The new devices work as designed. The old ones seems to been killed by the update. I will try to make a clean reset/erase and try it again.

diginfo commented 1 year ago

2022.12.3 just released, same problem and this issue is not resolved.

I also tried clean build and that did not resolve it either.

diginfo commented 1 year ago

Hmmm, I wonder why there have been no comments from the dev team regarding this ?

jlt24 commented 1 year ago

Same issue here. I have two ESP32Cam boards in my garage and both are giving the following error. [E][esp32_camera_web_server:097]: Setup Failed

benceBalazs commented 1 year ago

Same here, it would be helpful to not just get an "esp_fail" error but more details on why or what happened ...

migsun commented 1 year ago

I was able to revive my two modules. Reflashing by wire (MB board) and ESPHome Flasher was successfully. Now both devices can also updates via OTA again.

benceBalazs commented 1 year ago

I'm going to try your method and post my results in a few hours

jlt24 commented 1 year ago

I was able to revive my two modules. Reflashing by wire (MB board) and ESPHome Flasher was successfully. Now both devices can also updates via OTA again.

Did you downgrade ESPHOME or just reflash with the same version?

davidmikulik commented 1 year ago

I was able to revive my two modules. Reflashing by wire (MB board) and ESPHome Flasher was successfully. Now both devices can also updates via OTA again.

I've tried it and no success - the same result as before :( ([15:47:01][E][esp32_camera:099]: Setup Failed: ESP_FAIL), please could you share your config with us?

Herzblut21 commented 1 year ago

I would also be interested in how you did it, I also braided all the boards again but without success.

migsun commented 1 year ago

I did not change anything of my original configuration. OTA fails, image to file and flashing by wire works.

davidmikulik commented 1 year ago

I did not change anything of my original configuration. OTA fails, image to file and flashing by wire works.

It was probably different issue - this decribed issue was - OTA works, but the cam start failures in setup phase: Setup Failed: ESP_FAIL.

jlt24 commented 1 year ago

I did not change anything of my original configuration. OTA fails, image to file and flashing by wire works.

It was probably different issue - this decribed issue was - OTA works, but the cam start failures in setup phase: Setup Failed: ESP_FAIL.

Agree, I have no issue at all with OTA

migsun commented 1 year ago

For me OTA works too, but then the cam sever fails. Only a wired update let start the cam as designed.

davidmikulik commented 1 year ago

For me OTA works too, but then the cam sever fails. Only a wired update let start the cam as designed.

strange - wired update does'nt helped to me, I tried different magic with configuration, but still the same result Setup Failed: ESP_FAIL, please could you share your config with us?

benceBalazs commented 1 year ago

Ok status update, I tried flashing it with ESPHome Flasher, and now I'm finally getting more concrete error messages. I suspect it has something to do with esp-idf code which has been modified in the update 2022.12.0

Showing logs:
[20:32:44]E (305) psram: PSRAM ID read error: 0xffffffff
[20:32:44][I][logger:258]: Log initialized
[20:32:44][C][ota:469]: There have been 0 suspected unsuccessful boot attempts.
[20:32:44][D][esp32.preferences:113]: Saving 1 preferences to flash...
[20:32:44][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[20:32:44][I][app:029]: Running through setup()...
[20:32:44][C][light:036]: Setting up light 'ESP32Cam light'...
[20:32:44][D][light:035]: 'ESP32Cam light' Setting:
[20:32:44][D][light:040]:   Color mode: 
[20:32:44][D][esp-idf:000]: E (470) cam_hal: cam_dma_config(306): frame buffer malloc failed
[20:32:44]
[20:32:44][D][esp-idf:000]: E (470) cam_hal: cam_config(390): cam_dma_config failed
[20:32:44]
[20:32:44][D][esp-idf:000]: E (480) camera: Camera config failed with error 0xffffffff
[20:32:44]
[20:32:44][E][esp32_camera:024]: esp_camera_init failed: ESP_FAIL
[20:32:44][E][component:113]: Component esp32_camera was marked as failed.
migsun commented 1 year ago

For me OTA works too, but then the cam sever fails. Only a wired update let start the cam as designed.

strange - wired update does'nt helped to me, I tried different magic with configuration, but still the same result Setup Failed: ESP_FAIL, please could you share your config with us?

...sure

esphome:
  name: airqualitycam

esp32:
  board: esp32dev
  framework:
    type: arduino

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:
  password: !secret ota_password
ota:
  password: !secret ota_password

logger:

esp32_camera:
  name: airqualitycam
  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: 800x600

esp32_camera_web_server:
  - port: 8081
    mode: snapshot

output:
  - platform: gpio
    pin: GPIO4
    id: gpio_4

binary_sensor:
  - platform: status
    name: "airqualitycam status"

sensor:
  - platform: wifi_signal
    name: "airqualitycam WiFi signal"
    update_interval: 60s

  - platform: pm1006
    pm_2_5:
      name: "PM2.5"

  - platform: dht
    model: dht22
    pin: GPIO14
    temperature:
      name: "airqualitycam temperature"
    humidity:
      name: "airqualitycam humidity"
    update_interval: 30s

light:
  - platform: binary
    output: gpio_4
    name: "airqualitycam light"

uart:
  rx_pin: GPIO15
  baud_rate: 9600
davidmikulik commented 1 year ago

For me OTA works too, but then the cam sever fails. Only a wired update let start the cam as designed.

strange - wired update does'nt helped to me, I tried different magic with configuration, but still the same result Setup Failed: ESP_FAIL, please could you share your config with us?

...sure

`esphome: name: airqualitycam

esp32: board: esp32dev framework: type: arduino

wifi: ssid: !secret wifi_ssid password: !secret wifi_password

api: password: !secret ota_password ota: password: !secret ota_password

logger:

esp32_camera: name: airqualitycam 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: 800x600

esp32_camera_web_server:

  • port: 8081 mode: snapshot

output:

  • platform: gpio pin: GPIO4 id: gpio_4

binary_sensor:

  • platform: status name: "airqualitycam status"

sensor:

  • platform: wifi_signal name: "airqualitycam WiFi signal" update_interval: 60s
  • platform: pm1006 pm_2_5: name: "PM2.5"
  • platform: dht model: dht22 pin: GPIO14 temperature: name: "airqualitycam temperature" humidity: name: "airqualitycam humidity" update_interval: 30s

light:

  • platform: binary output: gpio_4 name: "airqualitycam light"

uart: rx_pin: GPIO15 baud_rate: 9600

many thanks it's look like, the issie is only for cams with similar pconfiguration and pinout as m5stack:

Example configuration entry

esp32_camera: name: My Camera external_clock: pin: GPIO27 frequency: 20MHz i2c_pins: sda: GPIO25 scl: GPIO23 data_pins: [GPIO17, GPIO35, GPIO34, GPIO5, GPIO39, GPIO18, GPIO36, GPIO19] vsync_pin: GPIO22 href_pin: GPIO26 pixel_clock_pin: GPIO21 reset_pin: GPIO15 resolution: 640x480 jpeg_quality: 10

hderko12 commented 1 year ago

It seems it has something to do with Psram. I have 3 esp32cam modules strictly identical and camera only work on one: the only one where Psram is detected. Why is there no Psram detected on the other 2 modules ?

benceBalazs commented 1 year ago

True, now that you mention it, my module seems to have no PSRAM.

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13836
load:0x40080400,len:3608
entry 0x400805f0
E (81) psram: PSRAM ID read error: 0xffffffff
[    25][D][sketch_dec25a.ino:4] setup(): Total heap: 361072
[    25][D][sketch_dec25a.ino:5] setup(): Free heap: 332908
[    26][D][sketch_dec25a.ino:6] setup(): Total PSRAM: 0
[    30][D][sketch_dec25a.ino:7] setup(): Free PSRAM: 0
benceBalazs commented 1 year ago

Digging through the Arduino forums, I found this potential fix.

See original post

image

jlt24 commented 1 year ago

Digging through the Arduino forums, I found this potential fix.

See original post

image

OK, how / where would I put that into EspHome?

puchtuning commented 1 year ago

Digging through the Arduino forums, I found this potential fix. See original post image

OK, how / where would I put that into EspHome?

I just searched thru the esphome libraries and i think this fix does not apply to esp-home system.

Btw i have the same error on my boards. Camera works fine with the Webserver Example from the Arduino IDE.

benceBalazs commented 1 year ago

Yeah, it does not apply to the esphome code itself, as this seems to be a problem of the underlying esp_camera system that esphome is using.

stiw47 commented 1 year ago

I can confirm this issue is still presented and can confirm that ESP32 cam is working when I downgraded ESPHome to 2022.11.5 (recompiled and reflashed firmware from 2022.11.5). I wrote more about that here, so you can check my failed logs, etc. but they are basically same as here in this topic.

jlt24 commented 1 year ago

I had an old version (2022.1.4) of the bin files for my esp32 cam boards. I flashed those bin files OTA and all looks to be working fine now.

Herzblut21 commented 1 year ago

The problem is definitely coming from the ESPHome. Today I installed the same configuration on a new ESP32Cam. The same problem as also on the previous ESP32Cam. When will the problem finally be fixed by someone responsible! I want to use the cams again.

Herzblut21 commented 1 year ago

For me, that's the end of it, I've now programmed my two ESPCams with Arduino 1.8.19, installed the web server and integrated them into Home Assistant via MJPEG IP Camera. Works without problems.

frustreermeneer commented 1 year ago

Downgrading ESPHome to version 2022.11.5 got things working again.

Herzblut21 commented 1 year ago

If this is supposed to be the solution to downgrading software to fix a software problem, I'm out of here. Makes no sense to me. Sorry, if there is an update, it should be at least as good as the previous version and not worse. I no longer use ESPHome and my problems are solved.

frustreermeneer commented 1 year ago

If this is supposed to be the solution to downgrading software to fix a software problem, I'm out of here. Makes no sense to me. Sorry, if there is an update, it should be at least as good as the previous version and not worse. I no longer use ESPHome and my problems are solved.

Good that you found an other solution. Remember that ESPHome and Home Assistant are open source projects. The majority of the developers are not paid for their work. We can't demand or expect quick solutions to all bugs, as much as we want it to.

Herzblut21 commented 1 year ago

Then we know this for the future.

MichaKersloot commented 1 year ago

We know downgrading solves it, but that is not a real solution. We should not close this issue.

pacmac commented 1 year ago

As above, this issue is not resolved, I'm not sure why, but there seems to be very little if any evidence that is even being investigated ?