Home Backups System - Adding A Soft Shutdown Button

My journey of the Home Backups System endeavor started with a first version that solved my data backups problem, but it was plagued with an annoying issue (see article Adding HDD Automatic Power Control). The upgrade presented in that article worked like a charm so I was happy and convinced it was done.

As I came to realize, I was not done with it yet... another challenge to arose. Days passed by with the system fully operational a working as it should, until one day I noticed the Raspberry Pi (Raspi from now on-wards) network connectivity hang for some reason. Without connectivity and not having a monitor and keyboard near by, I had no way of issuing a power off command to perform a soft shutdown and not risking data corruption. My solution was to disconnect the power supply to do a hard shutdown and connect it back up again to boot the Raspi.

In the coming weeks the same thing happened again and the approach was the same. But these hard shutdowns just are not for me, I had to do something about it.

I wanted a solution that allowed me to trigger a soft shutdown of the Raspi without having to connect remotely or connect a keyboard and monitor to it. My first approach was to make a switch connected to a GPIO and a listener script that detected when the switch was pressed and executed the power-off command. This would take care of the soft shutdown but now I had to physically disconnect/connect the power supply to make the boar boot up again. It's a small hassle but I wanted something "cleaner".

I remembered seeing in Yepkit website a small board that did the Raspi soft shutdown and also connects/disconnect the power supply with a single push button. I got one of those boards and replaced my GPIO hack with their YKRUD board. Here we go, another issue solved!

Was this the end?

Comentários