RpiTX
Posts: 6
Joined: Wed Dec 19, 2018 3:07 am

Auto turn on

Mon Jan 14, 2019 4:07 pm

Is there a way to configure a Pi to turn on so long as it has power, even if it is shutdown by command (either the GUI or the command line). I am installing a Pi in a remote location, my biggest concern is it shutting down and not being able to be restarted. The Pi in question is powered via PoE, if I had a managed switch I could cycle the port with the Pi, but those switches are too pricey for me.

Thanks!

User avatar
DarkPlatinum
Posts: 599
Joined: Thu Nov 02, 2017 2:30 pm
Contact: Website

Re: Auto turn on

Mon Jan 14, 2019 5:33 pm

I don't think this is possible. When you shut down your Raspberry Pi, you are basically stopping all processes.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): Https://Html.dynu.net

RpiTX
Posts: 6
Joined: Wed Dec 19, 2018 3:07 am

Re: Auto turn on

Mon Jan 14, 2019 5:36 pm

DarkPlatinum wrote:
Mon Jan 14, 2019 5:33 pm
I don't think this is possible. When you shut down your Raspberry Pi, you are basically stopping all processes.
What about some sort of Wake-on-Lan (or similiar) method. Not sure if that is supported by the PoE hat.

klricks
Posts: 6002
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Auto turn on

Mon Jan 14, 2019 6:09 pm

Might be possible to use an IP power switch something like this: https://uhavecontrol.com/collections/th ... gKFxvD_BwE
Unless specified otherwise my response is based on the latest and fully updated Raspbian Stretch w/ Desktop OS.

User avatar
DarkPlatinum
Posts: 599
Joined: Thu Nov 02, 2017 2:30 pm
Contact: Website

Re: Auto turn on

Mon Jan 14, 2019 6:22 pm

The only possible thing that I can think of is that you have a Raspberry Pi zero w running a program that turns on a relay which supplies power to your main raspberry pi. This pretty much defeats the purpose though. Its like any other computer, when you shut it down, you require a physical button to turn it back on. You could implement a hibernation some how.
1 * Raspberry Pi Zero W, 1 * Raspberry Pi 2, 1 * Raspberry Pi 3 1 * Raspberry Pi 3B + :mrgreen:

Check Out My Raspberry Site (Run on a Raspberry Pi 3B :) ): Https://Html.dynu.net

hippy
Posts: 4161
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Auto turn on

Mon Jan 14, 2019 6:42 pm

It should be pretty easy to create an external watchdog which can reboot the Pi when the power is on and it hasn't confirmed it's still working for a while. One could use a microcontroller, an NE555, other timer or counter, perhaps even a simple capacitor and resistor.

I don't know what watchdog capabilities a Pi has built into silicon so that might be worth investigating.

Of course; any reboot after failure scheme does rely on the SD Card having not been corrupted and the Pi being able to boot up .

Andyroo
Posts: 790
Joined: Sat Jun 16, 2018 12:49 am

Re: Auto turn on

Mon Jan 14, 2019 6:46 pm

RpiTX wrote:
Mon Jan 14, 2019 5:36 pm
DarkPlatinum wrote:
Mon Jan 14, 2019 5:33 pm
I don't think this is possible. When you shut down your Raspberry Pi, you are basically stopping all processes.
What about some sort of Wake-on-Lan (or similiar) method. Not sure if that is supported by the PoE hat.
Unfortunately WOL is not supported at all on the Pi main board so it was not implemented on the HAT.

Simplest way would be to use a board like the Pi Juice and have it wake the Pi at regular intervals even if it’s not asleep. It does not stop it going down BUT does get it back for you.

Other thoughts:
1) Rename or create an alias for the reboot and shutdown commands
2) Investigate if any of the hardware watchdogs will reporter the Pi - not sure of my head as they normally do a reset
3) Manually pull the Ethernet cable at the switch end - risky but saves climbing in the roof or where ever you are putting it.

Edit: Forgot about this post viewtopic.php?f=37&t=140994 - maybe you could mod the circuit to be triggered by an external watchdog?
Need Pi spray - these things are breeding in my house...

Return to “Beginners”