I've experienced several P3B+ automtically shutdown cases, by skiping the analysis of the root cause, I wonder what is the solution to automatically bring back the Pi again while it shutdown, I mean without manually unplug and plug the power cable?
1 Answer
Automatically starting up after a shutdown is impossible without external hardware. With external hardware, you could e.g. put a relay on the 5V power line. Toggling that relay would simulate re-plugging the power cable.
An Arduino and a relay module would be enough for the task.
-
1To automate this, you could write a state machine for the Arduino such that once an input line with a pull-down on it gets pulled high, it waits until it goes low again, then trips the relay and waits for it to pull high again (the wait state and pull-down are to accomodate the Pi's GPIO between shutdown and reboot). Of course, this will only work if the system really has shutdown...– goldilocks ♦Jul 15, 2018 at 13:03
-
Another Pi could do this. OP has many RPi's that could crosscheck each other.– OyaMistJul 15, 2018 at 15:23
-
1
-
1@Shawn I'm guessing that you are doing serious multi-device development, and will probably end up having different device configurations for testing. I was not sure if you wanted to introduce Arduino into your existing architecture and was simply suggesting using other Pi systems if you have them available for performing as Dmitry proposes.– OyaMistJul 16, 2018 at 4:45
-
1Re: "impossible", you don't need to use a relay either, you can short the RUN pin (actually it's just a hole). @Milliways I've never looked at the watchdog, can it trigger pin activity after the system has shut down?– goldilocks ♦Jul 16, 2018 at 20:40
/var/log/syslog
to see if one actually happened before your reboot. If not, you are now looking for a way to cycle the power on a running system and this could easily come back to haunt you, since it should be shutdown properly first, else you risk filesystem corruption etc.