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
Device keeps disconnecting from Home Assistant if too many entities #3020
Comments
I performed some tests to find out the limits. Configuration:
Perhaps with so many devices the "loop" becomes too slow to handle the communications in parallel? |
Can you get serial logs? You might find out you're running out of memory or stack. |
I can not see much difference in the logs: Serial.log |
Ok, so it's not crashing. |
Yes there are:
obviously the data is not arriving to HA...? |
I wonder if the timeout on the HA side is too short or if the ESP is getting stuck sending it. |
Is there a way to easily change the timeouts, so that I try and test? |
I don't know. You would have to look at the https://github.com/esphome/aioesphomeapi code. In the README there's example code you could test with. |
Hey there @OttoWinter, mind taking a look at this issue as it has been labeled with an integration ( |
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. |
I have exactly the same problem, although with much fewer devices https://gist.github.com/chrismazanec/f296009e15223ef355656077deadb4f5 edit; found the issue, in my case this was caused by ssd1306 display, default slow i2c clock speed (50kHz), and fast (0.25s) refresh rate of the display increasing i2c clock speed to 100kHz and decreasing display refresh rate time to 0.5s solved the issue entirely |
The problem
I don't know if there is an official limit of the entities in one ESPHome device, but it seems that after a certain number of entities the device struggles to connect to Home Assistant at all.
The same device works flawlessly if I remove devices and leaving only 20 of them. (didn't test the exact threshold)
After the device boots up, I keep getting connect/disconnect log:
The defice flash is not even half full:
Which version of ESPHome has the issue?
Tested on: 2022.1.2 and 2022.1.3
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
Tested on: 2022.2.2 and 2021.12.10
What platform are you using?
ESP32
Board
ESP32 MH-ET LIVE DEVKIT
Component causing the issue
Not sure if it is connected to platform at all or only to number of entities. Using only Switch and Binary_Sensor
Example YAML snippet
Submitted the whole Yaml example in the Additional info section.
Anything in the logs that might be useful for us?
Additional information
The whole example configuration yaml file:
shc_mcn2_te2.txt
The text was updated successfully, but these errors were encountered: