Will a Rasberry Pi automatically restart after power outage?

My home is subject to random power outages due to the rural nature of the place.
I am using an HP streaming computer to run HG now. I have it configured to automatically restart into HG when there is a power interruption.
Will I be able to do the same with a RasPi unit?
Thank you for the help.

Applying power to a Raspberry Pi after an outage will indeed power up a Raspberry Pi. Assuming you have your HG service file set to restart=always HG will indeed be launched. The problems start when HG suffers an abnormal shutdown. This can corrupt files on the SD card or physically damage the SD card which would destroy your HG install.

Keeping a HG image on a secondary SD card located close to your RPI will minimise downtime. Of course you could use a cheap UPS attached to your RPI similar to this to prevent the above. Pi UPS - Uninterrupted Power Supply for Raspberry Pi – Pi Supply

I can attest to corrupt SD card files from power outage shut downs. In my case switching to small cheap 16 & 32gb USB SSD solved 90% of these issues.

I have had a small $20 unused UPS powering one location for a couple years now; solved the issue for good.

A properly configured UPS can of course either do an orderly shutdown of HG in the event of a power outage or keep it running until power mains is restored. This alone would negate the need for the extra overhead of an SSD.

Where is the SSD powered from. USB or GPIO or externally powered. What model RPI is deployed on the install. Has the power supply got the overhead to cover the additional draw from the SSD.

Hi Alan!
I’m in a residential area and the power goes out semi-frequently because of the birds and squirrels getting too curious with the power transformers!
Here I’m using a small UPS on one RPi 4; another is backed up using a UPS HAT.

Thank you for taking the time to respond. I believe I have solved my question and do not know how!!
I picked up a used Pi 3 and loaded HG on to it. Without doing anything on my part every time it powers up it is running HG. So my problem is solved. I wish I knew why.
I live in a fairly rural area and even with 2 whole house batteries I sometimes am in a grid outage that depletes the batteries after 12 hours or so.
Thank you again.

HG runs as a service in Linux so when the power is removed from your RPI and then reapplied the service will automatically start HG on boot.

If you want to examine the contents of that service file issue the following command from the Terminal

sudo systemctl stop homegenie.service

The above command will stop the HG service.

To examine the contents of the HG service file enter the following command

sudo nano homegenie.service

Finally to start the HG service again issue the following command

sudo systemctl start homegenie.service

It’s all pretty straightforward really. If power goes down and you don’t have a UPS attached to your RPI your RPI turns off. As soon as your power is restored HG will automatically restart.