TTGO T-Camera mic version -- doesn't send image

I am staked with this camera.
The history of this camera starts with two versions (at least) and you can distinguish them for the microphone. All the pinout changes from one to another, this is the funny point!
So I tried to copy the ESPHOME.yaml for this camera changing the PINs and I dind’t get it to work.
Minutes later I started a search in google and I found this github issue where in brief they said that you should change the pins moreover add the these sentences to the main.cpp:

V1:

    pinMode(13, INPUT_PULLUP);
    pinMode(14, INPUT_PULLUP);
    pinMode(15, INPUT_PULLUP);

V2:

    pinMode(12, INPUT_PULLUP);
    pinMode(13, INPUT_PULLUP);
    pinMode(14, INPUT_PULLUP);
    pinMode(15, INPUT_PULLUP);

with this two modifications you should have your camera working almost in stability conditions.

So I tried everything, also changing the board from
esp-wrover-kit
to esp32dev as says in the official documentation

The only thing that I can do now is work with Arduino versions but I dont know if would work or maybe have no sense.

So here you have my cam.yaml

substitutions:
  devicename: ttgocam
  friendly_name: test esp32cam

esphome:
  name: $devicename
  platform: ESP32
  board: esp-wrover-kit #also tested esp32dev
  #arduino_version: 1.0.2 maybe play with this?

wifi:
  ssid: "FF"
  password: ""

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "t1234!"

ota:
  password: "t1234"

binary_sensor:
  - platform: gpio
    pin: GPIO19
    name: $friendly_name PIR
    device_class: motion

  - platform: gpio
    pin:
      number: GPIO00
      mode: INPUT_PULLUP
      inverted: True
    name: $friendly_name Button

  - platform: status
    name: $friendly_name Status

sensor:
  - platform: wifi_signal
    name: $friendly_name WiFi Signal
    update_interval: 10s
  - platform: uptime
    name: $friendly_name Uptime

esp32_camera:
  name: $friendly_name Camera
  external_clock:
    pin: GPIO04
    frequency: 20MHz
  i2c_pins:
    sda: GPIO13
    scl: GPIO12
  data_pins: [GPIO34, GPIO13, GPIO14, GPIO35, GPIO39, GPIO12, GPIO15, GPIO36]
  vsync_pin: GPIO05
  href_pin: GPIO27
  pixel_clock_pin: GPIO25
  #power_down_pin:  doesnt have
  max_framerate: 10 fps
  idle_framerate: 0.1 fps
  resolution: 640x480
  jpeg_quality: 10
  vertical_flip: true
  horizontal_mirror: false

i2c:
  sda: GPIO21
  scl: GPIO22

font:
  - file: "fonts/times-new-roman.ttf"
    id: tnr1
    size: 20
  - file: "fonts/times-new-roman.ttf"
    id: tnr2
    size: 35

time:
  - platform: homeassistant
    id: homeassistant_time

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.strftime(64, 0, id(tnr1), TextAlign::TOP_CENTER,"%d-%m-%Y", id(homeassistant_time).now());
      it.strftime(64, 64, id(tnr2), TextAlign::BASELINE_CENTER, "%H:%M", id(homeassistant_time).now());

and with this configuration and V1 / V2 of the main.src and both board types I get the same error in the serial logger:

[12:00:22][E][esp32_camera:091]: Setup Failed: ERROR

and my loverlace yalm is:

    cards:
      - type: 'custom:camera-card'
        entity: camera.test_esp32cam_camera
        name: cameratest

The home assistant output:

and in the UI

(I just can post one image)

Thanks! I hope to solve it!

Can you post the serial log in its entirety.

I pasted as quote and I used bold to stand out the errors, I also remove some wifi connection lines to save space.

[08:31:28]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[08:31:28]configsip: 0, SPIWP:0xee
[08:31:28]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[08:31:28]mode:DIO, clock div:2
[08:31:28]load:0x3fff0018,len:4
[08:31:28]load:0x3fff001c,len:1044
[08:31:28]load:0x40078000,len:8896
[08:31:28]load:0x40080400,len:5828
[08:31:28]entry 0x400806ac
[08:31:30][I][logger:156]: Log initialized
[08:31:30][C][ota:364]: There have been 1 suspected unsuccessful boot attempts.
[08:31:30][I][app:028]: Running through setup()…
[08:31:30][D][binary_sensor:034]: ‘test esp32cam PIR’: Sending initial state ON
[08:31:30][D][binary_sensor:034]: ‘test esp32cam Button’: Sending initial state OFF
[08:31:30][D][binary_sensor:034]: ‘test esp32cam Status’: Sending initial state OFF
[08:31:30][E][camera.c:1049] camera_probe(): Detected camera not supported.
[08:31:30][E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004
[08:31:30][E][esp32_camera:017]: esp_camera_init failed: ERROR
[08:31:30][E][component:092]: Component was marked as failed.
[08:31:30][C][ssd1306_i2c:010]: Setting up I2C SSD1306…
[08:31:30][C][wifi:033]: Setting up WiFi…
[08:31:30][D][wifi:304]: Starting scan…
[08:31:30][D][sensor:092]: ‘test esp32cam Uptime’: Sending state 1.67300 s with 0 decimals of accuracy
[08:31:32][D][wifi:319]: Found networks:
[08:31:32][I][wifi:365]: - ‘FFxxxx’ () ▂▄▆█
[08:31:32][D][wifi:366]: Channel: 11
[08:31:32][D][wifi:367]: RSSI: -48 dB
[08:31:32][D][wifi:369]: - ‘FFxxx’ () ▂▄▆█
[08:31:32][I][wifi:193]: WiFi Connecting to ‘FFxxxx’…
[08:31:32][D][binary_sensor:036]: ‘test esp32cam PIR’: Sending state OFF
[08:31:34][I][wifi:423]: WiFi Connected!
[08:31:34][C][api:022]: Setting up Home Assistant API server…
[08:31:34][I][app:058]: setup() finished successfully!
[08:31:34][D][sensor:092]: ‘test esp32cam WiFi Signal’: Sending state -46.00000 dB with 0 decimals of accuracy
[08:31:34][I][app:100]: ESPHome version 1.14.3 compiled on Jan 16 2020, 13:08:37
[08:31:34][C][wifi:415]: WiFi:
[08:31:34][C][wifi:283]: SSID: ‘FFxxx’
[08:31:34][C][wifi:299]: DNS2: 80.x
[08:31:34][C][i2c:028]: I2C Bus:
[08:31:34][C][i2c:029]: SDA Pin: GPIO21
[08:31:34][C][i2c:030]: SCL Pin: GPIO22
[08:31:34][C][i2c:031]: Frequency: 50000 Hz
[08:31:34][I][i2c:033]: Scanning i2c bus for active devices…
[08:31:34][I][i2c:040]: Found i2c device at address 0x3C
[08:31:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor ‘test esp32cam PIR’
[08:31:34][C][gpio.binary_sensor:015]: Device Class: ‘motion’
[08:31:34][C][gpio.binary_sensor:016]: Pin: GPIO19 (Mode: INPUT)
[08:31:34][C][gpio.binary_sensor:015]: GPIO Binary Sensor ‘test esp32cam Button’
[08:31:34][C][gpio.binary_sensor:016]: Pin: GPIO0 (Mode: INPUT_PULLUP, INVERTED)
[08:31:34][C][uptime.sensor:030]: Uptime Sensor ‘test esp32cam Uptime’
[08:31:34][C][uptime.sensor:030]: Unit of Measurement: ‘s’
[08:31:34][C][uptime.sensor:030]: Accuracy Decimals: 0
[08:31:34][C][uptime.sensor:030]: Icon: ‘mdi:timer’
[08:31:34][C][logger:175]: Logger:
[08:31:34][C][logger:176]: Level: DEBUG
[08:31:34][C][logger:177]: Log Baud Rate: 115200
[08:31:34][C][logger:178]: Hardware UART: UART0
[08:31:34][C][status:034]: Status Binary Sensor ‘test esp32cam Status’
[08:31:34][C][status:034]: Device Class: ‘connectivity’
[08:31:34][C][esp32_camera:043]: ESP32 Camera:
[08:31:34][C][esp32_camera:044]: Name: test esp32cam Camera
[08:31:34][C][esp32_camera:045]: Board Has PSRAM: YES
[08:31:34][C][esp32_camera:047]: Data Pins: D0:34 D1:13 D2:14 D3:35 D4:39 D5:12 D6:15 D7:36
[08:31:34][C][esp32_camera:048]: VSYNC Pin: 5
[08:31:34][C][esp32_camera:049]: HREF Pin: 27
[08:31:34][C][esp32_camera:050]: Pixel Clock Pin: 25
[08:31:34][C][esp32_camera:051]: External Clock: Pin:4 Frequency:20000000
[08:31:34][C][esp32_camera:052]: I2C Pins: SDA:13 SCL:12
[08:31:34][C][esp32_camera:053]: Reset Pin: -1
[08:31:34][C][esp32_camera:074]: Resolution: 640x480 (VGA)
[08:31:34][E][esp32_camera:091]: Setup Failed: ERROR
[08:31:34][C][homeassistant.time:010]: Home Assistant Time:
[08:31:34][C][homeassistant.time:011]: Timezone: ‘CET-1CEST-2,M3.5.0/2,M10.4.0/3’
[08:31:34][C][ssd1306_i2c:023]: I2C SSD1306
[08:31:34][C][ssd1306_i2c:023]: Rotations: 0 °
[08:31:34][C][ssd1306_i2c:023]: Dimensions: 128px x 64px
[08:31:34][C][ssd1306_i2c:024]: Address: 0x3C
[08:31:34][C][ssd1306_i2c:025]: Model: SSD1306 128x64
[08:31:34][C][ssd1306_i2c:027]: External VCC: NO
[08:31:34][C][ssd1306_i2c:028]: Update Interval: 1.0s
[08:31:34][C][ota:029]: Over-The-Air Updates:
[08:31:34][C][ota:030]: Address: ttgocam.local:3232
[08:31:34][C][ota:032]: Using Password.
[08:31:34][C][api:095]: API Server:
[08:31:34][C][api:096]: Address: ttgocam.local:6053
[08:31:34][C][wifi_signal.sensor:009]: WiFi Signal ‘test esp32cam WiFi Signal’
[08:31:34][C][wifi_signal.sensor:009]: Unit of Measurement: ‘dB’
[08:31:34][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
[08:31:34][C][wifi_signal.sensor:009]: Icon: ‘mdi:wifi’

and how the locelave cards looks

Nobody with the same problem?

Try some lower resolutions.

Here is my working YAML for the TTGO T-Camera BME280 version. I guess we can assume the same camera pins? If you unstick the camera, the pins are printed on the PCB.

esp32_camera:
  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

  # Image settings
  name: TTGO Cam 1
  # ...
  
time:
  - platform: homeassistant
    id: esptime

font:
  - file: 'NirmalaB.ttf'
    id: font1
    size: 12

  - file: 'NirmalaB.ttf'
    id: font2
    size: 32

i2c:
  sda: GPIO21
  scl: GPIO22

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x64"
    # reset_pin: D0
    address: 0x3C
    rotation: 180
    lambda: |-
      if (id(pir_1).state) {
        it.print(0, 0, id(font2), " ON");
      } else {
        it.print(0, 0, id(font2), " OFF");
      }

      // Print time in HH:MM format
      it.strftime(0, 60, id(font1), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());
      
binary_sensor:
  - platform: gpio
    pin: 33
    name: "TTGO PIR Sensor 1"
    id: pir_1
    device_class: motion  
    
  - platform: gpio
    pin:
      number: 34
      inverted: yes
    name: "TTGO PIR Button 1"

switch:
  - platform: restart
    name: "TTGO PIR Switch 1"
    
1 Like

t-camera comes in different “flavours” with different pin assignments. See here for coverage.

Note also problems described at here and here.