andrep1
(Andre)
April 7, 2023, 6:22pm
1
Hello
I’ve been trying to get the camera going for this board in esphome.
I figured out the pinout off the vendor’s site and I’m not getting any warning at build or flash but on bootup the camera component doesn’t start up correctly.
It works fine with basic Arduino sketches.
I’m hoping someone might have some insights for me.
esphome:
name: esphome-web-447610
friendly_name: esp32-s3
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
level: very_verbose
# Enable Home Assistant API
api:
encryption:
key: "(removed)"
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-447610"
password: "(removed)"
captive_portal:
# camera https://github.com/Freenove/Freenove_ESP32_S3_WROOM_Board
esp32_camera:
name: esp32cam
external_clock:
pin: GPIO15
frequency: 20MHz
i2c_pins:
sda: GPIO4
scl: GPIO5
data_pins: [GPIO11, GPIO9, GPIO8, GPIO10, GPIO12, GPIO18, GPIO17, GPIO16]
vsync_pin: GPIO6
href_pin: GPIO7
pixel_clock_pin: GPIO13
#reset_pin: GPIO15
resolution: 640x480
Logs look like this:
INFO Reading configuration /config/esphome/esphome-web-447610.yaml...
INFO Starting log output from esphome-web-447610.local using esphome API
INFO Successfully connected to esphome-web-447610.local
[14:21:03][I][app:102]: ESPHome version 2023.3.2 compiled on Apr 7 2023, 14:01:29
[14:21:03][C][wifi:504]: WiFi:
[14:21:03][C][wifi:362]: Local MAC: 34:85:18:44:76:10
[14:21:03][C][wifi:363]: SSID: [redacted]
[14:21:03][C][wifi:364]: IP Address: 192.168.0.110
[14:21:03][C][wifi:366]: BSSID: [redacted]
[14:21:03][C][wifi:367]: Hostname: 'esphome-web-447610'
[14:21:03][C][wifi:369]: Signal strength: -34 dB ▂▄▆█
[14:21:03][V][wifi:371]: Priority: -11.0
[14:21:03][C][wifi:373]: Channel: 6
[14:21:03][C][wifi:374]: Subnet: 255.255.255.0
[14:21:03][C][wifi:375]: Gateway: 192.168.0.1
[14:21:03][C][wifi:376]: DNS1: 192.168.0.150
[14:21:03][C][wifi:377]: DNS2: 192.168.0.199
[14:21:03][C][logger:293]: Logger:
[14:21:03][C][logger:294]: Level: VERY_VERBOSE
[14:21:03][C][logger:295]: Log Baud Rate: 115200
[14:21:03][C][logger:296]: Hardware UART: UART0
[14:21:03][C][esp32_camera:048]: ESP32 Camera:
[14:21:03][C][esp32_camera:049]: Name: esp32cam
[14:21:03][C][esp32_camera:050]: Internal: NO
[14:21:03][C][esp32_camera:052]: Data Pins: D0:11 D1:9 D2:8 D3:10 D4:12 D5:18 D6:17 D7:16
[14:21:03][C][esp32_camera:053]: VSYNC Pin: 6
[14:21:03][C][esp32_camera:054]: HREF Pin: 7
[14:21:03][C][esp32_camera:055]: Pixel Clock Pin: 13
[14:21:03][C][esp32_camera:056]: External Clock: Pin:15 Frequency:20000000
[14:21:03][C][esp32_camera:060]: I2C Pins: SDA:4 SCL:5
[14:21:03][C][esp32_camera:062]: Reset Pin: -1
[14:21:03][C][esp32_camera:080]: Resolution: 640x480 (VGA)
[14:21:03][E][esp32_camera:099]: Setup Failed: ESP_FAIL
[14:21:03][C][psram:020]: PSRAM:
[14:21:03][C][psram:021]: Available: NO
[14:21:03][C][captive_portal:088]: Captive Portal:
[14:21:03][C][mdns:108]: mDNS:
[14:21:03][C][mdns:109]: Hostname: esphome-web-447610
cmsj
(cmsj)
April 8, 2023, 9:04am
2
andrep1
(Andre)
April 8, 2023, 10:28am
3
Hello @cmsj .
Thanks for the suggestion.
Are you suggesting I use the wrover board instead of wroom, because my board is a wroom version? Or are you suggesting I have the pinout wrong?
Hi, Did you manage to make i work?
I’ve tried the custom component for the ** AXP2101** but with no result ;/
andrep1
(Andre)
June 28, 2023, 12:53pm
5
I’ve set that aside for now. I’ll post if I get it working. Seems to be luck to the draw with espcams functionnality/compatibility
I had the same error until I added in the external components section below.
This worked for me:
esphome:
name: esp32-camera
friendly_name: esp32-camera
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "<snip>"
ota:
password: "<snip>"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-Camera Fallback Hotspot"
password: "<snip>"
captive_portal:
external_components:
- source:
type: git
url: https://github.com/MichaKersloot/esphome_custom_components
components: [ esp32_camera ]
esp32_camera:
external_clock:
pin: GPIO15
frequency: 20MHz
i2c_pins:
sda: GPIO4
scl: GPIO5
data_pins: [GPIO11, GPIO9, GPIO8, GPIO10, GPIO12, GPIO18, GPIO17, GPIO16]
vsync_pin: GPIO6
href_pin: GPIO7
pixel_clock_pin: GPIO13
#power_down_pin: GPIO33
# Image settings
name: ESP32 Camera
esp32_camera_web_server:
- port: 8080
mode: stream
switch:
- platform: restart
name: "ESP32 Camera Restart"
sensor:
- platform: uptime
name: "ESP32 Camera Uptime Sensor"
- platform: wifi_signal
name: "ESP32 Camera WiFi Signal"
update_interval: 60s
4 Likes
mclazer
(Matthias)
September 20, 2023, 5:18pm
7
@quersane thx! You saved my day. I already thought my camera was broken. I took the longer path and flashed the Arduino tutorial with the camera web server onto the board to verify it is working and didn’t find any other help until I found your reply here :).
PapaLanc
(Grey Lancaster)
April 17, 2024, 5:39pm
8
@quersane
Put a +1
Thanks!
Grey
PapaLanc
(Grey Lancaster)
April 17, 2024, 11:11pm
9
For snorts and giggles GPIO48 is a ws2812 led
light:
- platform: neopixelbus
type: GRB
variant: WS2812
pin: GPIO48
num_leds: 60
name: "NeoPixel Light
"
Does not light up like the light on the “normal” esp32cam board for light/flash though
Also if you want to control the “blink led”
- platform: gpio
pin: GPIO2
name: "USB LED"
It took a bit for me to really understand the above I purchased an ali special esp32-s3-wroom-1 look a ton like the freenove but is not at all the same I think. Your code above with some slight adjustments seems to still work. So thank you all.
Here is the exact device.
esp32-s3
I purchased also I am using a ov2640 fisheye camera.
I was struggling for anyone who cares here is my code that is working 2024-06-22
esphome:
name: esp32-s3-wroom-cam
friendly_name: ESP32-S3-Wroom-Cam
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: ""
ota:
- platform: esphome
password: ""
wifi:
ssid:
password:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32-S3-Wroom-Cam"
password: ""
light:
- platform: esp32_rmt_led_strip
rmt_channel: 0
rgb_order: GRB
chipset: WS2812
pin: GPIO48
num_leds: 1
name: "NeoPixel Light"
status_led:
pin: GPIO2
captive_portal:
web_server:
version: 2
external_components:
- source:
type: git
url: https://github.com/MichaKersloot/esphome_custom_components
components: [ esp32_camera ]
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO15
frequency: 20MHz
i2c_pins:
sda: GPIO4
scl: GPIO5
data_pins: [GPIO11, GPIO9, GPIO8, GPIO10, GPIO12, GPIO18, GPIO17, GPIO16]
vsync_pin: GPIO6
href_pin: GPIO7
pixel_clock_pin: GPIO13
#power_down_pin: GPIO33
# Image settings
#resolution: 1280x1024
jpeg_quality: 10
max_framerate: 30fps
name: ESP32 Camera
esp32_camera_web_server:
- port: 8080
mode: stream
- port: 8081
mode: snapshot
switch:
- platform: restart
name: "ESP32 Camera Restart"
sensor:
- platform: uptime
name: "ESP32 Camera Uptime Sensor"
- platform: wifi_signal
name: "ESP32 Camera WiFi Signal"
update_interval: 60s
1 Like
PapaLanc
(Grey Lancaster)
September 18, 2024, 3:00pm
12
Anyone got an OV5640 camera working? This code works fine with the ov2640 but the 5640 has a purple tint. If I lower the mgz to 12 it is better but still has a green and purple tint
Actually it is an esp32-s3 wroom board
1 Like
Depending on which ESP32-S3-WROOM-1 you have, you may be able to get it working without using an external component. I have the ESP32-S3-WROOM-1 N8R8 which has Quad SPI Flash, but Octal SPI PSRAM. To enable PSRAM (using the Arduino Framework) I needed to add the following to the “esphome:” section.
esphome:
...
platformio_options:
board_build.arduino.memory_type: qio_opi
This tells the compiler to configure PlatformIO to use the proper configuration to enable PSRAM on this board. Once that is done, the external component you are using should not be required. (all it does is change PSRAM to DRAM in esp32_camera.cpp - and it is a little out of date - so there are a few other differences)
Note, if you do try this, make sure to do a “Clean Build Files” before you build and upload. (that option can be found in the 3 bullet menu for your device on ESPHome Builder dashboard).
I created a full post for my configuration at: Esp32-s3-wroom-1 N8R8 (Freenove) camera board with PSRAM working