Question about shutdown

I’m about ready to power up my first RPi (Pi4 with 4 GB). It has a hassio image on the SD card. I’ve read about corrupting the SD card if you just unplug the power so I have a couple questions about shutting down the Pi. I did a quick search but couldn’t find what I was interested in.

Q1: If I shutdown HA, is there anything else to shutdown or can I just unplug power then? I’m not sure if there are other layers of software running that need to be halted.

Q2: What is the best way to shutdown HA? I’ve read a way about using something inside HA as well as remotely (via SSH?). Please provide instructions.

I know some folks just leave their Pi running 24\7, and I probably will once it goes live, but I want to make sure I can turn it off if I need to tinker with the hardware.

Thanks.

You know I don’t think this is very well documented either. There are two parts Home Assistant Core and Home Assistant OS.

If you go to the Supervisor(gear) section in the UI and click on the System tab you will see a shutdown button in the Host System box that shuts down the OS and I assume everything else associated with Home Assistant. There is also a service call under Developer Tools/Services called hassio.host_shutdown that should do the same thing.

Typically I leave the OS running and just restart Home Assistant Core when I’m tinkering by using the Configure Home Assistant (gear)/Server Controls and first push the Check Configuration button and if everything is ok push the restart button at the bottom of the page. Check Configuration is your friend for finding mistakes in automations, scripts, etc. before you try rebooting. You can also restart HA Core from the services menu at DeveloperTools(hammer)/Services and select the homeassistant.restart service. There is also a homeassistant.stop service which may just stop HA Core and let the OS continue running but I’ve never used that.

1 Like

Thanks micque.
Using Supervisor>System>Shutdown does break the connection to the Hass UI. I was able to do that and unplug, replug, and restart without issue. Unfortunately there is no visual confirmation that the system is shutdown. There’s also no telling how long it takes for Hass to finish any cleanup so that you know it’s safe to unplug. I wish there was a more definitive way.
Thanks again.

2 Likes

I was looking for the same info.

I know that nearly 18 months have passed but thought I’d make my first post in the community… having just started out with Home Assistant and delighted with how easy my onboarding experience has been so far.

From earlier experience with OpenHAB - where the same thing happens - I watched the little lights on the raspberry pi after sending the host shutdown signal. When shutdown is finished, they flash regulary quite quickly… about 10 times I think. Just did it and it seemed to take about 30 seconds.

Couldn’t you just ping the HA’s IP address to confirm that it is shut down?

Im sorry, maybe im too dumb or maybe HA is too complicated, but i cant find nor Supervisor nor Shutdown anywhere, I have HomeAssitant OS running on a Raspi 4 8 Gb, and for the love of me, when i read the forums, half the time i can not find stuff that they say its in the tabs or just simple on de UI… everything is different for everyone… I havn’t got my bearing on this one… I’v used other systems, and they are not so complicated and different for everyone.

1 Like

The shutdown is located at Configuration>Add-ons, Backups, & Supervisor>System>SHUTDOWN HOST. Wait until the internet activity lights turn off and you’re all set. The UI for the configurations page has changed recently maybe that’s why the forum seems confusing on this topic.

rojoricardo,

First, make sure you are running the latest version of HA, which is version 2022.2.x (any 2022.2 version should do).

On the left side menu click Configuration. This will show you a series of options in the main window of HA. One of these options is “Add-ons, Backups & Supervisor” … click this. At the top of the page that appears are 3 tab-like options for different views … click “System”. You should find a link to “Shutdown Host”. If you don’t see these options then I wonder if indeed you are running the HA OS and instead perhaps another form of HA install.

There is also a way to perform a shutdown along with many other actions via the HA command line. Check out the link below for more details. You’ll need to install the Terminal & SSH add-on for easy access to the command line.

Hope this helps. Keep in mind that HA is a very robust set of software. There’s a lot to learn and different levels of complexity. I recall at my early days that it was a bit overwhelming. Things are getting easier in some areas but new features broaden the scope of the software and can create challenges for newcomers to get oriented. There is a learning curve. Just try to learn one new thing at a time. Eventually you will know it “like the back of your hand” as they say.

Gordon

OMG it helped alot! You explained it step by step, perfect htank you