RPi volumio 1.4 GPIO for python


I try to build a small mpd-box with Raspberry Pi and Volumio.
A LCD is running (thanks to AndyPi) and I want to have some buttons to control mpd via mpc over GPIO.
Under older volumio versions it was running …

Now my problem is, that I cannot install

sudo apt-get install python-rpi.gpio E: Unable to locate package python-rpi.gpio E: Couldn't find any package by regex 'python-rpi.gpio' sudo apt-get install python-dev The following packages have unmet dependencies: python-dev : Depends: python (= 2.7.3-4+deb7u1) but 2.7.5-5 is to be installed Depends: python2.7-dev (>= 2.7.3-1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

How can I get GPIO running under volumio 1.4?

Thanks for help

Same problem with me too…can some one please guide us…


on raspberry add these line in your /etc/apt/sources.list

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free r$ deb http://archive.raspbian.org/raspbian jessie main contrib non-free rpi deb-src http://archive.raspbian.org/raspbian jessie main contrib non-free rpi
You have to do before installing most of package

Hi tobbes,

did balbuze 's solution work ?
If yes, don’t forget to change your Post title to “[Solved] RPi volumio 1.4 GPIO for python” for others :wink:
Thank you

I did it like this:
change in /etc/apt/sources.list wheezy to jessie
sudo apt-get update
sudo apt-get install python-dev
Unfortunately I could not install gpio, so I got the gpio*.deb from the web and did:
sudo dpkg - i gpio???.deb

change in /etc/apt/sources.list jessie to wheezy
sudo apt-get update

My python gpio scripts are running now.
But there is a problem with the “mpc consume off” parameter.
It seems that this parameter is not persistent.
I set it in /etc/rc.local
su pi -c “mpc clear &”
su pi -c “mpc consume off &”
su pi -c “mpc load 1_Favoriten.pls &”
su pi -c “mpc repeat 1_Favoriten.pls &”

but the playlist is always empty after a few tracks …


YES that worked !


you don’t have to change something in the apt-get source file!

Just connect to your RPi change to root, download the latest RPi.GPIO from sourceforge.net/projects/raspber … an-wheezy/ and install the file.

sudo su
wget http://sourceforge.net/projects/raspberry-gpio-python/files/raspbian-wheezy/python-rpi.gpio_0.5.6-1_armhf.deb
dpkg -i python-rpi.gpio_0.5.6-1_armhf.deb

This is a bug of current MPD version… Unfortunately it has consume mode on by default… I’m recompiling next version, expect to see it in next volumio version…

My rc.local also turns consume mode off and I have noticed this as well. I restarted my Pi and ran the following as soon as I could SSH into it:

while true; do mpc status; sleep 1; done

I can watch the status of the consume mode change from OFF to ON at almost exactly the same time every reboot. It coincides with this message:

[ 57.137029] bcm2835-cpufreq: switching to governor performance

By counting the number of seconds before consume mode turns back on, I was able to modify my rc.local to turn it back off at the appropriate time.

(sleep 25; su -u pi mpc consume off) &

Kind of an ugly workaround, but it works!