What I wanted to doI wanted to play my music files (stored as AIFF files on my NAS) via the Raspberry Pi and control the process via my Macbook Pro as well as iPhone and iPad.
The ChallengeI first stumbled upon the Pi MusicBox. Kudos to its developer for putting this together but I found 2 challenges:
- MusicBox is available as a bootable image which means the entire Pi would only be used for this purpose. I wanted to use my Pi for other projects as well so this was an issue
- By digging through other sites, I found instructions by which I could install MusicBox through a set of manual steps. However, after installation, I found that the UI is not very pleasant to work with.
The SolutionI found an alternative to the MusicBox called Volumio. While it suffers from the same issue as MusicBox in that it is provided as a bootable image, I found that the UI was much nicer and far more intuitive to work with. So, I got Volumio working as per the following steps.
- There’s an excellent step-by-step tutorial which I followed to get Volumio installed on my Pi.
- Once Volumio was up and running (and accessible through the browser on my devices), I set up the connection to the NAS using Menu -> Library in the Volumio Web UI. This process ran pretty smoothly and after the initial reading of the NAS drive, I could easily retrieve tracks from the NAS and play them.
- The next challenge was getting Volumio to work with Spotify. There are quite a few messages online about how Spotify doesn’t work (or works ‘spottily’) with Volumio and though I tried all the suggestions provided there, I could not get Spotify to work. (BTW, you need to set up your Spotify account via Menu -> System where you need to activate the Spotify Service and enter your Spotify Premium account credentials. Please don’t try this without a Premium account – it won’t work!)
- I finally landed at the Github repository for ‘spop’ which is what I believe is used within the Volumio image to enable the Spotify service. Since I had manually installed Volumio instead of using the image, I decided to install ‘spop’ and see what happened. I followed steps 1-3 provided in the Readme.md and then the part following ‘If you want to install spop somewhere on your system, do the following steps:’
- I edited the spopd.conf file (in ‘/etc’) to look like this:
[spop] spotify_username = My Spotify Premium user name
spotify_password = My Spotify Premium password
audio_output = ao
output_name = hw:0
The command I run to get spop running is:
sudo /usr/bin/spopd -c /etc/spopd.conf
If you run into issues with Spotify (for example, nothing happens when you click on Spotify within the Volumio Browse window), you can run spop in debug mode.
sudo /usr/bin/spopd -d -c /etc/spopd.conf
- Restarted the Pi, started Volumio on my browser and when I went to ‘Browse’, I saw two entries, one for my NAS and the other for Spotify. When I clicked on Spotify, I saw all of my playlists and was able to play songs from them. Joy!
Hopefully, this is of some use to those of you who are trying to get your Pi working as a media server…