-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESPHome devices Entities Unavailable after Updating to 2021.10 #58143
Comments
esphome documentation |
Hey there @OttoWinter, @jesserockz, mind taking a look at this issue as it has been labeled with an integration ( |
I remove all the esp devices and restarted the host machine of HA and After re Building the image selecting " clean build" restart the add-on "install" on esp device. There are no more errors and i manage to re configure the esp devices. not sure what cause this in the first place. |
The problem appears again after each update / flash of the nodes . After the the nodes update, all ESPHome entity's stay unavailable. Removing the node that has encryption enabled from the HA integrations then restart HA from the Configuration /Server Controls and re add the node from the discovery notification there is no error on the logs and all the ESPHome entity's 'are providing there data correctly . It looks to be a problem with the API reconnection if the node has encryption enabled. |
You need to open this issue again if it is not solved. I have seen similar issues after enabling encryption. If I do an update all in the ESPHome addon, all the nodes update and communicate with the addon without issue. However some random nodes fail to reconnect to the Home Assistant integration and require reloading of the integration for that node. Then they function as expected. There is no common factor that I can see. Different devices every time, different board types, no one particular component used. |
I'm seeing the same behaviour. Making a change to the code on a node and refreshing it causes it to show as unavailable in HomeAssistant. Fix is to remove the node and re-add it. It's a big tedious for development! |
Oh, I hadn't tried that! That's a lot less effort than pasting in the encryption key and API key again and again! |
I saw this "unavailable" behavior when I updated my nodes to switch from the use of passwords to using encryption (they are functionally redundant). I found my devices stopped working even though ESPHome saw them as fine. I noticed that in my ".storage/core.config_entries" file the password was still there even though I didn't have it configured anymore. When I replaced the password with a blank string on my devices that are using encryption and restarted HA the problem disappeared. That being said, I am seeing serious issues when I use encryption, devices rebooting frequently and taking a long time to come back online, so I am moving back to passwords. |
To chime in on this; I just moved all of my ESPHOME devices off of encryption, as I having to restart HA at random to make it work. Sadly, there are no errors in the logs to help debug this. |
I also found out that some of my nodes are no longer available. These are ESPHome nodes that were working reliable since day one.
This is just a grep for a specific IP although there are several nodes affected an the logs are interlaced. |
I have an issue that is similar or the same to this, every time I restart home-assistant the second ESPHome device I've added (I have two in total) becomes unavailable and requires me to remove and re-add it. After re-adding it it works again straight away and picks up where it left off (including historic data) Error in the log is the same:
My other ESPHome device does not suffer from this issue, I assume because this is the first device I've added. They're otherwise identical smart power plug (same firmware too) |
have this issue with some boards, too. Need to reload integration, which is annoying |
I updated 3 different HA instances to 2021.12.5 recently, and on two of them I've had a couple of ESPHome nodes go "unavailable" in HA even though they remain pingable and accessible via their web interface. The only thing that corrected the issue was to reload the integration in HA. I've never had to do this before upgrading. |
My observation related to this, using encryption:
This makes me think that the issue is caused by the fact that when HA periodically queries the node via api, if the query happens during an OTA transfer, the entities go unavailable immediately and never come back. If the OTA transfer is fast enough so that it can slip in between 2 queries of the API, no problem occurs. I think there must be something related to API behavior during an OTA transfer. |
I had the same problem as described here. {
"entry_id": "7a1fbc9dd804182d5e3a429e68375e4a",
"version": 1,
"domain": "esphome",
"title": "Loft syd hub",
"data": {
"host": "192.168.1.100",
"port": 6053,
"password": "",
"noise_psk": ""
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "zeroconf",
"unique_id": "gaestevaerelse",
"disabled_by": null
}, The old ip was still listed there, for the other ESP's the IP was updated automatically. I did however notice a hint of a pattern I was just thinking if you doo a string comparison of "192.168.1.100" and "192.168.1.10", but only consider the lentgh of the latter one. It will claim a match... Just thinking. |
looks like it is fixed in Home Assistant 2022.3.7 ESPHome device did not require manual reload and all the sensors are updating normally. |
I updated 2x Gosund SP112 with the |
2022.3.7 was the Home Assistant version not the ESPHome. Currently i am on HA 2022.3.8 with a ESPHome 2022.3.2 and the problem has not re appeared. |
The problem
All the Entities of any ESPHome Device has stop updating and are now Unavailable.
After updating ESPHome to 2021.10 HA has start to log an error in the logs and dose not update any data (related to ESPHome devices)
What is version of Home Assistant Core has the issue?
core-2021.10.6
What was the last working version of Home Assistant Core?
core-2021.10.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
ESPHome
Link to integration documentation on our website
https://www.home-assistant.io/integrations/esphome/
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
In one of the ESPHome devices i also enable the encryption option and HA asked me to reconfigured twice.
The text was updated successfully, but these errors were encountered: