Why does newly added ESP8266 not appear in HA?

I’ve just added a new esp8266 nodemcu to esphome. It’s showing up OK in the esphome dashboard, I can view the logs and all seems to fine. However, the device does not appear in the esphome integration, and, obviously, none of the entities appear. The other esp8266 devices appear OK.

I’ve rebooted the entire node, but nothing changes. All I can see in the logs is the following from homeassistant:

2023-08-07 12:36:46.852 ERROR (MainThread) [homeassistant.components.esphome.dashboard] Error requesting ESPHome Dashboard data: Cannot connect to host 127.0.0.1:63701 ssl:default [Connect call failed ('127.0.0.1', 63701)]
2023-08-07 12:36:46.861 ERROR (MainThread) [homeassistant.components.esphome.dashboard] Dashboard unavailable; skipping reauth: Cannot connect to host 127.0.0.1:63701 ssl:default [Connect call failed ('127.0.0.1', 63701)]

There’s nothing significant in the esphome addon log. It does send discovery info though.

[12:37:01] INFO: Starting ESPHome dashboard...
2023-08-07 12:37:04,493 INFO Starting dashboard web server on unix socket /var/run/esphome.sock and configuration dir /config/esphome...
[12:37:04] INFO: Starting NGINX...
[12:37:05] INFO: Successfully send discovery information to Home Assistant.
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023-08-07 12:39:07,680 INFO 304 GET / (0.0.0.0) 20.43ms
2023-08-07 12:39:07,796 INFO 200 GET /static/fonts/material-icons/material-icons.css?hash=ead4c276 (0.0.0.0) 20.74ms
2023-08-07 12:39:07,823 INFO 200 GET /static/css/esphome-2.css?hash=c222cb3b (0.0.0.0) 3.02ms
2023-08-07 12:39:07,842 INFO 200 GET /static/js/esphome/index-2bed5a1a.js (0.0.0.0) 12.95ms
2023-08-07 12:39:08,387 INFO 200 GET /static/images/logo-text.svg (0.0.0.0) 3.83ms
2023-08-07 12:39:08,394 INFO 304 GET /devices (0.0.0.0) 4.34ms
2023-08-07 12:39:08,445 INFO 200 GET /static/fonts/material-icons/MaterialIcons-Regular.woff2 (0.0.0.0) 9.34ms
2023-08-07 12:39:08,478 INFO 200 GET /static/js/esphome/c.b58cec5a.js (0.0.0.0) 74.68ms
2023-08-07 12:39:11,931 INFO 200 GET /static/js/esphome/c.5cd5d307.js (0.0.0.0) 7.40ms
2023-08-07 12:39:11,939 INFO 200 GET /static/js/esphome/c.8b0a585f.js (0.0.0.0) 5.00ms
2023-08-07 12:39:13,387 INFO 304 GET /devices (0.0.0.0) 2.44ms
2023-08-07 12:39:18,387 INFO 304 GET /devices (0.0.0.0) 2.89ms
2023-08-07 12:41:47,496 INFO 200 GET /devices (0.0.0.0) 3.97ms
2023-08-07 12:46:47,491 INFO 200 GET /devices (0.0.0.0) 2.35ms
2023-08-07 12:51:47,495 INFO 200 GET /devices (0.0.0.0) 3.78ms
2023-08-07 12:56:47,489 INFO 200 GET /devices (0.0.0.0) 2.22ms

Did you also add it? (as Integration?) :point_down:

You will also need to go to the “Devices & Services” and click on.
1

Then. Type in “esphome” and click to add.

2

Then. Add the IP address of the ESP module.
3

Then your done.

Doh! I knew that, I’ve added plenty of esphome devices before.
Thanks all - senior moment.

Brain fart… It happens to the best of us!

To avoid this in the future, use mDNS in your ESPHome device config (the devices YAML), or better don’t disable it. The ESPHome integration (the integration in HA) needs mDNS to automatically discover the devices. :slight_smile:

Thanks. That works when the devices are on the same LAN segment. Unfortunately, sone of mine are on the other side of a router (in one case across a VPN) and setting up mDNS across VPNs and multiple segments is non-trivial.