pyatv icon indicating copy to clipboard operation
pyatv copied to clipboard

Add support for transient pairing in Companion

Open postlund opened this issue 4 years ago • 1 comments

What feature would you like?

I managed to figure out how transient pairing works in Companion (corresponding feature exists in AirPlay as well). It is automatic in the sense that no PIN or anything is required but the resulting connection is similar to a "guest account". So not much can be one over the resulting channel. I have however verified that setting up a connection works towards my HomePod and laptop (macOS). I have used buttons like play and pause on the HomePod with no problems. There's no tvremoteservice on macOS (at least not in Big Sur) so it doesn't work with macOS. An interesting note though is that it is possible to start a session towards com.apple.announce (on the HomePod), which might open up for proper announcements via Siri as (discovered by @jdsnape) instead of relying on streaming audio for TTS.

Describe the solution you'd like

Authentication shall be automatic in case it is supported. Early investigations suggests that bit 10 (DeviceWasSetupForHKAccessControl) in rpFl might be used to determine if transient pairing can be used or not (not 100% sure, but looks like it now at least).

Any other information to share?

I will publish my findings in the documentation when I have some time to update and try to implement support for it. Shouldn't be that hard.

postlund avatar Dec 15 '21 12:12 postlund

I tried com.apple.announce.announcement.message and it didn't work, so I feat that it is not possible to use transient pairing for announcements.

postlund avatar Dec 20 '21 10:12 postlund