One year ago I have written about my Spotify setup. I am still having a Spotify acount, but now that the novelty is gone I find myself listening to it less often. One of the reasons is that I still like to buy music. When I buy a CD, then I rip it to FLAC (an open standard for lossless audio), because that is the way I prefer to listen to it. I can mount my audio collection over SSH with autofs and sshfs when I am not at home. And at home I have a network connected audio system. At home I want to be able to control the music in the living room using a smart phone. Recently I find myself moving from Apple towards Android. Fortunately the audio system I bought supports both the proprietary Apple AirPlay protocol as the open uPnP/DLNA media protocol.
Control point on the server
In my Spotify post I explained you can play the music from an iPhone and stream it using AirPlay. This turned out to be a problem, since your iPhone is in your pocket all the time. When your select music and leave the room the music stops or if you are half within reach, stutters. This is very annoying for other people in the room. I feel this is a critical flaw in the “connected” music experience in my house. In the end it should not matter who selects the music that is playing in a room.
To work around this problem I now use an iPad in the living room to play the music from. This might be an expensive workaround, but it works for me. A better solution would be to move the “control point” from the tablet to the media server. Then we don’t need a dedicated tablet to act as a control point for the room. It also means anyone can access an app on his/her phone and change the music in the room. This turns out to be the ideal situation and this is exactly what the OpenHome media protocol can bring us.
OpenHome media protocol
Devices can implement ohMedia in place of, or alongside of, the UPnP Forum’s AV standards. It offers a number of advantages over the UPnP Forum’s AV standards.
One of the advantages is:
Better support for playlists: Playlists are stored on the renderer, allowing playback to continue when the control point leaves the network (e.g. your tablet goes to sleep, runs out of battery, or leaves the wifi zone).
This is important and expected, because we want the smart phone to tell what to play, but we don’t want it to actually be the point that plays the music or tells what to play next.
DLNA + uPNP + OpenHome
We need to install the following to get to the perfect setup:
- “minidlna” on the Linux server to provide a DLNA media server
- “BubbleUPnP Server” on the Linux server to convert the uPnP media renderer into an OpenHome media renderer
- “BubbleUPnP Android app” on the Android phone to control the playlist on the OpenHome media renderer
This is not just any combination of applications. This is thoroughly tested and I tested many other software packages for many days.
On Ubuntu 14.04 you can install minidlna 1.1.2 using the following command:
sudo apt-get install minidlna
We still need to configure some preferences by editing the configuration file:
sudo nano /etc/minidlna.conf
Look for the “media_dir” directive and enable something like this (“A” is for audio):
Look for the “root_container” directive and set it to “B” if you like your own folder structure:
Here you specify on which interface the server should listen:
To make the configuration effective you need to save and exit with “Ctrl-X” “y” and restart minidlna using:
sudo service minidlna restart
Now you can access the status page on: http://localhost:8200/
Installing BubbleUPnP Server
Unfortunately Ubuntu 14.04 does not have BubbleUPnP in the repository. This is why you need a PPA:
sudo add-apt-repository ppa:bubbleguuum/bubbleupnpserver sudo apt-get update sudo apt-get install bubbleupnpserver
After installing you need to configure your renderer on the following URL: http://localhost:58050/
On the tab “Media Renderers” you need to check “Create an OpenHome renderer” for your renderer. On the “Network and Security” tab I recommend you to leave everything unchecked.
Installing the BubbleUPnP app
BubbleUPnP is a paid Android app, but it also has a free version with some limitations. Fortunately these limitations do not prevent you to properly evaluate the product. A full featured version costs less than 4 euro.
With the described setup I really enjoy playing music from my personal collection using my Android phone. I use the setup daily and it is as convenient as playing my Spotify music from my iPad. Great work by the community. Kudos should also go to NETGEAR and BubbleSoft for creating awesome software for Linux and Android.