I am trying to connect up an esp32 devkit v4 to home assistant via ESPhome, but when I restart the esp32 the red bar in Home Assistant stays red (does not go green) - i.e. it does not connect.
the closest match I can find in the list of supported boards is the following: PlatformIO Registry
is a
DOIT ESP DEVKIT V1
(When I use that board type in the Arduino IDE to build a non-Home Assistant project it works).
Here is my yaml file:
esphome:
name: esphome-garage-door
platform: ESP32
board: esp32doit-devkit-v1#esp32:
#board: esp32doit-devkit-v1
#framework:
#type: arduino#Enable logging
logger:#Enable Home Assistant API
api:
encryption:
key: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=”ota:
password: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password#Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: “Esphome-Garage-Door”
password: “xxxxxxxxxxxx”captive_portal:
and here are the results of the log following the install and a reset of the ESP32 board:
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
[I][logger:243]: Log initialized
[C][ota:461]: There have been 0 suspected unsuccessful boot attempts.
[D][esp32.preferences:113]: Saving 1 preferences to flash…
[D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[I][app:029]: Running through setup()…
[C][wifi:037]: Setting up WiFi…
[D][wifi:373]: Starting scan…
[D][wifi:388]: Found networks:
[I][wifi:432]: - ‘xxxxxx’ [redacted]▂▄▆█
[D][wifi:433]: Channel: 3
[D][wifi:434]: RSSI: -33 dB
[I][wifi:432]: - ‘xxxxxx’ [redacted]▂▄▆█
[D][wifi:433]: Channel: 3
[D][wifi:434]: RSSI: -64 dB
[I][wifi:432]: - ‘xxxxxx’ [redacted]▂▄▆█
[D][wifi:433]: Channel: 3
[D][wifi:434]: RSSI: -64 dB
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[D][wifi:437]: - [redacted] [redacted]▂▄▆█
[I][wifi:248]: WiFi Connecting to ‘xxxxxx’…
[I][wifi:505]: WiFi Connected!
[C][wifi:353]: Local MAC: xx:xx:xx:xx:xx:xx
[C][wifi:354]: SSID: [redacted]
[C][wifi:355]: IP Address: 192.168.xxx.xxx
[C][wifi:357]: BSSID: [redacted]
[C][wifi:358]: Hostname: ‘esphome-garage-door’
[C][wifi:360]: Signal strength: -31 dB ▂▄▆█
[C][wifi:364]: Channel: 3
[C][wifi:365]: Subnet: 255.255.255.0
[C][wifi:366]: Gateway: 192.168.xxx.x
[C][wifi:367]: DNS1: 192.168.xxx.x
[C][wifi:368]: DNS2: 0.0.0.0
[D][wifi:514]: Disabling AP…
[C][ota:085]: Over-The-Air Updates:
[C][ota:086]: Address: esphome-garage-door.local:3232
[C][ota:089]: Using Password.
[C][api:025]: Setting up Home Assistant API server…
[I][app:062]: setup() finished successfully!
[I][app:102]: ESPHome version 2022.8.3 compiled on Sep 11 2022, 15:18:49
[C][wifi:491]: WiFi:
[C][wifi:353]: Local MAC: xx:xx:xx:xx:xx:xx
[C][wifi:354]: SSID: [redacted]
[C][wifi:355]: IP Address: 192.168.xxx.xx1
[C][wifi:357]: BSSID: [redacted]
[C][wifi:358]: Hostname: ‘esphome-garage-door’
[C][wifi:360]: Signal strength: -32 dB ▂▄▆█
[C][wifi:364]: Channel: 3
[C][wifi:365]: Subnet: 255.255.255.0
[C][wifi:366]: Gateway: 192.168.xxx.x
[C][wifi:367]: DNS1: 192.168.xxx.x
[C][wifi:368]: DNS2: 0.0.0.0
[C][logger:275]: Logger:
[C][logger:276]: Level: DEBUG
[C][logger:277]: Log Baud Rate: 115200
[C][logger:278]: Hardware UART: UART0
[C][captive_portal:088]: Captive Portal:
[C][mdns:094]: mDNS:
[C][mdns:095]: Hostname: esphome-garage-door
[C][ota:085]: Over-The-Air Updates:
[C][ota:086]: Address: esphome-garage-door.local:3232
[C][ota:089]: Using Password.
[C][api:138]: API Server:
[C][api:139]: Address: esphome-garage-door.local:6053
[C][api:141]: Using noise encryption: YES
The signal strength for the network I am connecting to seems good and there are no errors that I can see in the log that indicate what the problem might be.
I have double-checked the firewall rules and the IP addresses of the Home Assistant box (Raspberry PI) and the ESP32 board have access to each other.
I also tried changing the board to
esp32dev
but still no love.
Also, once the ESP32 restarts although it doesn’t connect to Home Assistant, I can successfully ping it from another computer.
Any guidance or support would be appreciated.