Hello all, I’m very new to ESPHome so apologies for my lack of understanding.
Trying tutorials online, I wasn’t able to connect to initially my network with the device. I was getting this error:
INFO ESPHome 2023.11.2
INFO Reading configuration /config/esphome/pondswitch.yaml...
INFO Starting log output from pondswitch.local using esphome API
WARNING Can't connect to ESPHome API for pondswitch: Error resolving IP address: [Errno -5] No address associated with hostname (APIConnectionError)
INFO Trying to connect to pondswitch in the background
I was able to get the device discovered by:
- Enabled “use ping for status”
- Added a static DNS
Now it seems to be discovered on ESPHome, however I’m not able to configure it. I get the error: “Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.”
here is the log:
INFO ESPHome 2023.11.2
INFO Reading configuration /config/esphome/pondswitch.yaml...
INFO Starting log output from 192.168.20.88 using esphome API
INFO Successfully connected to 192.168.20.88 in 3.367s
INFO Successful handshake with 192.168.20.88 in 0.123s
[20:58:53][I][app:102]: ESPHome version 2023.11.2 compiled on Nov 23 2023, 20:57:52
[20:58:53][C][wifi:559]: WiFi:
[20:58:53][C][wifi:391]: Local MAC: C8:F0:9E:EB:FF:00
[20:58:53][C][wifi:396]: SSID: [redacted]
[20:58:53][C][wifi:397]: IP Address: 192.168.20.88
[20:58:53][C][wifi:399]: BSSID: [redacted]
[20:58:53][C][wifi:400]: Hostname: 'pondswitch'
[20:58:53][C][wifi:402]: Signal strength: -83 dB ▂▄▆█
[20:58:53][C][wifi:406]: Channel: 13
[20:58:53][C][wifi:407]: Subnet: 255.255.255.0
[20:58:53][C][wifi:408]: Gateway: 192.168.20.1
[20:58:53][C][wifi:409]: DNS1: 0.0.0.0
[20:58:53][C][wifi:410]: DNS2: 0.0.0.0
[20:58:53][C][logger:416]: Logger:
[20:58:53][C][logger:417]: Level: DEBUG
[20:58:53][C][logger:418]: Log Baud Rate: 115200
[20:58:53][C][logger:420]: Hardware UART: UART0
[20:58:53][C][mdns:115]: mDNS:
[20:58:53][C][mdns:116]: Hostname: pondswitch
[20:58:53][C][ota:097]: Over-The-Air Updates:
[20:58:53][C][ota:098]: Address: 192.168.20.88:3232
[20:58:53][C][ota:101]: Using Password.
[20:58:53][C][api:139]: API Server:
[20:58:53][C][api:140]: Address: 192.168.20.88:6053
[20:58:53][C][api:142]: Using noise encryption: YES
[21:03:20][I][ota:117]: Boot seems successful, resetting boot loop counter.
[21:03:20][D][esp32.preferences:114]: Saving 1 preferences to flash...
[21:03:20][D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
esphome:
name: pondswitch
friendly_name: PondSwitch
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "Nd73uoGqel23teoP9dZ8LDGOyUnT7CzyrwFI4rGgtqg="
ota:
password: "e08da02f6560338f57fc0e4d19d21cb8"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.20.88
gateway: 192.168.20.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Pondswitch Fallback Hotspot"
password: "guNgvPbvlMc1"
captive_portal:
Note I can successfully ping 192.168.20.88 and pondswitch.local