For the longest time, I’ve been dreaming of a hackable solution to drive my multiple Sonos speaker setup. A while back, I thought I could cobble something together based upon Music Player Daemon (mpd). Didn’t really have time to dig deep into setting things up. The other bit is that getting Sonos to pick up streams from mpd seemed a bit kludgey.
I kept plugging away doing background research and discovered OwnTone
OwnTone is a media server that lets you play audio sources such as local files, Spotify, pipe input or internet radio to AirPlay 1 and 2 receivers, Chromecast receivers, Roku Soundbridge, a browser or the server’s own sound system. Or you can listen to your music via any client that supports mp3 streaming.
You control the server via a web interface, Apple Remote, an Android remote (e.g. Retune), an MPD client, json API or DACP.
OwnTone also serves local files via the Digital Audio Access Protocol (DAAP) to iTunes (Windows), Apple Music (macOS) and Rhythmbox (Linux), and via the Roku Server Protocol (RSP) to Roku devices.
Did some holiday hunkering down and got an OwnTone server deployed on my homeLAN. Had some challenges doing a build under Linux on a mini-PC but I found a community package that worked out well. Turns out I had some Linuxbrew stuff causing conflicts. After that it was a little bit of firewall configuration aaaand …
The frontend is nice while OwnTone also provides an mpd facade that’s controllable with mpd clients like mpc. There’s also a good looking JSON API. Plus it supports LastFM integration although I’ll keep on with my soco-scribbler work. Even more beautiful is the fact that it’s reachable over my TailScale network. All in all, a side project hacker’s delight.
Some burn-in needs to happen with a full play list run, but this is promising. Given the protocols that OwnTone is designed to service (DAAP and AirPlay), it shouldn’t be a surprise it does an excellent job of finding my AirPlay 2 speakers as output targets. I also have a pair of Homepod Minis that are only lightly used. Maybe this will give them renewed life.