I have a “Solar Assistant” Raspberry PI that is attached to a SunSynk inverter. This uses MQTT to send through statistics to Home Assistant. I have various automations that help us deal with the rolling blackouts that we have in South Africa, known as load shedding.
Since a few days ago, the statistics have not been reliably fed through to Home Assistant and all sensors in that integration report “unknown”. A while ago, I set up a nightly reboot of my HA raspberry pi to help with some other stability issues (things would hang and freeze - that seemed to sort it out), and I noticed that at 03h05, when the box rebooted, the energy stats would either start or stop.
This screenshot shows the “unknown status” starting at 03h05 and ending at 03h05 the next morning, and so on, on April 11 and April 12. You will see that April 12 has a very short “unknown” section - I rebooted the box manually at that point. On April 13, you will see the same again - And yes, I was up at 4am, and rebooted the box to get this working. For what it’s worth, we live in a place that has a comically unstable electricity supply, hence the very two long “Off” periods are more or less accurate: we were without power.
While the short answer is “don’t reboot your box”, that doesn’t help for situations where, for example, I need to install updates and update HACS modules, which require reboots.
Restarting HA doesn’t seem to make a difference, only rebooting does.
Solar Assistant, in all this, hasn’t lost power once and I’ve rebooted it only twice in the last 6 months (once yesterday - didn’t make a difference). I’m therefore fairly sure that SA is not the problem.
My problem is, though, that I have no idea how to debug this scenario! I’ve checked logs and can’t see anything obvious.
Any assistance to remedy this would be greatly appreciated!