A Sonos Music Server with Raspberry Pi

We have been users of the Sonos wireless music system in our house for many years. It provides music to almost every room reliably and with excellent fidelity. Music can be sourced from almost any online source, or from a local cache of music files.

Our preference is to use the local source, since that does not use any of our very limited internet bandwidth. We have had these music files spread over several different computers on the network, and in lots of different formats. This created a host of problems that needed a solution to consolidate all of those files in one place. I didn’t want to use the main HTPC computer as it’s function is just to do movies and provide music to the main listening system. I also didn’t want to use an office computer as they get turned off at night.

This server needed to be small, reliable, headless (meaning no keyboard or display) and connect directly to the LAN after the hardware firewall. The Raspberry Pi turned out to be an ideal solution to the problem. In the picture you can see two small black boxes. The one with the blue light is a 500GB hard drive in a generic USB enclosure. That disk contains some 12,000 mp3 and flac music files. The other small black box is a Rasperry Pi model 4 computer. Don’t be taken in by that tiny box. It is a full featured mini pc that can do anything a desktop can do. It can run any program you desire including full office software suites.

In this case all I wanted was to connect the hard drive to the computer and then to the network, where the Sonos controller software could request the desired music from that drive. In short it works perfectly. The little Pi runs 24/7 and unless something causes the power to fail, no intervention with it is needed. Even then, I can remotely log into it to restart it if necessary, however it is setup to just start the music service on its own on boot up.

If anyone is interested in creating an NAS music server using the Pi, I will be glad to send you the instructions for doing this. It will take a bit of tinkering with some settings and editing some configuration files on the Pi, but nothing really heavy duty.

There are lots of other automation tasks I am considering for this gadget, and I will post about those later.

HTPC changes

A few years ago I started using an older Mac Mini as an HTPC computer with great success. It had all our films, music, pictures and home videos. A year ago that processor died, and I got a new Mini. This sucked. It was slow, cantankerous, video was jerky and sound was not up to par.

This time I wanted to build a unit that was bulletproof, reliable, expandable and FAST. The build started with a Silverstone HTPC case that could hold the motherboard and up to 12 SATA drives. I only use 4 spots, but have plenty of room to expand. The MB is a low end gaming board that has a claim of an excellent audio section. The processor is an AMD Ryzen 4 core at 3ghz. 16GB of Ram 12TB of disk, and a very fast SSD for the boot drive. The OS is Ubuntu 19.04.

One of the issues with the Mac is that it could only support optical digital out. That is a noisy and jittery method of sending a digital signal because there is no way to clock it. My research said the USB output would be better because it is clocked at the source. Unfortunately, my DAC was too old to handle the USB input directly, so I found the Schiit Audio Eitr that sends a coax SP/DIF signal to the DAC. Ubuntu has some configuration issues with it, but after a bit of experimentation and coding, I got it to work at all sample rates and bit depths, WOW what a difference. The sound is more focused, detailed and smooth. The sound stage is absolutely stable, and the grittiness is gone.

I can now run Kodi, and several background tasks, and the system handles it perfectly. Love the new system.