Shutdown switch with rocker for switching Volumio

Hello,

I´am very new to Volumio. I installed today on my R-Pi and I love it. It´s small and fast and makes every think I need. A DAC will be the next big step.

But before doing this I´am looking for a clean shutdown solution without the need to ssh into the Pi or shutdown via Web-GUI. My primary goal in the future is to play music via Airplay from my Apple mobile devices.

With this thoughts I came to a vey nice solution:

Direct-plug shutdown switch with rocker from Mausberry Circuits.

This switch is able to make a shutdown with a rocker switch. To do this a small setup.sh script installs a switching script to /etc/switch.sh. For now the script is only available for RaspBMC, OpenELEC and Arch.

There is also a small modification of the script from Dylan Durdle on his Blog.

Maybe someone has skills to adapt this to Volumio? … it would be a dream!

Thanks in advance!

I believe that if you change the line

sudo initctl stop xbmc

With the line

mpc stop

It should work.
I cannot try it 'cause I don’t have your switch, but I’m quit sure it will work fine.

Regards,

After some weeks of waiting for the shutdown switch I had now time to test the switch with Volumio. Thank you for your hint with “stop mpc” … it works great :slight_smile:

Regards, Tom

Would this work with the LED shut down switch too? I have one of these lying around since and would like to use it. I have one on a raspbmc working fine already.

Yes, it will.

I am a complete novice so this may seem like a stupid question, but how do you change those lines of code?

You need to connect via SSH to the Pi and edit with an editor of your choice, e.g. vi or nano.