Raspberry pi / squeezebox / spotify

Joined
Mar 1, 2014
Messages
53
Reaction score
1
Location
Brasília
While waiting for various parts to arrive to fix various pieces of broken equipment (a CD player, a turntable and an amp), I did a bit of installing/configuring on a raspberry pi computer to install a squeezebox/spotify system. It works brilliantly. My main desktop computer which is connected to a wifi network, runs a squeezebox server with a spotify plugin. The raspberry pi (I now have 2 running in different parts of the house) has a squeezebox player installed, a wifi adapter and a powered USB hub (the powered hub was necessary with the adapter I used - I guess because it draws more current) and a USB interface with RCA outs (I'm using a behringer UCA222 on one raspberry pi and a UCA202 on the other - not exactly audiophile, but decent and better devices can be used). The controlling device (the one I select tracks on) is an android phone running the "Logitech squeezebox controller". With this I can stream my flac files on the hard drive of the server computer, listen to spotify streams and other features of the squeezebox server such as podcasts and streaming radio.

Perhaps this is old news on the form, but if not, let me know, I'll send more info. Quite a cheap system to set up and very useful.

Cheers,
Iain
 
Last edited by a moderator:
Thanks for sharing.

Some pictures would be nice! Did you put it all in a pretty box?

The UCA202 is a nice device for very little money.
 
some bookmarks and more information.

1. Hardware:

Many sound people recommend using the Raspberry pi "Model B" rather than the "Model B+" which comes with 2 more USB ports, as the Model B has been around for longer and has had more work done in software development to resolve issues relating to audio. I've personally been using the Model B on various projects.

Raspberry Pi compatible soundcards:

http://elinux.org/RPi_VerifiedPeripherals#USB_Sound_Cards

Raspberry Pi compatible WiFi adaptors:

http://elinux.org/RPi_USB_Wi-Fi_Adapters

Remember you'll likely need to use a *powered* USB hub to run many WiFi adaptors and sound cards - the power supply on the Raspberry Pi may not be enough in itself.


2. OS/disk image:

Better to get a disk image / OS oriented towards audio production. The CCRMA Satellite is good:

https://ccrma.stanford.edu/~eberdahl/Satellite/

When I tried this image with the Behringer UCA222 - i discovered that it did not work in duplex (ie. could not record and play sound at the same time). This won't be a problem for most HiFi applications. None the less I used the following image that resolved the problems I was experiencing. This is a version of the CCRMA Satellite image, but excludes some changes that were made to accommodate the B+ model. See:

https://ccrma.stanford.edu/~eberdahl/Satellite/RPi_SatelliteCCRMA_v0.92stompbox.dd

The Satellite CCRMA has a forum that's very handy;

http://groups.google.com/group/satelliteccrma


3. Burning Disk Image

To install a disk image on an 8Gb SD card, see the various instructions on this page (a linux site but includes windows instructions):

http://elinux.org/RPi_Easy_SD_Card_Setup

4. Editing the RasPi

You can plug in a USB keyboard and a HDMI equipped monitor into the RasPi. I usually use "ssh" however from a remote machine. On windows the PuTTY client is popular. To run applications with a GUI from a machine on the same network as the Pi use a command such as:

ssh -X -C ccrma@satellite

where "satellite" is the internal IP address of your raspberry pi and "ccrma" is the default user in the case of the Satellie CCMA disk image. If you initially connect the Pi to your network with an Ethernet cable, it should be automatically configured to receive its IP address via DHCP. You 'll probably need to discover its IP by accessing your router via a browser. Most routers seem to be accessible with the address 192.168.1.1 or 192.168.0.1 (see the manual). From there, have a look at the attached devices to determine the IP of your Pi. If it's something like 192.168.1.37 for example, you can ssh to the device with:

ssh -X -C [email protected]

Note, with the standard CCRMA Satellite image the default password is: temppwd

Just discovered these instructions:

https://ccrma.stanford.edu/wiki/CCRMA_Satellite_How_To_Connect

5. Squeezebox server

To install a squeezebox server (i installed mine on a Linux desktop PC) see the logitech site:

http://www.mysqueezebox.com/download

You'll need to give the server machine a fixed IP on the LAN - your raspberry Pi will also need a fixed IP on the LAN. This can be done by manually configuring each machine, or by reserving IP addresses on the router for the specific MAC addresses of your devices.

6. Setting up a Squeezebox player on the Raspberry Pi

http://www.gerrelt.nl/RaspberryPi/wordpress/tutorial-installing-squeezelite-player-on-raspbian/


To get Spotify to work on my Squeezebox server, it was necessary to disable the standard spotify plugin and enable the version by the maker "Triode". Perhaps this is just a Linux thing though. To listen to BBC radio it was necessary to enable the "BBC iPlayer"

7.
Install a Squeezebox Controller on your android / iPhone / iPad


________

I've probably missed other steps but this should help anyone interested in getting started. In a couple of weeks I'll be able to upload my own Raspberry Pi disk image for download which should make things even quicker. Sorry I won't have time to do so before then.

Happy Christmas!
 
Last edited by a moderator:
The raspberry pi may not be configured to automatically reconnect to the WiFi network when the signal is dropped. To rectify this follow these instructions:

1. Go to /etc/ifplugd/action.d/ and rename the ifupdown file to ifupdown.original

ie.

cd /etc/ifplugd/action.d/
sudo mv ifupdown ifupdown.original

2. Then do:

sudo cp /etc/wpa_supplicant/ifupdown.sh ./ifupdown

3. Finally: sudo reboot

Note: when using the "sudo" command (which allows you to run commands as a super-user or administrator), you'll be asked for a password. In the case of the user "ccrma" which does have super-user privileges, this again is: temppwd
 
Last edited by a moderator:
I was wondering what to do with my Pi since I no longer use it to monitor the Viv, I have set up a media server but found the pi crashed too often, couldn't work out why, but hey, always looking for new projects.
I have a Pi2 on order, which has 4 usb ports and better power management so no need for an external hub, might be more stable.
 
I had no luck getting the Pi to work with audio until I shifted to an audio-specific flavour of raspian ie. the CCRMA Satellite. This should work with the newer 4 USB port Pis, although the developers recommend using the 2-port version as they've had longer to work on it. If you need audio duplex (recording and playing at the same time), it's better to use a non-standard OS image such as the "stompbox" one I mentioned above. That's the one I've been playing with. Good luck.
 

Latest posts

Back
Top