Running Mopidy on a Raspberry Pi 1 Model B with a HifiBerry DAC using Raspian Jessie
tl;dr: Raspberry Pi 1 Model B + HifiBerry DAC + Raspian + Mopidy = Fully Operational HiFi Music Player
I recently unearthed a couple of old Rasberry Pi 1 Model B units equipped with HifiBerry DAC HATs. It’s been a couple of years since I tinkered with them, so I decided to see if I could get them to play music.
I was able to get everything up and running using Pi MusicBox, which provides just about everything one needs to run a music player on a Rasperry Pi. If you just want something that works out of the box, Pi MusicBox is fantastic.
However, I wanted to leverage the newer Raspian release, Jessie. And I wanted to configure everything myself.
- Download Latest Jessie Lite Image
- Install Image
- Boot Raspberry Pi
- Login to Raspberry Pi. SSH wasn’t running for me on first boot, so I had to use a keybord and monitor.
- Become root
sudo -i
(so you don’t have to prefix all subsequent commands with sudo). - Configure Pi using
raspi-config
. I enabled SSH, changed the root password, set locale and set timezone. - Install vim (for editing text).
apt-get install vim
. - Upgrade firmware. Those familiar with Raspian will likely know about the rpi-update firmware update utility. I found that
it wasn’t installed by default in Raspian Jessie Lite.
apt-get install rpi-update
did the trick. Runningrpi-update
updated the firmware to the current version. This probably wasn’t necessary, but I wanted to be current. I rebooted after this, then used SSH to continue the process. Avahi was installed by default, so I was able to reach the Pi on my network using raspberrypi.local.ssh pi@raspberrypi.local
. - Configure HifiBerry. Update /boot/config.txt
to enable HifiBerry and disable default audio. Comment out the
dtparam=audio=on
setting. Adddtoverlay=hifiberry-dac
. Save file and reboot (or you can reboot after installing mopidy if you can’t afford extraneous reboots). - Install Mopidy. The Mopidy docs are great. Just follow the instructions
- Configure Mopidy. I wanted to run Mopidy as a service, so I edited the config file at /etc/mopidy/mopidy.conf. See my mopidy.conf. There’s quire a bit going on here. See inline comments for more details.
- Install Mopify HTTP frontend.