Closed truglodite closed 9 months ago
I do have the same issue. Most likely the same issue as https://github.com/home-assistant/core/issues/58143.
I have the same problem. If I add a new esphome device with encryption key, the device is disconnected from the API after a while so i lose any entity data. The device will be connected to the wifi and available for OTA. Unfortunately to see entities back again, I must delete the device and add it again. Few minutes later it will be disconnected again. No matter if I restart manually, it will not login back to the API.
Removing the encryption key from the API resolved the issue.
I'm not sure but I think the problem is related with 2021.12.3 because with 2021.12.0 I had no issues.
My encryption API is blank and have same issue, have two esp but one after reboot HA makes entity not available, when reboot couple times HA entity show up... log show everything ok but entity not available. `logger:
api:
ota: password:`
My encryption API is blank and have same issue, have two esp but one after reboot HA makes entity not available, when reboot couple times HA entity show up... log show everything ok but entity not available. `logger:
Enable Home Assistant API
api:
ota: password:`
are you able to make ota updates?
esp is online and visible on HA espHome integration. I able to read logs without problems, yes ota updates work perfect but when i reboot HA all entities shows not available, after i reboot HA several times or disconect power from raspberry pi 3 server entities show up when I am lucky... only problem with one device. I make full backup HA and instal fresh system on SD card restore backup and nothing change ;(
seems the same problem but without encryption I temporary solved it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Sadly this issue persists, one of my sensors just stopped working and now its entities won't be recognized.
It shows up in the WebGUI as online, i can see the log output , do OTA Updates, and it actually tries to send the messages to Home Assistant, but it does not show data when i have a look at the entities.
this is part of my .yaml, theres no encryption setup and while booting it says
Using noise encryption: NO
# Enable Home Assistant API
api:
password: !secret xxxapipw
ota:
password: !secret xxxotapw
Home Assistant 2022.9.4
Supervisor 2022.10.2
Operating System 8.4
ESPHome 2022.3.1
tries to send the messages to Home Assistant
That doesn't actually make sense. The connection is from the HA side, so can you verify that HA is able to connect to the device?
That doesn't actually make sense. The connection is from the HA side
ah okay, i thought it always publishes the message when it reads the sensors, thx for that clarification
sometimes theres something like "HA connected" and after a short time "connection dropped" (can't remember the exact phrase right now), so i guess that's it
can you verify that HA is able to connect to the device?
i can OTA new firmware on it,can see the log in realtime via the HA Addon, and also it shows up as "online" in the ESPHome dashboard
And none of those last things has anything to do with HA. You need to check the ha logs for why it's disconnecting.
I'm facing several problems with the api encryption (like one said in https://github.com/home-assistant/core/issues/80813). Even updating the api-key or reloading the entity the problem persists. I've been keeping encryption turned off so I can use the devices normally.
There were a few bugs in the aioesphomeapi code that failed to correctly report encryption configuration and incorrect keys that were fixed in the last few months. If you haven't had a chance to try it again and want to do encryption, you should get a much better experience now.
Hi Bradco, thanks for your answer. We will try and let you know!
The problem
One of my particular esphome devices was having consistent problems with entities showing up as "unavailable" in HA (hassos on a pi4-4gb), despite the device appearing to work fine in the esphome webui. I tried hacking storage files and replacing the device/entities, but the issue kept returning.
In the process of troubleshooting, I tried disabling encryption on the device in question. This seems to have fixed the problem altogether, as the device has gone now a week without issues (after many HA reboots that would have triggered it before). So I am assuming there is a bug/incompatibility with encryption and some of the other features I have implemented on the device. FWIW, I have many other esphome devices that are using encryption without an issue, but the device that is failing does have other features (mainly sensors) enabled that none of the others have.
I'm not familiar enough with esphome and the related coding languages to be able to help fix this, other than providing info/logs etc. Please let me know if there's something else I can provide to help here.
Which version of ESPHome has the issue?
2021.12.3
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2021.12.7
What platform are you using?
ESP8266
Board
wemos d1 mini
Component causing the issue
encryption
Example YAML snippet