GPIO power button

Is there a way to implement a “power on/off” script for balena/screenly? I have done this using a pi3 running rasbian, but not for sure where I would put that same “shutdown” script in the balena OS. Need a way to power on pi3 if I happen to shutdown from balena dashboard, instead of unplugging the power connector and plugging back into pi3. Look forward to what is recommended. Thanks in advance!

1 Like

Hi @tbctech! How have you done this in raspbian? I’m not sure how you would do the “power on” part of the process, as it would probably require hardware (e.g. a power switch?).

To power off, you can use the supervisor API, which is what the dashboard uses behind the scenes: https://www.balena.io/docs/reference/supervisor/supervisor-api/#post-v1shutdown