Did I shutdown HA correctly?

Hello,

Sometimes, I need to shutdown my HA when there is a power outage and it’s running on UPS battery or when I need to physically clean the dust. I usually do Settings > System > Power icon (top-right) > Advanced options > Shut down system, wait 15min, and then pull the USB power plug.

However, when I plug the USB power plug and HA is turned on again, I always get this error in the log: “The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly.”

So did I shutdown HA correctly? If so, why am I getting this message?

You could try from the command line

ha core stop

Sorry, I’ve only ever used the command line on Windows. I have HA installed on a rpi4. How do I run the command line on that?


In addons add the advanced SSH & web terminal.

You could putty in from windows as well.


This should work from developer tools but I haven’t tried it.

Terminal doesn’t work for me. It keeps giving me “Bad gateway”…maybe it wasn’t configured correctly with my Cloudflare.

I’ll try the developer tools method. Thanks.

Not sure how to do the hassio.host_shutdown command from developer tools then without the ssh connection when you stop the core. I suspect all you can do is pull the plug which doesn’t seem safe. As I said I haven’t tried this.

Check for a UPS integration for the UPS you have, it can be monitored either via USB/serial or network IP communication for the state of the UPS. Then when power is lost you can have it shutdown via the integration with either time delay or battery level.

Lots of information and ways to do it.

“Home Assistant Core Integration: Stop” developer method also gives me the same not cleanly shut down error.

Thanks. It seems my CyberPower GX1325U isn’t compatible with NUT. I don’t get power outage that frequently, so I don’t mind shutting down HA manually. I just need to figure out the correct way to cleanly shut it down…

a USB to ethernet adapter could make to communicate via the LAN, just a FYI available from Amazon, eBay, Best Buy, etc