TL;DR - How to make the unit boot immediately when external power is applied and safely shutdown when external power is removed?
Use case:
Stationary, mounted Rpi (no direct access to circuit board and buttons), with touchscreen.
I need the Rpi to boot ** as soon as ** external power is applied.
I need the Rpi to safely shutdown ** as soon as ** external power is removed.
How do I get the UPS HAT to behave in this way using the PMS Python API? The unit will not have regular wifi access so the Power Software is not a good solution either.
I can accomplish the shutdown by querying the mode every few seconds and creating a shutdown event. Regardless of which way it is shutdown, the Rpi does not boot again when external power is re-applied.
The only way I have gotten it to boot again is by using the ‘battery level solution’, but this is a poor solution because it requires a 5% point rise in the battery level before the Rpi powers up. This can take 5-10 minutes depending on charge state. Worse yet, a safe shutdown setting between 95-100% causes the unit to continuously boot/shutdown.
S