ESPHome device is unavailable in Home Assistant, wrong IP?

I have a PIR sensor on a Wemos D1 Mini running ESPHome. The web_server: component is in the yaml file.
When I go to the web page I can see the binary_sensor for the PIR go off and on as I wave my hand in front of it.

However in Home Assistant- Developer Tools, the device is “unavailable”.

This device had been working many months until today

Watching the webpage log scroll by, I saw this:
1:58:01 [W] [api.connection:089] 192.168.1.57: Reading failed: BAD_INDICATOR errno=11

That is the IP of my Home Assistant server, but I don’t know what the warning message is trying to tell me.

I also restarted Home Assitant and rebooting the router. Any ideas why or where I should be looking?

Do you have this in your YAML? and is all of your esphome up to date?

# Enable Home Assistant API
api:
  encryption:
    key: !secret encryption_key

this part is a password in the secret file

!secret encryption_key

Yes. This first presented while I was updating all 50 of my ESPHome devices. One at a time. I usually update everything pretty quickly except for my ESPHome devices because invariably one of them is going to give me some grief, and I want to control when I troubleshoot it.

So far I have only had to dismantle one to re-flash over the UART, (about average)… But, I have never had one go “unavailable”. I thought it may be an mDNS problem which is why I rebooted the router to clear the mDNS cache. But that is the limit of my knowledge of mDNS.

If your webpage is up, you can reflash it ota.
go to esphome/install and hit ‘download’

then go to the webpage, and upload your previously download bin file :wink:

Are we talking in general or to my specific problem of one device persistently “unavailable”? In my narrative where I said that one device had to be re-flashed over the UART, that one failed during OTA and went dark and wouldn’t even respond to a ping.

well, you stated:

so if the web interface is available, you can reflash it…and that is in general

Yes, I can and did try re-flashing the device. It’s still “unavailable”.

Delete it from settings/devices&servies/esphome
and restart ?
It should re-detect :thinking:

Thanks. That worked.