I love my Sonos speaker system – it makes it so simple to play music around my flat. However I keep up with several podcasts and like to listen to them whilst cooking and doing chores. Sadly the Sonos support for Podcasts is awful: either attempt to find the show via their TuneIn support (which rarely has the latest versions of BBC shows) or stream directly from an iPhone via the Apple Podcasts app. Everybody has known for ages that the Apple Podcasts app is rubbish and uses something else instead, but in Sonos’ wisdom they don’t support any other apps so you need to keep two copies of subscriptions.
Imagine my delight when I came across AirConnect. AirConnect adds Apple AirPlay capabilities to a Sonos system. This is so powerful: AirPlay allows you to cast all sound output from a device to a remote speaker system, which would allow me to stream podcasts direct from RSS Radio into my kitchen Sonos.
AirConnect is a small executable so needs to be run from somewhere. I have a Synology NAS that runs a cut down version of ARM Linux. As it is always online it’s the perfect place to host the application on my network.
Before running the commands ensure that SSH is enabled on your DiskStation – follow this guide to enable it. SSH in to your NAS and run:
curl "https://github.com/philippe44/AirConnect/blob/master/bin/airupnp-arm?raw=true" -o airupnp -L
chmod 755 airupnp
sudo mv airupnp /usr/local/bin/airupnp
Try the program and it should detect a Sonos within around 30 seconds and make it available over AirPlay (with a + character at the end of its name):
To configure the process to run automatically at system startup, create a new file in /etc/init/airupnp.conf called airupnp.conf with the following contents:
# only start this service after the httpd user process has started
start on started httpd-user
# stop the service gracefully if the runlevel changes to 'reboot'
stop on runlevel 
# run the scripts as the 'http' user. Running as root (the default) is a bad idea.
# So upstart can track the process properly
# exec the process. Use fully formed path names so that there is no reliance on
# the 'www' file is a node.js script which starts the foobar application.
exec /usr/local/bin/airupnp -f /var/log/airupnp.log -z
Run sudo start airupnp to start the process and verify it works as expected.