RaspyFi: What is is and how to successfully install.


November 25, 2013 by aubreykloppers

Afrikaans Radio Stations:

Before I start, here is a copy/collection of 21 Afrikaans Radio Stations: https://www.dropbox.com/s/ye4peuoyie87kjv/Afrikaans%20Radio%20Stations.zip  Extract to the WebRadio Directory.  To access your WEBRADIO directory, all you have to do is open the IP Addess with your Windows Explorer, like this: \\<IP ADDRESS>

What is RaspyFi?

From the Website:

RaspyFi is a brand new Linux Distro made specifically for the Raspberry Pi. It aims to fully integrate Mpd into current debian realeases and to optimize it for Audiophile-quality music playback. The final result is aimed to resemble the notorius Voyage-mpd distro, but tweaked and optimized for the little arm computer. It will definitely turn it in a cheap and low-powered audiophile source.

This is quite a mouthful.  Basically it is a (Headless) Media Player, giving you the ability to stream Online Radio, NAS (Shared) and local music using a very good looking website.  I build additional hardware onto the PI to display songs playing, skipping forward/back and pushing volume up and down.

RaspyFi links:

The above links is nice to have, but tells you nothing on how to build RaspyFi wihout a USB Dongle or how to add a “Adafruit LCD + KEYPAD for RASPBERRY PI I2C INTERFACE (Kit Form) as found (In South Africa) here: http://robotics.org.za/index.php?route=product/product&path=227&product_id=694

The next Installation Steps is quite easily  to follow to get this up and running.

Installation Steps:

  • Always remember to “sudo su” before you do anything.
  • If in doubt (or get errors), “reboot“!

Step 1, Network/Interfaces file:

vi /etc/network/interfaces
auto lo
iface lo inet loopback
#Remove the wired network because it
#slows down boot if it’s not connected.
#auto eth0
#iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address <IP ADDRESS>
netmask <NETMASK>
wpa-ssid <SSID>

Step 2, DNS/Resolve to the Internet: and is the Google DNS Servers.  I use these as fallback DNS.

vi /etc/resolv.conf
nameserver <ROUTER IP>

Step 3.1, Update:

apt-get update

Step 3.1, and install PIFace code: (Note: No PiFace, No Install!)

 (Add at the end)

vi /etc/modules

apt-get install git python-smbus i2c-tools python-dev python-rpi.gpio
git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git

Step 4, Fix Analog-out/HDMI-out:

(Add before “exit 0”)

vi /etc/init.d/myruns
modprobe snd-bcm2835

Step 5, Set Output Device:

amixer cset numid=3 N
where the N parameter means the following:
0=auto, 1=analog, 2=hdmi.
Therefore, to force the Raspberry Pi to use the analog output:

amixer cset numid=3 1

Step 6, Forced MPD bind:

The following is to fix your website from becoming unresponsive after a reboot:

vi /etc/mpd.conf
change “bind_to_address” to “”
/etc/init.d/mpd restart

Step 7, Set Volume in WEBUI to “SOFTWARE”


http://<IP ADDRESS>

to access the WEBUI and set your Volume to SOFTWARE to be able to manage your volume.

Step 8, Setting up LCD PIFace:

The following code is a modification of the code written by R.U.Serius from Sweden.  I have adjusted the code to rather use:

  • Presentation of play mode (playing/paused/stopped), Artist and Song name scrolling on line 1
  • The elapsed song time, total song time and percentage of song played on line 2.
  • Left button: Skip back
  • Right button: Skip forward
  • Up button: Volume UP
  • Down button: Volume DOWN
  • Select button: Toggle Play/Pause

One of the things I have noticed, if you get to the last item of your playlist and hit the “Skip Forward” button, the radio stops.   All you have to do is hit the “Select” button and it will start again with the very first item in the playlist.

The code available here: https://www.dropbox.com/s/5tklcwdr74q29d7/songInfo.py

Save this code to: /home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate/

Remember to start the code automatically by doing a:

crontab -e

and add the following line at the end of your cron file:

@reboot python /home/pi/Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCDPlate/songInfo.py

Problem Shooting:

  • All black and dead (If you installed the OS to SD and the SD does not boot):
  1. Follow the instructions to flash RaspyFi.
  2. Download the Raspbian Wheezy image and extract the files (Use PeaZip).
  3. Replace the .elf files on your SD Card.

The above error is apparently due to newer chips on the Raspberry PI.  Read more here: http://www.raspberrypi.org/archives/3534

  • Web Page Unresponsive:
  1. Restart mpd with: /etc/init.d/mpd restart
  2. Look at “Step 6” and set your mpd to bind to

One thought on “RaspyFi: What is is and how to successfully install.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

counter for wordpress
%d bloggers like this: