My DIY multi-room music system
If you are curious why I went to such lengths, and did not buy a Sonos, read why I built my own multi-room music system. If you want to know what I built, read on!
The player/server
This is a small music player and server, which sits on display in the living room, and sends music to the living room amplifier, and various ‘zones’ around the house:
- Raspberry Pi 2
- Arch Linux (full configuration with Ansible)
- Music Player Daemon (MPD) as the core player
- Mothership (my Go/AngularJS/WebSockets web & mobile player UI for MPD)
- Local audio output with the excellent Hifiberry DAC+ & ALSA
- Multi-room (full-bitrate) audio output using PulseAudio, configured here
- Now-playing LCD with Flashlight (my simple MPD LCD program) and a basic16x2 HD44780 LCD
- A 5v switching power supply from an old Buffalo router
The ‘zone’ players
A simple player placed anywhere on the network, to add synchronised high-bitrate audio to that room. This works flawlessly over CAT5e, but had occasional glitches over WiFi bridges.
- Raspberry Pi 2
- Arch Linux (full configuration with Ansible)
- Local audio output with the excellent Hifiberry DAC+ & ALSA
- Zone (network audio) received using PulseAudio, configured here. Note that despite PulseAudio’s recommendations, it runs in system mode, so I can easily power-off a zone, and will start working automatically when powered back up
The player interface
The software I built to interact with the system is Mothership. It is a web/mobile application written using AngularJS for the front-end, Go as the back-end, and WebSockets to keep all connected phones/tablets/browsers in real-time sync with the player state. Check it out on Github.
Why “Mothership”? Because at some point when I was updating the Github readme, I happened to be listening to the brilliant album “Mothership Connection” by Parliament!
Thoughts
Many hours of tinkering went into this, but the results are fantastic, and very satisfying. I am very glad I did not buy Sonos, despite thinking they are a great piece of design.
Currently I have 3 ‘zones’, the living room, the kitchen, and the office. I’ll soon be adding the garage to the system. The quality is stunning thanks to the excellent Hifiberry DACs, and the user interface is exactly what I need; which is the joy of having built it! It’s fantastic when friends and family visit, jump on the WiFi and control the music like their own, but ultimately, this is a very self-indulgent project.
If you are interested in building something similar, the final configuration is actually very simple, and detailed in my Ansible repo here & here. There is no need to build your own UI, or use mine, as there are a huge number of alternatives freely available for MPD. That said, building your own is lots of fun!