Device going unavailable

I do not know ESPHome, but I have played a bit with ESP32S2 devices and I found a that I often had to increase the timeout on my applications, because the ESP was in a deep sleep and did not wake fully up before the connection was timed out.
If I tried to wake them with a ping command on a windows machine, which sends 4 pings with a 3 seconds timeout, then it was usually only the last ping that was actually getting a reply, so that means more than 9 seconds to wake up from deep sleep.
You might not use deep sleep, but the other modes have wake out times too and might still be an issue.

I’m not using deep sleep anywhere, yet am seeing this problem.
Anyone else?

At one point I had random problems with nodes dropping off line as well as some other devices. Aside from setting static ip’s, I broke them out on a separate vlan.

I know this may not be an option for people but what you usually can do is put them on a separate ssid. Set that ssid to 2.4g only.

If you have access points that overlap a node, only have the ssid broadcast from the AP you want the node to connect to.

In general isp supplied or even gaming routers can only handle ~30 active clients before you start having devices fall off the network.

I’m not suggesting that this is where any of your problems lie, I’m just throwing it out as food for thought. In my experience, as my network overloaded, the esp’s are where where it started to show.

1 Like

Mikefila’s post above prompted me to shift my gaze from ESPHome and onto the WiFi AccessPoint.
I’ve seen ESP nodes “get flaky” out of the blue - where one just starts doing the frequent disconnection syndrome. Restarting the node doesn’t help. Powering it down for at least 8+ hours seems to help, but is not a practical workaround.
But restarting the AP does help.
All nodes are staying connected now. But, as I’ve observed, in a few days one will go flaky again. And restarting the AP will fix it.
I don’t know the innards of 802.11 to even begin to speculate what might be botching up the link relationship for one node so badly that requires restarting the AP.
FWIW, my AP is running latest (2021.02.1) OpenWRT, ath79 platform - it’s a TP-Link ArcherA7v5.
If this continues, I’ll probably flash it back to factory firmware and see how it fares.

24 hours or more, so far, on factory firmware on the WiFi AP (a TP-Link Archer a7v5), and I can report that not a single ESP has mysteriously disconnected. It’s never been that stable.
There’s another case on here where someone had the same AP, also running OpenWrt, same problem.

1 Like

Any update? I find that the connection appears to degrade overtime, where it works great for a few days, and then the disconnects get worse and worse.

I saw the same kind of degradation over time, when the AP was running OpenWRT.
Since changing the AP back to factory firmware, stable as can be. No degradation, no dropouts, no mysterious disconnects.

Interesting, since I have 3 Eero mesh routers. I am installing FW Update and rebooting the network, will see what happens.

I can’t place the blame on OpenWrt for this. It seems to serve all other WiFi clients just fine, but ESPhome it eventually doesn’t handle well.
My guess is that they are both slightly out-of-spec by some small amount, but in opposite directions. Neither one alone is bad enough to interfere when connected to another product, but together they just don’t stay happy.
Although that you are seeing the degredation on WiFi that’s NOT OpenWRT tells me the fault is very likely somewhere in ESPHome (or its Arduino-sourced WiFi library) code.

I’m 90% certain this is a problem with the integration on the Home Assistant side. Because I’ve experienced this a few times in the last month. And every time, restarting the device itself made no difference. However reloading the integration in Home Assistant, magically brings it back to life again.

1 Like

That may be, but there’s one other symptom that isn’t explained by the problem being on the HA side.

When a node is being prone to going unavailable (and in my case it seems to jump from node to node at random, not always the same ones), pinging that node from my desktop shows that about 5-20% of the packets are being dropped. The node is effectively flapping on and off the net. That will of course also affect the quality of its link to HA.
If a node is dropping packets like that, it’s no surprise that HA would have a hard time staying ‘connected’ to it.
And again, simply by replacing the firmware in my AP, all (!) the ESP nodes remain rock-stable on the net, no dropped pings, and no HA disconnects.

Agreed, when the device is unavailable in HA, it is because of network issues. Cant ping, not seen on LAN Scans, etc.

Of course the rest of my network is stable, so very likely the ESPhome/network interactions are flaky.

Whose router firmware are you using?