Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Airplay 2 Emulation To Control Older Sonos Like Modern Airplay 2 Device #114

Closed
mbial opened this issue Dec 9, 2019 · 2 comments
Closed

Comments

@mbial
Copy link

mbial commented Dec 9, 2019

AirPlay 2 has been cracked. Please see news here.

If possible, would you consider using AirPlay 2 emulation to treat older Sonos devices like modern AirPlay 2-capable Sonos speakers? Thanks for your feedback!

@adavison007
Copy link

Was just reading this https://9to5mac.com/2019/12/05/airplay-2-cracked/

Would be great if this plugin could utilise it

@ebaauw
Copy link
Owner

ebaauw commented Dec 14, 2019

Short answer: No, it wouldn't. Consequently, I won't be working on this.

Your best option to get AirPlay2 to your old zone players is to (get Santa to) buy (you) an IKEA SYMFONISK bookshelf zone player for EUR 100, and use homebride-zp to group your existing zone players with the SYMFONISK.

Long answer below.

Please see #92, #82, #33. Airplay2 has nothing to do with HomeKit. It's a separate feature of Apple's Home app, not even available to other HomeKit apps.

Please read the news you're referring to: they've created a proof-of-concept to emulate an Airplay 2 device, but are nowhere near providing a stable product. Once there'll be a stable product, it will show up in the Home app because of the Airplay 2 protocol - no need for any homebridge plugin.

Technically, the only place to implement proper Airplay2 support for Sonos is on the zone player itself, i.e. in the zone player "firmware" (it's actually a full-blown Linux system). Any external solution will not be able to provide a seamless multi-room experience.

The issue is that a zoneplayer wants to initiate a connection to a music source/stream whereas in Airplay2 the music source initiates a stream to a speaker. So you need a gateway in between, that acts as an Airplay2 server to Airplay2 clients, and as a music source (server) to the zone player. The abandoned AirSonos project did exactly that. It would act as a radio station to the zone player and as a speaker to Airplay1 clients. It would re-broadcast the stream from the Airplay client to the radio stream client on the Sonos zone player, introducing a new layer of buffering. This additional buffering will break the multi-room synchronisation. The same will happen if the Airplay2 server connects to the zone player over the line-in, unless the line-in is configured without compression (which will cause issues when you group the line-in zone with other zones).

I did manage to integrate AirSonos in homebridge-zp, see #21, but abandoned that, since it wasn't worth the trouble. AirSonos doesn't work for MP3 streams with variable bitrate: the music is played at the right speed. Also, even on my macMini server, the sound was low quality (imo, too low to enjoy my music). I don't know the audio streaming protocols well enough to figure out what's going wrong, let alone how to fix that (assuming that would be possible in the first place).

The re-broadcasting of the music stream is resource intensive, too intensive to be handled in Javascript. While AirSonos runs on NodeJS, it has dependencies on C-modules, that need to be compiled while installing AirSonos. This will give a lot of overhead and issues, when trying to run homebridge-zp with integrated AirSonos on Docker or other non-mainstream platforms.

Concluding: a productised version of the proof-of-concept mentioned in the new won't be enough to Airplay2 to your Sonos zone players (unless you connect them through the line-in). You'll need something like AirSonos, which will break the multi-room synchronisation. I'm not even sure that "something like AirSonos" will provide acceptable music quality. Yet integrating that in homebridge-zp will cause many new support issues. It's simply not worth my trouble.

@ebaauw ebaauw closed this as completed Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants