Linux play on Sonos via Airplay

Apple's Airplay is a really great thing. You simply select the existing Airplay-enabled speakers (in my case Sonos) in the Mac/iPhone and the party starts. In the background, the Bonjour service is responsible for this smooth process. Under Linux there is avahi for this. After looking at the avahi howto from archlinux wiki i thought to myself finding so much stuff for a few speakers? there must be a more elegant way! And yes here is a static configuration that creates a new Sink for pipewire-pulse service:

Copy the following file sonossink.conf in the pipewire-pulse.conf.d folder (~/.config/pipewire/pipewire-pulse.conf.d) and change the IP to fits your setup.

# Airplay Config for my Sonos ♞Raffael.Willems 
context.modules = [
{   
    name = libpipewire-module-raop-sink
    args = {
        raop.ip = "192.168.0.46"
        raop.port = 7000
        raop.name = "Sonos"
        raop.encryption.type = "auth_setup"
        stream.props = {
            # extra sink properties
        }
# having a service 
    }
}
]

You must restart your pipewire-pulse service

systemctl --user restart pipewire-pulse

now you should have a new Sink named Sonos

pw-cli list-objects Node | grep Sonos

RWill_2024-08-24%2012-01-43

RWill_2024-08-24%2012-02-34

Now you can listen to music on the Airplay-enabled device with a program of your choice. I have configured my Sonos as a stereo pair and this also works wonderfully 🙂

Previous Post Next Post