hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
152 stars 83 forks source link

TV accessory #81

Closed sobeos closed 2 years ago

sobeos commented 4 years ago

Are there plans to implement the TV accessory?

ccutrer commented 4 years ago

Not at this time. TVs are not documented in publicly available specifications, and presumably are actually part of AirPlay 2, not HomeKit (though there is a bit of a fuzzy line there, since AirPlay 2 may be using parts of HomeKit for pairing). See also https://github.com/mikebrady/shairport-sync/issues/535

sobeos commented 4 years ago

As far as I understand Apple's Homekit support has little to do with AirPlay 2. Looks like KhaosT has implemented basic TV support in HAP-NodeJS: Commit Reopen?

ccutrer commented 4 years ago

Interesting. I'm assuming he got his information by looking at protocol interactions with iOS 13 beta stuff, not from public docs. That (mostly) looks like vanilla HomeKit stuff.

And yes, HomeKit and AirPlay 2 are very interconnected. Apple TV's definitely are not HomeKit devices (they're AirPlay 2), and yet they show up in Home app. But it looks like there is some TV support that's just vanilla HomeKit.

iRayanKhan commented 4 years ago

Hi, HAP doesn't need AirPlay 2 for the TV accessory. The way it works is that the accessory only controls things like if its on or not like the toggle of it and the HDMI input. If the accessory relied on AirPlay 2, then it would be like the AppleTV or HomePod where it details if something is playing from the AirPlay 2 side which the TV doesn't. AirPort express for some reason adds due to AirPlay 2 in the Home App, but does absolutely nothing.

dfrommi commented 3 years ago

I was able to put together a TV accessory which in the end is using HAP-Java. It can't be directly copied to a PR, because I'm using a thin wrapper around HAP-Java for better integration into Kotlin and Project-Reactor, but end of the day, everything ends up at HAP-Java.

So if anyone is interested in migrating it to vanilla HAP-Java, here it is. PR https://github.com/hap-java/HAP-Java/pull/110 is required for the linked input-source service.

jannis6023 commented 3 years ago

Hi, any e.g. feature branch? Would really LOVE to use the TV Accessory for a new Integration!