Safely shutdown Hass.IO through Raspberry Pi GPIO pins

Hi,
I’m running HassIO.
I’m making an uninterrupted power supply (UPS) for my Pi 3.
I need my UPS to be able to send a signal to Pi through GPIO pins to shutdown the HassIO safely.
Similarly, to boot up too.
Is this possible through HassIO?

Thank you & Regards,
-Jinantha

1 Like

That should be perfectly possible by using the GPIO component for the UPS and creating an automation that triggers on state changes and calls the service ‘hassio.host_shutdown’.

1 Like

Thanks metbril.
This helped me to spark the idea.

I used GPIO23 to send the shutdown Pull-up signal from micro-controller and Pull-down on GPIO3 to wakeup the Pi from shutdown mode.

Thanks a lot!

1 Like