AirPlay Audio
Two Raspberry Pis run AirPlay receivers so any Apple device in the flat can stream audio to the kitchen or the bathroom without a dedicated speaker app.
Setup
| Location | Hardware | AirPlay version | Runs as |
|---|---|---|---|
| Kitchen | Raspberry Pi 3B | AirPlay 2 | Docker container (shairport-sync) |
| Bathroom | Raspberry Pi Zero W | AirPlay 1 | Native systemd service (older OS, legacy repo) |
The volume-boost problem
Both Pis' analog audio output is too quiet at full hardware volume, so
a software mixer stage (+20 dB via an ALSA softvol plugin) sits between
shairport-sync and the hardware. The hardware mixer itself is deliberately
left fixed at 100% / 0 dB, and shairport-sync only ever adjusts its own
internal software volume. This avoids the volume jumps and mixer
conflicts that show up when multiple layers all try to control loudness.
Bathroom-specific integration
The bathroom Pi also runs a small custom tool that starts an internet radio stream automatically when its light sensor detects the light has been switched on. A simple flag file signals whether AirPlay is currently active, so the automatic radio stream politely stays off while someone is actively AirPlaying, and resumes its normal behavior as soon as the AirPlay session ends.
Why this design
- Software-only volume control avoids ALSA mixer conflicts across two different loudness sources.
- The flag-file handoff is trivial to implement and doesn't need a message broker for something this simple.
- Docker on the kitchen Pi keeps that receiver easy to update; the bathroom Pi's older OS made a native install more reliable than fighting Docker on legacy hardware.