Closed AustinRobinson closed 4 years ago
Making a speaker with this library in impossible. A HomeKit speaker is a speaker with WiFi and AirPlay 2. And sadly AirPlay 2 is limited to MFi licensees who have a strict NDA.
However people could reverse engineer airplay 2 (like the did with airplay 1) but unfortunately that hasn’t happened yet
Is there any documentation on how they reverse engineered airplay 1?
HomeKit Speaker is not the same as an AirPlay 2 Speaker.
It is right what @renssies says About the AirPlay 2 Speeker.
But it is possible to build an HomeKit Speaker with this lib.
Take a look Accessory Identifier and the related Service and add them to this projekt.
Here are the related files from an Go based lib: https://github.com/brutella/hc/blob/master/service/speaker.go https://github.com/brutella/hc/blob/master/characteristic/mute.go https://github.com/brutella/hc/blob/master/characteristic/volume.go
@timoschilling: those are the speaker services that can only used for cameras and video doorbells sadly
That's not true!
Here is an Devise Created by the original Apple HomeKit Accessory Simulator:
Yeah, that is speaker control, it is made for controlling the speaker of cameras and video doorbells. It's not supported by the official Home app but you can use it to build your own accessories to control a speaker using a different HomeKit (like the Home app by Matthias that @timoschilling is using)
However it won't let you play music to it. That is only for AirPlay 2.
Sure, thats how HomeKit works!
But your statement Making a speaker with this library in impossible.
isn't right, it's possible.
HomeKit is for controlling things not for streaming Media.
It's like building an doorbell or an webcam with HomeKit, the controlling is the domain of HomeKit the Streaming technology not.
So to be able to stream music, Airplay 2 would need to be reverse engineered?
That is true, however, most people that mean a "HomeKit speaker" mean a speaker that appears in the Home app, which is an AirPlay 2 speaker.
So yes, you can build a HomeKit speaker with this library, meaning a speaker that you can control with a third party home app. However, you can't build a speaker that you can control using the Home app or stream music to.
And yes, in order to make a speaker that appears in the Home app and that you can stream music too from throughout iOS it will need to be an AirPlay 2 speaker. And in order to make one as a maker/hobbyist, you will have to wait for AirPlay 2 to be reverse engineered :)
Ok thanks
There is one other DIY way, buy an Apple AirPort Express A1392 (June 2012 or later) wich has an 3.5 mm audiojack and build it in your speaker. The A1392 has become AirPlay 2 support via an software update.
Ok, personally when I hear Homekit Speaker, I also think of an AirPlay destination (so you can open your iPhone/Mac, choose it as destination and have music being streamed from your iPhone/Mac to remote speaker). That probably has almost nothing to do with HomeKit, as AirPlay should handle all manipulations (like adjusting volume). HomeKit is not needed in that setup.
Though it is kind of interesting topic. I doubt ESP8266 is capable of doing that, but ESP32 definitely can. There are two parts in it: obviously, your device need to support some audio codec (according to Wikipedia, Apple Lossless Codec) over RTP. RTP stream should also be encrypted. You can check Espressif Audio Development Framework, looks like they have some codecs already implemented. E.g. here is a live streaming example that might be very useful. The second part is to make your speaker device appear as AirPlay destination. There are a number of open source scripts/libraries for that. I checked this one and it looks like it's a simple mDNS advertisement pointing to a HTTP server that handles commands like "play" and "stop".
Will this do what you want? https://github.com/mikebrady/shairport-sync
@mentaluproar I am sure that there are numerous programs that implement that. The idea here was to put everything onto a $5 hardware.
Any news?
Any news?
Airplay2 was recently reverse engineered. I’d expect renewed interest in this soon.
I would say, interest would renew if there would be off the shelf kits with ESP32 and speaker.
Closing this for now, not gonna happen in near future
Why close a ticket not solved?
Because do not plan to do that
It is not good to close this ticket if not solved... One guy can develop it...
Are there any examples or can someone provide an example on how to get a speaker working with this library?