TTGO T-Camera V05 fails after ESPHome 1.19 upgrade

My camera was working (for over a year), but after the latest ESPHome update 1.19, I decided to update the devices.
Now I see the following in the logs:

[18:03:47][C][esp32_camera:043]: ESP32 Camera:
[18:03:47][C][esp32_camera:044]:   Name: ESP Cam 1
[18:03:47][C][esp32_camera:045]:   Board Has PSRAM: YES
[18:03:47][C][esp32_camera:047]:   Data Pins: D0:5 D1:14 D2:4 D3:15 D4:18 D5:23 D6:36 D7:39
[18:03:47][C][esp32_camera:048]:   VSYNC Pin: 27
[18:03:47][C][esp32_camera:049]:   HREF Pin: 25
[18:03:47][C][esp32_camera:050]:   Pixel Clock Pin: 19
[18:03:47][C][esp32_camera:051]:   External Clock: Pin:32 Frequency:20000000
[18:03:47][C][esp32_camera:052]:   I2C Pins: SDA:13 SCL:12
[18:03:47][C][esp32_camera:053]:   Reset Pin: -1
[18:03:47][C][esp32_camera:074]:   Resolution: 800x600 (SVGA)
[18:03:47][E][esp32_camera:090]:   Setup Failed: ERROR

The config that had been working:

esp32_camera:
  name: ESP Cam 1
  external_clock:
    pin: GPIO32
    frequency: 20MHz
  i2c_pins:
    sda: GPIO13
    scl: GPIO12
  data_pins: [GPIO5, GPIO14, GPIO4, GPIO15, GPIO18, GPIO23, GPIO36, GPIO39]
  vsync_pin: GPIO27
  href_pin: GPIO25
  pixel_clock_pin: GPIO19
  power_down_pin: GPIO26
  resolution: 800x600
  max_framerate: 5 fps
  jpeg_quality: 10
  vertical_flip: true

Any ideas? I actually updated a different camera (MStack) that worked just fine. The TTGO display and motion sensor seem to be working fine, it’s just the camera that is now failing.

For anyone else having this issue, I was able to get it working again by adding:

esphome:
  arduino_version: 1.0.2

Same over here, unfortunately.
But not for all TTGo-cameras, I have one with a built in microphone which doesn’t need this additional line.

I have the same issue

I can confirm I also have this issue. on esphome version: 1.19.3

on a LilyGO TTGO T-Camera ESP32-WROVER

No errors during compile or in the logs other then: setup failed: ERROR

The rest works just fine.

The solution above did not work for me.

I can’t run firmware with this workaround.

[20:17:45]Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
[20:17:45]Memory dump at 0x401689cc: 030000df d0091064 d04cd03b
[20:17:45]Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
[20:17:45]Memory dump at 0x401689cc: 030000df d0091064 d04cd03b
[20:17:45]Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
[20:17:45]Memory dump at 0x401689cc: 030000df d0091064 d04cd03b
[20:17:45]Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
[20:17:45]Memory dump at 0x401689cc: 030000df d0091064 d04cd03b
[20:17:45]Guru Meditation Error: Core  0 panic'ed (Double exception)

Are you folks using the display on these TTGO cameras?
What I have figured out: There was an error during compiling, talking about something with …spi , so I removed in the yaml file all the lines with SPI and everything related to the display, now it works again even without arduino version 1.0.2 (with that the cameras were quite unstable and needed a reset more than once per day)

Yes. I use TTGO with OLED (SSD1306) on i2c. I also use BME280 on i2c.
I deleted SSD1306 config, pushed OTA, and lost connection…

I also have TTGO mini without OLED and sensors - there is same issue…

I encountered the same problem and was forced to bring my old RPi3 installation back online and upload version compiled with ESPHome version 1.15.0b4. This was quite a hassle, so please let me know if you find a solution where these cameras can be upgraded with latest ESPHome versions.

For me the same problem. I just upgraded all of my esphome devices and only the TTGO camera gave the setup fail result. The rest works fine. Any new thoughts on this subject?

I tried this and it worked for me

esp32_camera:
name: Camera
external_clock:
pin: 32
frequency: 20MHz
i2c_pins:
sda: 13
scl: 12
data_pins:
- 5
- 14
- 4
- 15
- 18
- 23
- 36
- 39
vsync_pin: 27
href_pin: 25
pixel_clock_pin: 19
resolution: 640x480 # Can be higher, I think, but this has a pretty good framerate

Hi Tunnis,
This is the exact configuration I have. It worked for me until the last update of ESPHome. It’s only the camera which is not working, the rest is up & running.

Hope that someone found the answer to this.

Same problem. Only camera has a problem:

esp32_camera: Setup Failed: ERROR

ok i had problem but after this conf mine started working with latest ESPHome

Can you recall which version of ESPHome you had problems with and whether the problem occurred with that specific version after an upgrade? Was the problem description identical to what we’ve experienced or different?

The reason I’m asking for specifics is that I not longer have a simple way to restore the units with an older version of ESPHome.

Cheers, Per

Hi. I cannot recall the last version, I presume 1 or even more versions ago. I happen to have the original bin file with which I made the ttgo cam work. This is a kind of reset of the device to an older version. I will try that in a couple of days. For now there does not seem to be a solution for the problem (yet)?

Understood, but what you’re saying is that with latest version of ESPHome 2021.9.3, it is still not working.

tunni: Is this something you can confirm or do you have a different experience?

I had to remove the arduino version I mentioned in post #2 with the September ESP Home update. All is working with the original config (first post). The only other thing with my config is I did disable the logger.

Do I understand you correctly that it now works for you again since the september update and that the only difference relative to your original code is that you disabled the logger?

That is correct. Prior to that I had to set the arduino version lower, but the problem returned with the Sep update. Removing the arduino version and commenting out logger has fixed it for me.

The config below works for me (the names and passwords have been changed):

esphome:
  name: espcam
#  arduino_version: 1.0.2
  platform: ESP32
  board: esp-wrover-kit

wifi:
  ssid: "myssid"
  password: "mypassword"

# Enable logging
#logger:

# Enable Home Assistant API
api:
  password: 'password'

ota:
  password: 'password'

esp32_camera:
  name: ESP Cam
  external_clock:
    pin: GPIO32
    frequency: 20MHz
  i2c_pins:
    sda: GPIO13
    scl: GPIO12
  data_pins: [GPIO5, GPIO14, GPIO4, GPIO15, GPIO18, GPIO23, GPIO36, GPIO39]
  vsync_pin: GPIO27
  href_pin: GPIO25
  pixel_clock_pin: GPIO19
  power_down_pin: GPIO26
  resolution: 800x600
  max_framerate: 5 fps
  jpeg_quality: 10
  vertical_flip: true
  
time:
  - platform: homeassistant
    id: timeid  

sensor:
  - platform: homeassistant
    id: inside_temperature
    entity_id: sensor.living_room_temperature
    internal: true

  - platform: homeassistant
    id: outside_temperature
    entity_id: sensor.garage_temperature
    internal: true


i2c:
  sda: GPIO21
  scl: GPIO22

font:
  - file: "Ubuntu-Regular.ttf"
    id: font3
    size: 14
  - file: "slkscr.ttf"
    id: font1
    size: 8
  - file: "BebasNeue-Regular.ttf"
    id: font2
    size: 48

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    rotation: 180
    lambda: |-
      // Print "Blah blah blah" in top center.
      it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "Blah blah blah");

      // Print time in HH:MM format
      it.strftime(0, 60, id(font2), TextAlign::BASELINE_LEFT, "%I:%M", id(timeid).now());

      // Print inside temperature (from homeassistant sensor)
      if (id(inside_temperature).has_state()) {
        it.printf(127, 23, id(font3), TextAlign::TOP_RIGHT , "%.1f°", id(inside_temperature).state);
      }

      // Print outside temperature (from homeassistant sensor)
      if (id(outside_temperature).has_state()) {
        it.printf(127, 60, id(font3), TextAlign::BASELINE_RIGHT , "%.1f°", id(outside_temperature).state);
      }
# sensor:
#   - platform: bme280
#     temperature:
#       name: "BME280 Temperature"
#       oversampling: 16x
#     pressure:
#       name: "BME280 Pressure"
#     humidity:
#       name: "BME280 Humidity"
#     address: 0x77
#     update_interval: 60s
binary_sensor:
  - platform: gpio
    pin: GPIO33
    name: "PIR Sensor"
    device_class: motion

switch:
  - platform: restart
    name: "Cam Restart"