Page 1 of 1

Auto turn on

Posted: Mon Jan 14, 2019 4:07 pm
by RpiTX
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!

Re: Auto turn on

Posted: Mon Jan 14, 2019 5:33 pm
by DarkPlatinum
I don't think this is possible. When you shut down your Raspberry Pi, you are basically stopping all processes.

Re: Auto turn on

Posted: Mon Jan 14, 2019 5:36 pm
by RpiTX
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.

Re: Auto turn on

Posted: Mon Jan 14, 2019 6:09 pm
by klricks
Might be possible to use an IP power switch something like this: https://uhavecontrol.com/collections/th ... gKFxvD_BwE

Re: Auto turn on

Posted: Mon Jan 14, 2019 6:22 pm
by DarkPlatinum
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.

Re: Auto turn on

Posted: Mon Jan 14, 2019 6:42 pm
by hippy
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 .

Re: Auto turn on

Posted: Mon Jan 14, 2019 6:46 pm
by Andyroo
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?

Re: Auto turn on

Posted: Wed Jan 16, 2019 2:02 pm
by RpiTX
Thanks! These are all really good avenues to explore.