So I have had three power cuts over the past month and its really annoying as it means Hassio on Pi 3+ stops working.
I need to physically unplug the Pi then plug it in and it starts again. I normally work on my setup while at work using Duckdns. I have the pi connected to a unifi switch and have the unifi app but as far as I know I cannot do anything to resolve this issue remotely. Is there anything that can be done, or anything I can do while at home to prevent it happening next power cut?
Surely a power cut shouldnt cause HA to shut down and not restart when power back on?
I second @SteveDinn. I got a UPS for this very reason. You can get a reasonably priced one for $300 that even powers items back up if the power comes back using apc software.
Yah, I got a UPS because I’m using a nuc. I also added all my network gear (switches, router, etc) to the UPS. My entire network stays alive (Even internet… sometimes) when I lose power.
Yeah, I’m with you. I have one to power a full desktop machine + monitor + network gear, but what would be minimal cost and get the job done for @Matt_Barnes?
cheers guys. I thought about a UPS just seemed excessive for the problem at hand, as I reckon the power has cut for maybe a minute each time and all other tech in the house is back up and active but for whatever reason HA doesnt. It is odd that unplugging it and plugging it back in makes it work, but having a power cut and then it coming back on does not help.
An Ikea tradfi style wifi plug is a good shout though. I was sort of hoping for a software solution a config setting or some guidance on whether I could ssh into the Pi from outside my network. I should have installed it on a docker on my NAS but that wasnt really an option when I started but I can access my NAS from outside. Think the plug or maybe UPS is a good idea depending on costs.
The pi is fixed ip and I can see it connected to the wifi network using my unifi app. The pi is powered and connected but something stops HA loading up. I know when I get home I will not be able to connect to the HA instance until I unplug it and plug it back in.
One last thing I can think of…check the very last section of this page:
If you want to restart the Home Assistant service automatically after a crash, add the following lines to the [Service] section of your unit file (mine is /etc/systemd/system/hass.service):