« H G Wells on Technological Unemployment | Main | A Raspberry Pi Stratum 1 NTP Server »

Friday, January 29, 2016

In the MoOde for streaming internet radio on the Raspberry Pi Zero (updated)

When I saw the announcement of the Raspberry Pi Zero my first thought was that it would be a good basis for a headless Internet Radio Streamer for my hifi system.

So when I got my Pi Zero, I looked around for a cost-effective Digital to Audio Converter and found Pimoroni's pHAT DAC for the Pi Zero.

After a bit of web searching and reading, I settled on Tim Curtis' MoOde as my Media Player.

I've updated the instructions which follow for Moode 2.6 TR1 and later.

So, I downloaded MoOde 2.6 TR1 and flashed it to a MicroSD card.

I had a spare TP-Link wifi USB stick which worked with the Pi, so to make that work I booted up MoOde with the TV and USB keyboard plugged in, and edited /etc/network/interfaces so it looked something like this:

auto lo
iface lo inet loopback
#allow-hotplug eth0
#iface eth0 inet dhcp lan0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid your-ssid
wpa-psk your-pre-shared-key

Change the ssid and PSK to suit your environment.

After a reboot, I could SSH into moode.local and had a web interface to play with.

For the pHAT DAC, I selected the hifiberry DAC as it uses the same chipset, and lo, I soon had internet radio streaming into my hifi.

But gosh, the low quality BBC radio streams sounded just awful.

A bit more web searching revealed the solution.

And so I installed minimserver and minimstreamer and access the Beeb's HLS streams via minimstreamer.

The process is:

1: install JDK 8.

    sudo apt-get install oracle-java8-jdk

2: download MinimServer-0.8.4-linux-armhf.tar.gz and MinimWatch-0.8.4-linux-armhf.tar.gz from the minimserver download page.

3: extract as follows:

    sudo tar zxvf MinimServer-0.8.4-linux-armhf.tar.gz -C /opt
sudo tar zxvf MinimWatch-0.8.4-linux-armhf.tar.gz -C /opt

4: configure minimserver and minimwatch

    sudo /opt/minimserver/bin/setup

change the settings to not run at startup, and do the same for minimwatch

5: configure minimserver's media directory and enable the minimstreamer module in minimserver:

    sudo /opt/minimserver/bin/startc
install minimstreamer-0.5.24

6: create a new file minimserver.service in /etc/systemd/system

    sudo nano /etc/systemd/system/minimserver.service
with the following contents




7: Enable the newly created minimserver service

    sudo systemctl enable minimserver.service

8: Create a BBCRadio.m3u file in minimplayer's media directory with contents as per here

9: Reboot your Raspberry Pi

10: Add individual stations via Moode's interface using urls like*/R1/

And then enjoy the BBC's 320kbps HLS streams via your Pi Zero and pHAT DAC.

MoOde has excellent support over on the DIYAudio forum

Posted by Phil at 3:39 PM
Edited on: Monday, May 02, 2016 12:01 PM
Categories: Raspberry Pi