Home Jukebox with Raspberry Pi

Although iTunes, Spotify or YouTube lets me listen music everywhere and has bunches of music, I missed my Jazz collections ripped from CDs before. If you have a collection of digital music files, such as MP3, and a Raspberry Pi, you actually have a home jukebox. My plan is to run a music server on Raspberry Pi with speakers connected to it. And I would like to control the jukebox from my phone via wifi. Awesome, right? Let me show you how to do this.

Raspberry Pi, Power supply for Raspberry Pi, SD card, Wifi dongle, USB storage with digital music files, Speakers, and Audio connector.

Operating system for Raspberry Pi (here), Mopidy (music server, here) and Mopidy-MusicBox-Webclient (web extension for Mopidy, here)

First, connect speaker, USB stick with music files and wifi dongle to Raspberry Pi. Prepare operating system on SD card for running the system. After successfully booting on Raspberry Pi, setup wifi dongle and set auto mount the USB stick. Then install Mopidy and the extension with instructions from Mopidy documentation (here).

Mopidy is a great music server written in Python with two major services, MPD and HTTP server. Mopidy is also extensible with Python API, JavaScript API and JSON-RPC. Other contributors make useful extensions to play music from Spotify, SoundCloud and even Google Music and YouTube. Mopidy-MusicBox-Webclient is a pure web client written in JavaScript to control music playback on Mopidy. Because I want to control my jukebox from my phone or laptop, web client is an easy way. I also contribute to Mopidy-MusicBox-Webclient on Github (here).

MPD is abbreviation of Music Player Daemon with music playback functions and controller functions (here). Extending MPD directly is also possible, but using Mopidy is easier.

If all modules are correctly set up, connect to Raspberry Pi from URL like http://address/to/raspberrypi:6680/musicbox_webclient and you will see the control page like this:

Now you could have fun with your own jukebox at home!