Adding AirPlay to my outdated Sonos

Making my smart devices smarter with a Raspberry Pi Part 1

AirPlay Logo Other than running Homebridge, my Raspberry Pi has been mostly untouched since I setup my Sonos Volume Automation. I’ve been seeing what I can do to make my devices smarter using my Raspberry Pi as a bridge. I’m starting with AirPlay for my older Sonos system.

AirPlay for my Sonos

I have a Sonos Playbar and multiple Sonos Play:1s, and all my devices predate the Apple/Amazon/Google integration the current devices have. I’ve been a long time Sonos user and fan, but I’ve also been happy enough with my devices I haven’t bothered to upgrade. It’s easy enough for me to fire up the Sonos app and play my music from there, but it’s always been a hurdle for my wife. I decided I’d look into adding AirPlay.

After a little Googling there didn’t appear to be a Homebridge plugin that would add AirPlay, but I did find the AirConnect application. AirConnect makes Sonos devices (and Chromecasts) appear as AirPlay targets. I pulled down the repo onto my Raspberry Pi and navigated to the bin folder. The bin folder contains prebuilt binaries for a bunch of combinations of OS and processor. I experimented a bit and airupnp-arm-static worked for on my Raspberry Pi.

./airupnp-arm-static -l 1000:2000

I ran the command in terminal, and my Sonos appeared as an AirPlay target on my phone. AirPlay on iPhone

Creating a service

The last thing I needed to do was create a service so AirConnect would run on start up. Luckily the AirConnect GitHub repo had detailed instructions on creating a service.

Final thoughts

One thing I noticed playing music via AirPlay to my Sonos speakers is that there is a 3-5 second delay when I play or pause, but volume control is almost instant. I don’t have any native AirPlay speakers so I’m not sure if this is normal or a result of using AirConnect as a bridge. It’s totally fine for my family’s needs, but it might annoy some.

Making My Devices Smarter

This post is part of a series about making my devices smarter with a Raspberry Pi. See my other posts:
AirPlay for my old Sonos system
Homekit support for my Flic smart buttons
AirPrint for my printer


See also