@Kit-Bishop @Lazar-Demin Thanks for your help. The setup is working very well.
I created a small python script that i start on boot and which monitors low battery and input power status powers the onion off before an empty battery would kill the onion hard:
https://gist.github.com/benjaminrau/1f6585591dad469aee4e0520677e91ac
I made use of the gpio wrapper one of the onioneers contributed:
https://community.onion.io/topic/40/simple-python-wrapper-and-demo
Cheers Ben