I’m working on a esp32 cam ( Ai-Thinker Camera clone) with related esp32-cam-mb companion.
The setup is pretty bare:
substitutions:
name: esp-cam
friendly_name: ESP32Cam
api_encryption_key: "XXX"
ota_password: "XXX"
esp32:
board: esp32dev
framework:
type: arduino
esphome:
name: ${name}
friendly_name: ${friendly_name}
on_boot:
then:
- logger.log: "On boot handler"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${name} Fallback"
password: !secret wifi_ap_password
api:
encryption:
key: ${api_encryption_key}
ota:
password: ${ota_password}
logger:
captive_portal:
debug:
esp32_camera:
id: espcam32
name: espcam32
# Ai-Thinker Camera settings
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
resolution: 800x600
jpeg_quality: 30 # max. 63
max_framerate: 2 fps # default: 10 fps, max 60
idle_framerate: 0.2 fps # default: 0.1 fps - framerate for 'picture' in HA dashboard
light:
# red status light
- platform: status_led
name: "Onboard LED"
pin:
number: GPIO33
inverted: True
Flashing (via serial/usb plugged in the ESPHome server) results in a success
except for
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
at the end however, it is stuck on
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200
If I stop listening for logs, the device boots, connects to wifi and it’s responsive (picture + led).
I can even listen for logs wirelessly but if I try again via serial/usb it’s stuck once more, usually taking the Chrome tab with it (crash).
Any idea?
Thanks