I have been playing with a fresh ESP32-CAM module connected to ESP32-CAM-MB
When initially loading a default configuration this worked, I could not set wifi immediately after this, however after a reconnect to USB I was able to do so.
Whenever I load a configuration with esp32_camera it seems to cause an error on mDns component and I can no longer reach the board. The board says in the logs it is connected to the HA server through API however it is not visible in ESPhome as being connected, nor I can reach the board directly on its IP.
Errors seen:
[11:03:20][W][mdns:020]: mDNS init failed: ESP_FAIL
[11:03:20][E][component:119]: Component mdns was marked as failed.
[11:03:20][E][component:164]: Component mdns set Error flag: unspecified
See below Configuration file and Log
substitutions:
name: esphome-web-ecdaf4
friendly_name: Garage_camera
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: dev
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
level: VERBOSE
tx_buffer_size: 256
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
# Allow provisioning Wi-Fi via serial
improv_serial:
wifi:
# Set up a wifi access point
ap: {}
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
#dashboard_import:
# package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
# import_full_config: true
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO0
frequency: 20MHz
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
# Image settings
name: My ESP32-CAM
# Flashlight
output:
- platform: gpio
pin: GPIO4
id: gpio_4
## GPIO_4 is the flash light pin
light:
- platform: binary
output: gpio_4
name: flashlight
# To have a "next url" for improv serial
web_server:
port: 80
and Log (truncated IPs and names)
[11:02:45][I][web_server_base:047][async_tcp]: OTA Update Start: esphome-web-ecdaf4-peyanski-cam.ota.bin
[11:02:45][D][web_server_base:080][async_tcp]: OTA in progress: 0.0%
[11:02:46][D][web_server_base:080][async_tcp]: OTA in progress: 3.9%
[11:02:47][D][web_server_base:080][async_tcp]: OTA in progress: 7.4%
[11:02:49][D][web_server_base:080][async_tcp]: OTA in progress: 10.6%
[11:02:50][D][web_server_base:080][async_tcp]: OTA in progress: 14.2%
[11:02:51][D][web_server_base:080][async_tcp]: OTA in progress: 18.5%
[11:02:52][D][web_server_base:080][async_tcp]: OTA in progress: 22.5%
[11:02:53][D][web_server_base:080][async_tcp]: OTA in progress: 26.0%
[11:02:54][D][web_server_base:080][async_tcp]: OTA in progress: 29.8%
[11:02:55][D][web_server_base:080][async_tcp]: OTA in progress: 34.2%
[11:02:56][D][web_server_base:080][async_tcp]: OTA in progress: 37.8%
[11:02:57][D][web_server_base:080][async_tcp]: OTA in progress: 41.6%
[11:02:58][D][web_server_base:080][async_tcp]: OTA in progress: 46.3%
[11:02:59][D][web_server_base:080][async_tcp]: OTA in progress: 49.4%
[11:03:00][D][web_server_base:080][async_tcp]: OTA in progress: 53.7%
[11:03:01][D][web_server_base:080][async_tcp]: OTA in progress: 57.7%
[11:03:02][D][web_server_base:080][async_tcp]: OTA in progress: 61.9%
[11:03:03][D][web_server_base:080][async_tcp]: OTA in progress: 65.8%
[11:03:04][D][web_server_base:080][async_tcp]: OTA in progress: 69.5%
[11:03:05][D][web_server_base:080][async_tcp]: OTA in progress: 73.5%
[11:03:06][D][web_server_base:080][async_tcp]: OTA in progress: 77.3%
[11:03:07][D][web_server_base:080][async_tcp]: OTA in progress: 80.8%
[11:03:08][D][web_server_base:080][async_tcp]: OTA in progress: 84.8%
[11:03:09][D][web_server_base:080][async_tcp]: OTA in progress: 89.0%
[11:03:10][D][web_server_base:080][async_tcp]: OTA in progress: 92.5%
[11:03:11][D][web_server_base:080][async_tcp]: OTA in progress: 95.8%
[11:03:12][D][web_server_base:080][async_tcp]: OTA in progress: 99.4%
[11:03:13][I][web_server_base:089][async_tcp]: OTA update successful!
[11:03:13][I][app:132]: Rebooting safely...
[11:03:13][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:03:13][D][esp32.preferences:143]: Saving 1 preferences to flash: 1 cached, 0 written, 0 failed
[11:03:13][W][wifi_esp32:537][arduino_events]: Event: Disconnected ssid='My Network' bssid=XX:XX:XX:XX:F6:FA[redacted] reason='Association Leave'
[11:03:14]ets Jul 29 2019 12:21:46
[11:03:14]
[11:03:14]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[11:03:14]configsip: 0, SPIWP:0xee
[11:03:14]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[11:03:14]mode:DIO, clock div:2
[11:03:14]load:0x3fff0030,len:1184
[11:03:14]load:0x40078000,len:13132
[11:03:14]load:0x40080400,len:3036
[11:03:14]entry 0x400805e4
[11:03:14][ 72][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[11:03:15][ 521][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[11:03:15][I][logger:171]: Log initialized
[11:03:15][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[11:03:15][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:03:15][V][esp32.preferences:126]: sync: key: 233825507, len: 4
[11:03:15][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[11:03:15][I][app:029]: Running through setup()...
[11:03:15][V][app:030]: Sorting components by setup priority...
[11:03:15][C][light:021]: Setting up light 'flashlight'...
[11:03:15][D][light:036]: 'flashlight' Setting:
[11:03:15][D][light:041]: Color mode:
[11:03:15][C][esp32_ble:032]: Setting up BLE...
[11:03:15][C][wifi:048]: Setting up WiFi...
[11:03:15][C][wifi:061]: Starting WiFi...
[11:03:15][C][wifi:062]: Local MAC: XX:XX:B3:EC:XX:F4
[11:03:15][D][wifi:074]: Loaded saved wifi settings: My Network
[11:03:15][V][wifi_esp32:072]: Enabling STA.
[11:03:15][ 849][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[11:03:15][V][wifi_esp32:491][arduino_events]: Event: WiFi ready
[11:03:15][ 941][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[11:03:15][ 941][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START
[11:03:15][V][wifi_esp32:502][arduino_events]: Event: WiFi STA start
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 0
[11:03:16][V][esp32_ble_server:119]: Creating BLE service - 0x180A
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 7
[11:03:16][V][esp32_ble_server.characteristic:118]: Creating characteristic - 0x2A24
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 9
[11:03:16][V][esp32_ble_server.characteristic:118]: Creating characteristic - 0x2A26
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 9
[11:03:16][V][esp32_ble_server.characteristic:118]: Creating characteristic - 0x2A29
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 9
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 12
[11:03:16][D][esp32_ble_server:077]: BLE server setup successfully
[11:03:16][D][esp32_improv.component:082]: Creating Improv service
[11:03:16][V][esp32_ble_server:119]: Creating BLE service - 00467768-6228-2272-4663-277478268000
[11:03:16][V][esp32_ble:345]: (BLE) gatts_event [esp_gatt_if: 4] - 7
[11:03:18][ 3926][V][WiFiGeneric.cpp:381] _arduino_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 15
[11:03:18][ 3927][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 1 - SCAN_DONE
[11:03:18][V][wifi_esp32:496][arduino_events]: Event: WiFi Scan Done status=0 number=15 scan_id=128
[11:03:18][D][wifi:497]: Found networks:
[11:03:18][I][wifi:541]: - 'My Network' (XX:XX:XX:XX:F7:2A) [redacted]▂▄▆█
[11:03:18][D][wifi:542]: Channel: 5
[11:03:18][D][wifi:543]: RSSI: -41 dB
[11:03:18][I][wifi:541]: - 'My Network' (XX:XX:XX:XX:F6:FA) [redacted]▂▄▆█
[11:03:18][D][wifi:542]: Channel: 5
[11:03:18][D][wifi:543]: RSSI: -51 dB
[11:03:18][I][wifi:541]: - 'My Network' (XX:XX:XX:XX:F6:FE) [redacted]▂▄▆█
[11:03:18][D][wifi:542]: Channel: 5
[11:03:18][D][wifi:543]: RSSI: -68 dB
[11:03:18][D][wifi:546]: - ''[redacted] (E2:47:32:7C:F7:2A) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'Contaminated'[redacted] (DE:47:32:7C:F7:2A) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - ''[redacted] (E2:47:32:7C:F6:FA) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'Contaminated'[redacted] (DE:47:32:7C:F6:FA) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'Contaminated'[redacted] (DE:47:32:7C:F6:FE) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - ''[redacted] (E2:47:32:7C:F6:FE) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'H369A6A9823'[redacted] (00:4A:77:6A:98:23) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'Neigbours6'[redacted] (60:A4:B7:CD:05:9E) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'H369A09C8F9'[redacted] (D4:76:EA:09:C8:F9) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - ''[redacted] (66:A4:B7:CD:05:9E) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - ''[redacted] (B6:A7:B9:E2:25:56) [redacted]▂▄▆█
[11:03:18][D][wifi:546]: - 'Neigbours6'[redacted] (B0:A7:B9:E2:25:56) [redacted]▂▄▆█
[11:03:18][I][wifi:313]: WiFi Connecting to 'My Network'...
[11:03:18][V][wifi:315]: Connection Params:
[11:03:18][V][wifi:316]: SSID: 'My Network'
[11:03:18][V][wifi:319]: BSSID: XX:XX:XX:XX:F7:2A
[11:03:18][V][wifi:349]: Password: 'X4vbUWj70k0gySh9aNRd6cLd'[redacted]
[11:03:18][V][wifi:354]: Channel: 5
[11:03:18][V][wifi:363]: Using DHCP IP
[11:03:18][V][wifi:365]: Hidden: NO
[11:03:19][ 4766][V][WiFiGeneric.cpp:353] _arduino_event_cb(): STA Connected: SSID: My Network, BSSID: XX:XX:XX:XX:f7:2a, Channel: 5, Auth: WPA2_PSK
[11:03:19][ 4768][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[11:03:19][V][wifi_esp32:521][arduino_events]: Event: Connected ssid='My Network' bssid=XX:XX:XX:XX:F7:2A[redacted] channel=5, authmode=WPA2 PSK
[11:03:20][ 5428][V][WiFiGeneric.cpp:367] _arduino_event_cb(): STA Got New IP:192.1.1.28
[11:03:20][ 5428][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[11:03:20][ 5431][D][WiFiGeneric.cpp:991] _eventCallback(): STA IP: 192.1.1.28, MASK: 255.255.255.0, GW: 192.1.1.254
[11:03:20][V][wifi_esp32:575][arduino_events]: Event: Got IP static_ip=192.1.1.28 gateway=192.1.1.254
[11:03:20][I][wifi:617]: WiFi Connected!
[11:03:20][C][wifi:428]: Local MAC: XX:XX:B3:EC:XX:F4
[11:03:20][C][wifi:433]: SSID: 'My Network'[redacted]
[11:03:20][C][wifi:436]: IP Address: 192.1.1.28
[11:03:20][C][wifi:440]: BSSID: XX:XX:XX:XX:F7:2A[redacted]
[11:03:20][C][wifi:441]: Hostname: 'esphome-web-ecdaf4'
[11:03:20][C][wifi:443]: Signal strength: -44 dB ▂▄▆█
[11:03:20][V][wifi:445]: Priority: 0.0
[11:03:20][C][wifi:447]: Channel: 5
[11:03:20][C][wifi:448]: Subnet: 255.255.255.0
[11:03:20][C][wifi:449]: Gateway: 192.1.1.254
[11:03:20][C][wifi:450]: DNS1: 192.1.1.15
[11:03:20][C][wifi:451]: DNS2: 192.1.1.254
[11:03:20][D][wifi:626]: Disabling AP...
[11:03:20][C][web_server:100]: Setting up web server...
[11:03:20][W][mdns:020]: mDNS init failed: ESP_FAIL
[11:03:20][E][component:119]: Component mdns was marked as failed.
[11:03:20][E][component:164]: Component mdns set Error flag: unspecified
[11:03:20][C][api:026]: Setting up Home Assistant API server...
[11:03:20][I][app:062]: setup() finished successfully!
[11:03:20][W][component:170]: Component wifi cleared Warning flag
[11:03:20][W][component:157]: Component api set Warning flag: unspecified
[11:03:20][I][app:100]: ESPHome version 2024.11.0 compiled on Nov 21 2024, 10:58:32
[11:03:20][I][app:102]: Project esphome.web version dev
[11:03:20][C][wifi:600]: WiFi:
[11:03:20][C][wifi:428]: Local MAC: XX:XX:B3:EC:XX:F4
[11:03:20][C][wifi:433]: SSID: 'My Network'[redacted]
[11:03:20][C][wifi:436]: IP Address: 192.1.1.28
[11:03:20][C][wifi:440]: BSSID: XX:XX:XX:XX:F7:2A[redacted]
[11:03:20][C][wifi:441]: Hostname: 'esphome-web-ecdaf4'
[11:03:20][C][wifi:443]: Signal strength: -45 dB ▂▄▆█
[11:03:20][V][wifi:445]: Priority: 0.0
[11:03:20][C][wifi:447]: Channel: 5
[11:03:20][C][wifi:448]: Subnet: 255.255.255.0
[11:03:20][C][wifi:449]: Gateway: 192.1.1.254
[11:03:20][C][wifi:450]: DNS1: 192.1.1.15
[11:03:20][C][wifi:451]: DNS2: 192.1.1.254
[11:03:20][C][logger:185]: Logger:
[11:03:20][C][logger:186]: Level: VERBOSE
[11:03:20][C][logger:188]: Log Baud Rate: 115200
[11:03:20][C][logger:189]: Hardware UART: UART0
[11:03:20][C][gpio.output:010]: GPIO Binary Output:
[11:03:20][C][gpio.output:011]: Pin: GPIO4
[11:03:20][C][light:092]: Light 'flashlight'
[11:03:20][C][esp32_camera:048]: ESP32 Camera:
[11:03:20][C][esp32_camera:049]: Name: My ESP32-CAM
[11:03:20][C][esp32_camera:050]: Internal: NO
[11:03:20][C][esp32_camera:052]: Data Pins: D0:5 D1:18 D2:19 D3:21 D4:36 D5:39 D6:34 D7:35
[11:03:20][C][esp32_camera:053]: VSYNC Pin: 25
[11:03:20][C][esp32_camera:054]: HREF Pin: 23
[11:03:20][C][esp32_camera:055]: Pixel Clock Pin: 22
[11:03:20][C][esp32_camera:056]: External Clock: Pin:0 Frequency:20000000
[11:03:20][C][esp32_camera:060]: I2C Pins: SDA:26 SCL:27
[11:03:20][C][esp32_camera:062]: Reset Pin: -1
[11:03:20][C][esp32_camera:080]: Resolution: 640x480 (VGA)
[11:03:20][C][esp32_camera:129]: JPEG Quality: 10
[11:03:20][C][esp32_camera:130]: Framebuffer Count: 1
[11:03:20][C][esp32_camera:131]: Contrast: 0
[11:03:20][C][esp32_camera:132]: Brightness: 0
[11:03:20][C][esp32_camera:133]: Saturation: 0
[11:03:20][C][esp32_camera:134]: Vertical Flip: ON
[11:03:20][C][esp32_camera:135]: Horizontal Mirror: ON
[11:03:20][C][esp32_camera:136]: Special Effect: 0
[11:03:20][C][esp32_camera:137]: White Balance Mode: 0
[11:03:20][C][esp32_camera:140]: Auto Exposure Control: 1
[11:03:20][C][esp32_camera:141]: Auto Exposure Control 2: 0
[11:03:20][C][esp32_camera:142]: Auto Exposure Level: 0
[11:03:20][C][esp32_camera:143]: Auto Exposure Value: 300
[11:03:20][C][esp32_camera:144]: AGC: 1
[11:03:20][C][esp32_camera:145]: AGC Gain: 0
[11:03:20][C][esp32_camera:146]: Gain Ceiling: 0
[11:03:20][C][esp32_camera:152]: Test Pattern: NO
[11:03:20][C][psram:020]: PSRAM:
[11:03:20][C][psram:021]: Available: YES
[11:03:20][C][psram:024]: Size: 4095 KB
[11:03:20][C][esp32_ble:391]: ESP32 BLE:
[11:03:20][C][esp32_ble:393]: MAC address: A0:A3:B3:EC:DA:F6
[11:03:20][C][esp32_ble:394]: IO Capability: none
[11:03:20][C][esp32_ble_server:200]: ESP32 BLE Server:
[11:03:20][C][esp32_improv.component:269]: ESP32 Improv:
[11:03:20][C][esp32_improv.component:274]: Status Indicator: 'NO'
[11:03:20][C][captive_portal:089]: Captive Portal:
[11:03:20][C][web_server:153]: Web Server:
[11:03:20][C][web_server:154]: Address: esphome-web-ecdaf4.local:80
[11:03:20][C][mdns:116]: mDNS:
[11:03:20][C][mdns:117]: Hostname: esphome-web-ecdaf4
[11:03:20][V][mdns:118]: Services:
[11:03:20][V][mdns:120]: - _esphomelib, _tcp, 6053
[11:03:20][V][mdns:122]: TXT: friendly_name = Garage_camera
[11:03:20][V][mdns:122]: TXT: version = 2024.11.0
[11:03:20][V][mdns:122]: TXT: mac = a0a3b3ecdaf4
[11:03:20][V][mdns:122]: TXT: platform = ESP32
[11:03:20][V][mdns:122]: TXT: board = esp32dev
[11:03:20][V][mdns:122]: TXT: network = wifi
[11:03:20][V][mdns:122]: TXT: project_name = esphome.web
[11:03:20][V][mdns:122]: TXT: project_version = dev
[11:03:20][V][mdns:120]: - _http, _tcp, 80
[11:03:20][E][component:082]: Component mdns is marked FAILED
[11:03:21][C][esphome.ota:073]: Over-The-Air updates:
[11:03:21][C][esphome.ota:074]: Address: esphome-web-ecdaf4.local:3232
[11:03:21][C][esphome.ota:075]: Version: 2
[11:03:21][C][safe_mode:018]: Safe Mode:
[11:03:21][C][safe_mode:020]: Boot considered successful after 60 seconds
[11:03:21][C][safe_mode:021]: Invoke after 10 boot attempts
[11:03:21][C][safe_mode:023]: Remain in safe mode for 300 seconds
[11:03:21][C][api:140]: API Server:
[11:03:21][C][api:141]: Address: esphome-web-ecdaf4.local:6053
[11:03:21][C][api:145]: Using noise encryption: NO
[11:03:21][C][improv_serial:032]: Improv Serial:
[11:03:21][D][api:103]: Accepted 192.1.1.20
[11:03:21][V][api.connection:1428]: Hello from client: 'Home Assistant 2024.11.2' | 192.1.1.20 | API Version 1.10
[11:03:21][W][component:170]: Component api cleared Warning flag
[11:03:21][D][api.connection:1446]: Home Assistant 2024.11.2 (192.1.1.20): Connected successfully
[11:03:24][D][esp32_camera:196]: Got Image: len=19370
[11:03:34][D][esp32_camera:196]: Got Image: len=9640
[11:03:44][D][esp32_camera:196]: Got Image: len=9632
[11:03:51][W][api.connection:105]: Home Assistant 2024.11.2 (192.1.1.20): Connection closed
[11:03:51][V][api:116]: Removing connection to Home Assistant 2024.11.2
[11:03:51][W][component:157]: Component api set Warning flag: unspecified
[11:03:54][D][esp32_camera:196]: Got Image: len=9539
[11:04:04][D][esp32_camera:196]: Got Image: len=9265
[11:04:14][D][esp32_camera:196]: Got Image: len=9247
[11:04:15][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[11:04:15][D][esp32.preferences:114]: Saving 1 preferences to flash...
[11:04:15][V][esp32.preferences:126]: sync: key: 233825507, len: 4
[11:04:15][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[11:04:24][D][esp32_camera:196]: Got Image: len=9321
[11:04:34][D][esp32_camera:196]: Got Image: len=9281