I’m getting my esp8285 device rebooting itself every 2-3 hours. I have confirmed this with an uptime.sensor, and i have set the reboot_timeout for API and wifi to 9999 to ensure they are not contributing.
I notice in the esphome logs i get the following error once per minute:
If anyone else has this issue, it seems to be something to do with HA trying to connect with an “old” esphome configuration that isn’t there anymore at a specific IP. HA is trying to connect to a device at the same address, pinging an error which is logged on the device but isn’t handled well by the esphome device leading to a memory leak, which fills the memory leading to a crash
you can fix this by manually assigning an IP to the device. I have no idea how to get HA to “forget” the original device. any other device that gets DHCP’d to this address will end up with the same problem.
FYI not sure if you are aware, the reason for setting a static IP is to set it to something that hasn’t been used for ESPhome before. I don’t understand why, but i believe in the background something is going on that doesn’t let ESPhome “forget” old DHCP addresses sometimes, so you need to make sure you set it to something brand new (i did it to outside my DHCP) that definitely isn’t conflicting with any other reservations you have
I had a similar problem. In my case also some ( not all) devices reset periodically. Some every 2-3 hours or so others after 4-5. The software version I used and still use is 2023.10.4 . The problems started when I changed the authorization to the API from password to key. The devices that handled my lighting simply reset, which was quite annoying, especially for my wife ;). After reading this thread, I restored the authorization after the password and the problems ended. However, something tempted me and I upgraded the ESPHome version to 2023.12.5, which caused the problems to return. I restored version 2023.10.4 and have peace of mind for now. As proof, I paste a screenshot of the uptime history. where you can clearly see the configuration changes ( password key ) and the version upgrade.
Sorry to refresh the thread, but maybe someone has similar problems and my explanations will help them. I will add that I have problems on one wemos to which are connected relays that turn on the light. In addition, I have three sonoffs that also restart. The interesting thing is the fourth sonoff, which has the same ( except IP ) configuration and it does not restart.