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!