I faced the problem of my Shelly devices becoming regularly unavailable in Home Assistant. Looking at the availability history this problem was quite obvious and especially annoying when a Home Assistant automation (e.g. lights on/off) should run and the Shelly device would not respond.
I lived with this problem for way too long given that there is actually a straigh-forward reason and fix for it.
We recommend using unicast for communication. To enable this, enter the local IP address of the Home Assistant server and port 5683 into the CoIoT peer field and push SAVE button.
OK, so let's do that ...
- Open your Shelly's settings in a browser using its IP address (the settings we are looking
for are not available in the app). There, find
Advanced - Developer Settings.
On this page, you find the CoIoT settings where you need to enter the IP address and port of your Home Assistant installation.
- Reboot the Shelly device.
As far as I can tell for now this has fixed the problem. The "unavailable phases" have disappeared.
I guess, sometimes it pays off to read the documentation in the first place.