Can i setup the PI to power it self on, 5 min after it detect power?

Hi. question.
Can i setup the PI to power it self on, 5 min after it detect power?
having a lot off problems after power breakdown, because the PI power on quicker than the router .
Hope i made my self clear enough .

Refael

This is not a HASS configuration issue unless you are running HASS on a different system and want to use it to power on the Pi. There is nothing on the Pi itself. Including HASS that can do this.

No. Once the pi has power, it comes on.

Simple solution here would be to use a UPS which will eliminate power outage issues for your Pi and router.There are many inexpensive solutions available on the web.

A US could delay the shutdown and permit an orderly shutdown. For extended outages that would not resolve the powering on issue though. With no power, the Pi cannot “listen” for any start.

Perhaps you could configure some sort of service startup delay either time based or based on being able to access an Internet site, for instance.

No outages mean no need for restart procedures. A UPS will ensure that. Any other solutions are piecemeal. I have a UPS deployed in my setup so I can confirm this.

A reasonably priced UPS can handle a power outage for days???

Thanks flamingm0e.

Thanks everybody.
bosborne, your idea mite work. i’l try and report back.

Refael

I assume you issue is that HA starts before the router is available, not the Pi itself booting up.

If this is the case you can probably use the last_boot sensor from the system monitor component to trigger HA to restart once the last_boot sensor hits 5 minutes.
Maybe you can even put in a condition that avoids restarting HA after a normal, i.e. not power-related, boot process by checking, if one of your devices that’s always connected is ‘home’. If it is ‘home’ it would mean that the router is already working for presence detection and you don’t need to restart HA.

Got my PI B3+ on a APC 1500 Smart UPS also powering switches, Wi-Fi, router and PC w/Blueiris.

Anybody got the magic words for the shutdown script to run on the PC when it starts the shutdown, to shutdown the PI ?