New Device - cannot and connect to HA ("Can't connect to ESP. Please make sure your YAML file contains an 'api:' line.")

esphome:
name: test
friendly_name: Test

esp32:
board: esp32dev
framework:
type: arduino

Enable logging

logger:

Enable Home Assistant API

api:
encryption:
key: “ABrYErnLsPRSwOXHOfQikleaWe9HPDIFH5K+JFArsRQ=”

ota:
password: “1aa6b4c0a4892312fa3576cb4115e9b0”

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Test Fallback Hotspot”
password: “iGVDtIGjQ389”
manual_ip:
static_ip: 192.168.4.190
gateway: 192.168.4.1
subnet: 255.255.255.0
web_server:
port: 80
captive_portal:

INFO ESPHome 2024.3.2 INFO Reading configuration /config/esphome/test.yaml… INFO Generating C++ source… INFO Compiling app… Processing test (board: esp32dev; framework: arduino; platform: platformio/[email protected]) -------------------------------------------------------------------------------- HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5 Dependency Graph |-- AsyncTCP-esphome @ 2.1.3 |-- WiFi @ 2.0.0 |-- FS @ 2.0.0 |-- Update @ 2.0.0 |-- ESPAsyncWebServer-esphome @ 3.1.0 |-- DNSServer @ 2.0.0 |-- ESPmDNS @ 2.0.0 |-- noise-c @ 0.1.4 |-- ArduinoJson @ 6.18.5 RAM: [= ] 12.4% (used 40608 bytes from 327680 bytes) Flash: [===== ] 49.7% (used 912769 bytes from 1835008 bytes) ========================= [SUCCESS] Took 7.18 seconds ========================= INFO Successfully compiled program. esptool.py v4.7.0 Serial port /dev/ttyUSB1 Connecting… Chip is ESP32-D0WDQ6 (revision v1.0) Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 24:6f:28:7a:07:50 Uploading stub… Running stub… Stub running… Changing baud rate to 460800 Changed. Configuring flash size… Auto-detected Flash size: 4MB Flash will be erased from 0x00010000 to 0x000f0fff… Flash will be erased from 0x00001000 to 0x00005fff… Flash will be erased from 0x00008000 to 0x00008fff… Flash will be erased from 0x0000e000 to 0x0000ffff… Compressed 918544 bytes to 610341… Wrote 918544 bytes (610341 compressed) at 0x00010000 in 14.2 seconds (effective 519.0 kbit/s)… Hash of data verified. Compressed 17440 bytes to 12128… Wrote 17440 bytes (12128 compressed) at 0x00001000 in 0.6 seconds (effective 218.8 kbit/s)… Hash of data verified. Compressed 3072 bytes to 144… Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.1 seconds (effective 455.1 kbit/s)… Hash of data verified. Compressed 8192 bytes to 47… Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 533.8 kbit/s)… Hash of data verified. Leaving… Hard resetting via RTS pin… INFO Successfully uploaded program. INFO Starting log output from /dev/ttyUSB1 with baud rate 115200 [16:20:27][I][logger:158]: Log initialized [16:20:27][C][ota:483]: There have been 2 suspected unsuccessful boot attempts. [16:20:27][D][esp32.preferences:114]: Saving 1 preferences to flash… [16:20:27][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed [16:20:27][I][app:029]: Running through setup()… [16:20:27][C][wifi:038]: Setting up WiFi… [16:20:27][C][wifi:051]: Starting WiFi… [16:20:27][C][wifi:052]: Local MAC: 24:6F:28:7A:07:50 [16:20:27][D][wifi:462]: Starting scan… [16:20:27][W][wifi:152]: Warning set: unspecified [16:20:33][D][wifi:477]: Found networks: [16:20:33][I][wifi:521]: - ‘Magnolia’ (EC:74:27:F7:B2:65) [redacted]▂▄▆█ [16:20:33][D][wifi:522]: Channel: 6 [16:20:33][D][wifi:523]: RSSI: -46 dB [16:20:33][I][wifi:521]: - ‘Magnolia’ (EC:74:27:FA:75:25) [redacted]▂▄▆█ [16:20:33][D][wifi:522]: Channel: 6 [16:20:33][D][wifi:523]: RSSI: -69 dB [16:20:33][I][wifi:521]: - ‘Magnolia’ (78:76:89:8B:52:B4) [redacted]▂▄▆█ [16:20:33][D][wifi:522]: Channel: 6 [16:20:33][D][wifi:523]: RSSI: -76 dB [16:20:33][D][wifi:526]: - ‘HP-Print-AA-ENVY 4500 series’[redacted] (50:65:F3:FE:C8:AA) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘Magnolia_Guest’[redacted] (EC:74:27:F7:B2:6B) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘’[redacted] (EC:74:27:F7:B2:63) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘’[redacted] (EC:74:27:F7:B2:67) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘’[redacted] (EC:74:27:FA:75:27) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘Magnolia_Guest’[redacted] (EC:74:27:FA:75:2B) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘’[redacted] (EC:74:27:FA:75:23) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘’[redacted] (78:76:89:8B:52:B2) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘’[redacted] (78:76:89:8B:52:B6) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘Magnolia_Guest’[redacted] (78:76:89:8B:52:BA) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘JumpToc’[redacted] (7C:2E:BD:95:6A:E1) [redacted]▂▄▆█ [16:20:33][D][wifi:526]: - ‘SouthernMews’[redacted] (E4:F4:C6:10:F7:1A) [redacted]▂▄▆█ [16:20:33][I][wifi:303]: WiFi Connecting to ‘Magnolia’… [16:20:34][I][wifi:594]: WiFi Connected! [16:20:34][C][wifi:408]: Local MAC: 24:6F:28:7A:07:50 [16:20:34][C][wifi:413]: SSID: ‘Magnolia’[redacted] [16:20:34][C][wifi:416]: IP Address: 192.168.4.190 [16:20:34][C][wifi:420]: BSSID: EC:74:27:F7:B2:65[redacted] [16:20:34][C][wifi:421]: Hostname: ‘test’ [16:20:34][C][wifi:423]: Signal strength: -44 dB ▂▄▆█ [16:20:34][C][wifi:427]: Channel: 6 [16:20:34][C][wifi:428]: Subnet: 255.255.255.0 [16:20:34][C][wifi:429]: Gateway: 192.168.4.1 [16:20:34][C][wifi:430]: DNS1: 0.0.0.0 [16:20:34][C][wifi:431]: DNS2: 0.0.0.0 [16:20:34][D][wifi:603]: Disabling AP… [16:20:34][C][web_server:124]: Setting up web server… [16:20:34][C][ota:096]: Over-The-Air Updates: [16:20:34][C][ota:097]: Address: 192.168.4.190:3232 [16:20:34][C][ota:100]: Using Password. [16:20:34][C][ota:103]: OTA version: 2. [16:20:34][W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts [16:20:34][C][api:025]: Setting up Home Assistant API server… [16:20:34][I][app:062]: setup() finished successfully! [16:20:34][W][wifi:165]: Warning cleared [16:20:34][W][api:152]: Warning set: unspecified [16:20:34][I][app:102]: ESPHome version 2024.3.2 compiled on Apr 8 2024, 16:03:08 [16:20:34][C][wifi:580]: WiFi: [16:20:34][C][wifi:408]: Local MAC: 24:6F:28:7A:07:50 [16:20:34][C][wifi:413]: SSID: ‘Magnolia’[redacted] [16:20:34][C][wifi:416]: IP Address: 192.168.4.190 [16:20:34][C][wifi:420]: BSSID: EC:74:27:F7:B2:65[redacted] [16:20:34][C][wifi:421]: Hostname: ‘test’ [16:20:34][C][wifi:423]: Signal strength: -45 dB ▂▄▆█ [16:20:34][C][wifi:427]: Channel: 6 [16:20:34][C][wifi:428]: Subnet: 255.255.255.0 [16:20:34][C][wifi:429]: Gateway: 192.168.4.1 [16:20:34][C][wifi:430]: DNS1: 0.0.0.0 [16:20:34][C][wifi:431]: DNS2: 0.0.0.0 [16:20:34][C][logger:166]: Logger: [16:20:34][C][logger:167]: Level: DEBUG [16:20:34][C][logger:169]: Log Baud Rate: 115200 [16:20:34][C][logger:170]: Hardware UART: UART0 [16:20:34][C][captive_portal:088]: Captive Portal: [16:20:34][C][web_server:169]: Web Server: [16:20:34][C][web_server:170]: Address: 192.168.4.190:80 [16:20:34][C][mdns:115]: mDNS: [16:20:34][C][mdns:116]: Hostname: test [16:20:34][C][ota:096]: Over-The-Air Updates: [16:20:34][C][ota:097]: Address: 192.168.4.190:3232 [16:20:34][C][ota:100]: Using Password. [16:20:34][C][ota:103]: OTA version: 2. [16:20:34][W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts [16:20:34][C][api:139]: API Server: [16:20:34][C][api:140]: Address: 192.168.4.190:6053 [16:20:34][C][api:142]: Using noise encryption: YES
I am stumped…

1 Like