Hi, I’m getting the following warning when installing updates from ESPHome Builder:
WARNING Can’t connect to ESPHome API for sonoff-14 @ 192.168.2.97: Error while starting connection: Starting connection cancelled (APIConnectionCancelledError)
This is happening with all the devices associated to HASS via ESPHome, and started after installing the latest version.
I didn’t say I have the exact same message. I said I have the same error. I’m not sure why my error is different if my error message and referenced error object are the same.
WARNING Can't connect to ESPHome API for esp32-light @ 192.168.X.XX: Error while starting connection: Starting connection cancelled (APIConnectionCancelledError)
My network is running on eero devices. There has not been an update to the software recently. This device was on the network operating normally for the last 2 months without any issues or warnings in the logs. I updated to the latest version of ESPHome, and then this error popped up on first boot from that update.
If it is in fact a networking issue, is there something I can do? Longer timeout for the api object?
I get the same error (maybe since last ESPHome update).
Here some more log:
======================== [SUCCESS] Took 239.47 seconds ========================
INFO Successfully compiled program.
INFO Connecting to 192.168.188.157 port 3232...
INFO Connected to 192.168.188.157
INFO Uploading /data/build/esp-ultrasonic/.pioenvs/esp-ultrasonic/firmware.bin (918816 bytes)
Uploading: [============================================================] 100% Done...
INFO Upload took 18.55 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.188.157 using esphome API
INFO Successfully resolved esp-ultrasonic @ 192.168.188.157 in 0.000s
WARNING Can't connect to ESPHome API for esp-ultrasonic @ 192.168.188.157: Error while starting connection: Starting connection cancelled (APIConnectionCancelledError)
INFO Trying to connect to esp-ultrasonic @ 192.168.188.157 in the background
INFO Successfully resolved esp-ultrasonic @ 192.168.188.157 in 0.000s
INFO Successfully connected to esp-ultrasonic @ 192.168.188.157 in 0.219s
INFO Successful handshake with esp-ultrasonic @ 192.168.188.157 in 0.096s
[15:49:02][I][app:164]: ESPHome version 2025.7.0 compiled on Jul 18 2025, 15:45:57
[15:49:02][C][wifi:613]: WiFi:
[15:49:02][C][wifi:434]: Local MAC: 3C:8A:1F:5D:9A:10
[15:49:02][C][wifi:439]: SSID: [redacted]
[15:49:02][C][wifi:442]: IP Address: 192.168.188.157
[15:49:02][C][wifi:446]: BSSID: [redacted]
[15:49:02][C][wifi:446]: Hostname: 'esp-ultrasonic'
Either ignore the error message (if it only shows up once at update time and everything is working fine after, it might be a timing issue with the device not being ready when it tries the first time, since it just started) or answer all the questions to get help, but it does sound like a timing issue.
Its a harmless race that the device came online right as it was trying to connect so it canceled the stalled attempt and reconnected right away. We should downgrade that to something other than a warning now that 2025.7.x is faster at reconnecting so its more likely to happen (which is a good thing overall).