Can't connect to ESPHome API for <hostname> Errno -5

Creating my first ESP8266-based device in ESPHome and running into a communication problem between ESPHome Add-On and the ESP8266 device.

I can ping the device at its static IP, and can monitor its log data from ESPHome Web Dashboard.

When I try to view log data from the ESPHome Add-On within Home Assistant, I get the below log output.

Questions:

  • Is there a way to set an IP address in the configuration file, so ESPHome Add-On knows where to look?

INFO ESPHome 2024.5.4
INFO Reading configuration /config/esphome/ir-sensor-1.yaml…
INFO Starting log output from ir-sensor-1.local using esphome API
WARNING Can’t connect to ESPHome API for ir-sensor-1.local: Error resolving IP address: [Errno -5] No address associated with hostname (APIConnectionError)
INFO Trying to connect to ir-sensor-1.local in the background

It’s most likely a mDNS issue. You can try enabling this in the add-on options:

Thanks for the reply.

The “use ping for status” box is checked in my ESPHome Add-On Configuration tab.

Can you recommend any other configuation adjustment?

Want to add 2 things here:

  1. My overall objective is to enable OTA updates via ESPHome Add-On so that I can iteratively improve the device capability.

  2. Home Assistant can see the device intermittently, and i can see in the device log (via ESPHome Web Dashboard) that the device is connected at least temporarily to Home Assistant.

I am successfully online with my device in ESPHome Add On now.

Here are the additional things I did: