Build error using camera component

Hi, I am trying to make a configuration for an T-camera ESP32S3.
In my yaml I have the following code:

esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
version: 2.0.3
platform_version: 5.1.0
variant: esp32s3

esp32_camera:
name: LilyCam
external_clock:
pin: GPIO38
frequency: 20MHz
i2c_pins:
sda: GPIO5
scl: GPIO4
data_pins: [GPIO14, GPIO47, GPIO48, GPIO21, GPIO13, GPIO11, GPIO10, GPIO9]
vsync_pin: GPIO8
href_pin: GPIO18
pixel_clock_pin: GPIO12

When I try to build I get the below error messages which seem to indicate that there is something wrong with the I2C definitions.

Any idea what can be wrong?

In file included from src/esphome/components/esp32_camera/esp32_camera.cpp:4:
src/esphome/components/esp32_camera/esp32_camera.cpp: In member function ‘virtual void esphome::esp32_camera::ESP32Camera::dump_config()’:
src/esphome/components/esp32_camera/esp32_camera.cpp:60:56: error: ‘struct camera_config_t’ has no member named ‘pin_sccb_sda’; did you mean ‘pin_sscb_sda’?
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl);
^~~~~~~~~~~~
src/esphome/core/log.h:94:90: note: in definition of macro ‘esph_log_config’
esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS)
^~~~~~~~~~~
src/esphome/components/esp32_camera/esp32_camera.cpp:60:3: note: in expansion of macro ‘ESP_LOGCONFIG’
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl);
^~~~~~~~~~~~~
src/esphome/components/esp32_camera/esp32_camera.cpp:60:75: error: ‘struct camera_config_t’ has no member named ‘pin_sccb_scl’; did you mean ‘pin_sscb_scl’?
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl);
^~~~~~~~~~~~
src/esphome/core/log.h:94:90: note: in definition of macro ‘esph_log_config’
esp_log_printf_(ESPHOME_LOG_LEVEL_CONFIG, tag, LINE, ESPHOME_LOG_FORMAT(format), ##VA_ARGS)
^~~~~~~~~~~
src/esphome/components/esp32_camera/esp32_camera.cpp:60:3: note: in expansion of macro ‘ESP_LOGCONFIG’
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl);
^~~~~~~~~~~~~
src/esphome/components/esp32_camera/esp32_camera.cpp: In member function ‘void esphome::esp32_camera::ESP32Camera::set_i2c_pins(uint8_t, uint8_t)’:
src/esphome/components/esp32_camera/esp32_camera.cpp:220:17: error: ‘struct camera_config_t’ has no member named ‘pin_sccb_sda’; did you mean ‘pin_sscb_sda’?
this->config_.pin_sccb_sda = sda;
^~~~~~~~~~~~
pin_sscb_sda
src/esphome/components/esp32_camera/esp32_camera.cpp:221:17: error: ‘struct camera_config_t’ has no member named ‘pin_sccb_scl’; did you mean ‘pin_sscb_scl’?
this->config_.pin_sccb_scl = scl;
^~~~~~~~~~~~
pin_sscb_scl
Compiling /data/esp-lilycam/.pioenvs/esp-lilycam/src/esphome/components/json/json_util.cpp.o
*** [/data/esp-lilycam/.pioenvs/esp-lilycam/src/esphome/components/esp32_camera/esp32_camera.cpp.o] Error 1

I am using a WROOM-1 module on my board (lilygo t-camera ESP32-S3)

I now changed the code for the board definition to:
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
variant: esp32s3

and loaded the code via OTA

The yaml builda without any error however on the logoutput I see that I get a bootloop with the following info:

ESP-ROM:esp32s3-20210327

Build:Mar 27 2021

rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)

Saved PC:0x40377508

SPIWP:0xee

mode:DIO, clock div:1

load:0x3fcd0108,len:0x43c

load:0x403b6000,len:0xbd0

load:0x403ba000,len:0x29c8

entry 0x403b61d8

E (183) psram: PSRAM ID read error: 0x00ffffff

E (5217) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:

E (5217) task_wdt: - loopTask (CPU 1)

E (5217) task_wdt: Tasks currently running:

E (5217) task_wdt: CPU 0: IDLE

E (5217) task_wdt: CPU 1: IDLE

E (5217) task_wdt: Aborting.

Please post your code properly.

Hi, did you manage to solve the problem? I have the same board, I suspect there is no definiton to supply power to the camera board via PMU, but I am new to esphome

I managed to solve to compilation errors by using a local component for the esp32_campera. I changed in_sccb_sda/scl → to pin_sscb_sda/scl. Unfortunatly the issue when starting up I could not find (yet). I guess indeed the PMU seems to be the problem. This seems specific for Esphome since running the demo code from lilyGo has no issues.

Hi, is there any solution for this issue ? I just get a lilygo t-camera esp32-S3 too and facing the same problem on HA 2023.4.5 with ESPHome 2023.4.0

I am also using the same esp32 yaml parameters and same configuration for the esp32_camera.

The display, the switch and the PIR (not yet tested the mic) are working well and there is no issues on build or execution, it only occurs when I am adding the esp32_camera module.

Here is my yaml :

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

esp32_camera:
  name: Camera
  external_clock:
    pin: 38
    frequency: 20MHz
  i2c_pins:
    sda: 05
    scl: 04
  data_pins: [14, 47, 48, 21, 13, 11, 10, 09]
  vsync_pin: 08
  href_pin: 18
  pixel_clock_pin: 12
  resolution: 640x480

Also tried it with a esp32s3box but same results.
Seems that there is no PMU driver (yet) for the S3

Have a look at these sample configurations. The t-camera-s3.yaml worked for me.

I think you really only need first 24 lines (esphome, custom_component and esp32 configuration) and the included file, the rest is normal configuration. (but it looks like there are also working pin aliases)

1 Like