Esparagus with AirPlay-2

This is a copy of a post prepared for the Esparagus Audio Brick Crowd Supply campaign.

In the last update, we used Squeezelite-ESP32 firmware to play audio via the AirPlay protocol. It is a great way to listen to music over wireless, with the possibility to play directly on Apple devices or integrate with Music Assistant.

The drawback is squeezelite’s implementation is a first version of AirPlay. This new, open-source implementation of the AirPlay protocol is a standalone v.2 alternative, with great work done by the community despite a lack of help from Apple!

The good news is that the project supports Audio Brick out of the box. You just need to pull the code from the repo and flash it to your device. A code-free web-installer is coming as well.

How to Get Started

While I’m working on a simplified web-installer with pre-built binaries, you can try it out right away with the help of another community project – Platformio. All you need to do is install vscode, add platformio plugin, and you’re ready to go.

Pull the AirPlay code somewhere into your filesystem first:

git clone https://github.com/rbouteiller/airplay-esp32 && code airplay-esp32

When VSCode loads, find the Platformio tab in the left navigation, select esparagus-audio-brick or esparagus-audio-brick-s3 in the list of available configs (depending on the Audio Brick version you have), and run the Upload Filesystem image and Upload and Monitor tasks (assuming you have your board connected to the USB).

The Platformio magic happens now, pulling all the dependencies, platform files, frameworks, and building a binary for your board. Once it is flashed, all that is left to do is configure Wifi credentials using the built-in access point or connect Ethernet, if you’re looking for lower latency.

Playing Audio

As soon as the board is online, you can use it with your Apple devices, with perfect sync if you have several.

Or, you can use Music Assistant if you already have some devices in the Home Assistant:

If you have an optional display connected, it can show current playback information:

DSP Configuration

But the main benefit of standalone AirPlay implementation over squeezelite is built-in DSP support. Folks from the Airplay2 project made an extra push to support the TAS5825M built-in 15-band equalizer, so you can use the self-hosted UI to adjust sound settings for your speakers and taste. Settings will persist and be restored after reboot.

In the next update, we will look into another standalone firmware alternative, which, up until recently, ruled the open-source world of multi-room synchronized audio: the Snapcast protocol. Stay tuned!