RPi volumio 1.4 GPIO for python

Tell us how you made up your Volumio powered Project

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

RPi volumio 1.4 GPIO for python

Postby tobbes » Fri Jul 18 2014 19:14

Hello,

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
Code: Select all
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
Tobbes
Random avatar
tobbes
Sunday DIYer
Sunday DIYer
 
Posts: 42
Joined: Wed Dec 18 2013 19:11

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


RPi volumio 1.4 GPIO for python

Postby jawedsoft » Mon Jul 21 2014 11:22

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

regarsd,
Jawed
Random avatar
jawedsoft
Fresh off the boat
Fresh off the boat
 
Posts: 6
Joined: Thu Jul 10 2014 11:38


RPi volumio 1.4 GPIO for python

Postby balbuze » Mon Jul 21 2014 12:24

on raspberry add these line in your /etc/apt/sources.list
Code: Select all
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
:D
User avatar
balbuze
Moderator
 
Posts: 1684
Joined: Thu May 08 2014 08:42
Location: Isère France


RPi volumio 1.4 GPIO for python

Postby esseki » Sun Jul 27 2014 06:47

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 ;)
Thank you
User avatar
esseki
Moderator
 
Posts: 91
Joined: Tue Feb 18 2014 21:15


[Solved] RPi volumio 1.4 GPIO for python

Postby tobbes » Mon Jul 28 2014 05:44

Hello,
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 ...

Tobbes
Random avatar
tobbes
Sunday DIYer
Sunday DIYer
 
Posts: 42
Joined: Wed Dec 18 2013 19:11


RPi volumio 1.4 GPIO for python

Postby tavdog » Fri Aug 01 2014 20:05

YES that worked !
Random avatar
tavdog
Fresh off the boat
Fresh off the boat
 
Posts: 3
Joined: Fri Aug 01 2014 02:45


RPi volumio 1.4 GPIO for python

Postby cf99_vol » Thu Aug 21 2014 11:22

Hi,

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 http://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
User avatar
cf99_vol
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Thu Aug 21 2014 11:06


[Solved] RPi volumio 1.4 GPIO for python

Postby michelangelo » Thu Aug 21 2014 12:31

tobbes wrote:Hello,
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 ...

Tobbes


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...
User avatar
michelangelo
Founder
 
Posts: 4377
Joined: Sun Dec 15 2013 23:18


RPi volumio 1.4 GPIO for python

Postby Mona » Fri Oct 03 2014 18:24

But there is a problem with the "mpc consume off" parameter.
It seems that this parameter is not persistent.

This is a bug of current MPD 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:

Code: Select all
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:

Code: Select all
[   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.

Code: Select all
(sleep 25; su -u pi mpc consume off) &


Kind of an ugly workaround, but it works!
Random avatar
Mona
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Fri Oct 03 2014 17:22


Return to Diy Volumio Projects

Who is online

Users browsing this forum: No registered users and 0 guests