Volumio and 'python' modules - basics

Hi all

This is my first post, posted with the realisation that I know so little on the computing side of things!

I am building a miniature battery powered music streamer and combined dac/headphone using an RPi2 model B v1.1 running Volumio v1.55. On the bench all is all running smoothly as hoped, connecting to NAS etc…

I am now working on the enclosure and wiring in its finished form which will incorporate an ATX style switch , and currently I am settled on:

lowpowerlab.com/atxraspi/

Having read numerous posts on this and other forums it seems I need to enable the GPIO pins and then enter instructions/code to interface RPi with the switch which in the first instance requires adding a python module?

Could someone VERY PATIENT advise me on a step by step procedure to install the python module starting from scratch? I really don’t know where to start and most of the forums etc. I have encountered assume that one at least knows the basics and sadly I don’t!

I have other issues to address later, but all in good time.

Yours in anticipation

Old (and confused)

Hi,
First you have to install python
So go to your device via ssh and (If I remeber ) :

sudo wget http://downloads.sourceforge.net/project/raspberry-gpio-python/raspbian-wheezy/python-rpi.gpio_0.5.11-1_armhf.deb the version may be different, this one is ok for today :wink:

sudo dpkg -i python-rpi.gpio_0.5.11-1_armhf.deb of course version do matches with previous command.
Now you can start using python script…
I wrote some, but maybe not very clean :wink: you can find them here : https://volumio.org/forum/second-rpi-volumio-project-t2680.html.
You have to adapt to your need. Spending time, and searching the web for examples, advices etc.

To complete,
If you want to “pilot” mpd, you will need to install python-mpd

sudo apt-get install python-mpd

edit : in fact you don’t need it to get a rotary encoder or push button (play , next …)

Thank you balbuze for your invaluable information and leading me to your own project, very impressive by the way; I am now thinking I need a display panel!

Back to basics; what do I have to do in Volumio before setting up SSD on a remote computer. I assume it needs to be enabled in some way? I have a windows PC next to me and Rpi is visible on the network.

I feel a long weekend ahead of me, at least we have public holiday on Monday! I have a feeling I will be dropping a few more posts! Thanks again for now. Old

Hi there

SSH is already enabled on volumio, so if you are on windows get a client like putty http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html enter the ip address of your rpi/volumio unit and press connect, enter the login details volumio/volumio.

Hello again

I have installed a Low Power Lab ATX-Raspi power button and neither the shutdown or reboot functions work! Having raised the issue on the ATX-Raspi forum they are of the opinion that 'rc.local is not invoking the ‘shutdowncheck.sh’ command but they do not know why.

At the end of the boot process, A line should appear saying ‘waiting for gpio7 to become high’ which it doesn’t! I have carried out the instructions and the ‘shutdowncheck.sh’ folder opens and shows the same text as in the video. I have also checked and the ‘rc.local’ file shows the additional ‘shutdowncheck’ line at the bottom!

I wonder if anyone could check out the installation video for the Atx-raspi, see the link in my first post? I really don’t have the knowledge to investigate further but I am wondering if additional lines or changes need to be made for Volumio to invoke commands to initiate the gpio pins 7&8.

Any assistance would be greatly appreciated.
Many thanks
Old

Hi there

You might want to give out a bit more information, perhaps post one of the scripts your trying to run.
(make sure to use to code block on forum)

Also what do you get if you try to run the command directly from commandline ?

Perhaps have a look at this tread, that also uses the rc.local perhaps it will guide you in the right direction:

mpdlcd-won-auto-start-t2913.html

Hi Bjarke

Having read a series of posts on a problem with a Mausberry switch by members okok and yjo, I think I may have established what the problem is, but have no idea how to resolve it.

The ATX-Raspi switch programme (daemon?) is initiated by rc.local and the problems above were due to the fact that the script was automatically inserted after the script ‘exit 0’ in my case shutdowncheck.sh - see image attached. I think reading between the lines, because the script occurs below ‘exit 0’ the programme stops after boot rather than running in the background waiting for the button press.

How do I replace the script ‘shutdowncheck.sh’ above ‘exit 0’. I am a complete novice in programming and have no idea where to start.

Any assistance would be greatly appreciated.

Kind regards
Old
shutdowncheck.jpg