hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
155 stars 82 forks source link

Television support #157

Closed yfre closed 2 years ago

yfre commented 2 years ago

adding television service with television speaker and input source services and a number of characteristics

inspired by @dfrommi work https://github.com/hap-java/HAP-Java/issues/81#issuecomment-711149296 and HAP-NodeJS implementation.

this PR also fixed UUID of HAP Version.

once it is merged, i will submit updated sample test client with television accessory mocked

Signed-off-by: Eugen Freiter freiter@gmx.de

ccutrer commented 2 years ago

I'll try to at least skim this code in the next couple days. I'd be really excited to have television in OpenHAB!

yfre commented 2 years ago

I'll try to at least skim this code in the next couple days. I'd be really excited to have television in OpenHAB!

thank you. just to put expectation rights - with this we cannot control Apple TV. but we can pretend to be apple tv :) and can receive commands from virtual remote on iOS

the code itself is lot of copy&paste and typing. it is following the same approach as other accessories. the additional logic or so.

ccutrer commented 2 years ago

thank you. just to put expectation rights - with this we cannot control Apple TV. but we can pretend to be apple tv :) and can receive commands from virtual remote on iOS

Yup. No AirPlay either. It's just on/off and switching inputs. I have an LG TV that has HomeKit built in, so I know what to expect. Except my TV uses Bluetooth as its transport, and it's incredibly unreliable. I can't wait to publish it from OpenHAB instead, using its IP API which is far more reliable.

iRayanKhan commented 2 years ago

thank you. just to put expectation rights - with this we cannot control Apple TV. but we can pretend to be apple tv :) and can receive commands from virtual remote on iOS

Yup. No AirPlay either. It's just on/off and switching inputs. I have an LG TV that has HomeKit built in, so I know what to expect. Except my TV uses Bluetooth as its transport, and it's incredibly unreliable. I can't wait to publish it from OpenHAB instead, using its IP API which is far more reliable.

AirPlay 1 has been available, with AirPlay 2 (audio) being in beta for a bit now using shairport-sync.

In regards to video support, this project can do it in Java.

ccutrer commented 2 years ago

AirPlay 1 has been available, with AirPlay 2 (audio) being in beta for a bit now using shairport-sync.

Indeed. I've contributed to that project a bit as well. The point still stands - an AppleTV speaks both HomeKit and AirPlay 2. HAP-Java is just HomeKit. shairport-sync is just AirPlay 2. HomeKit is the control aspect, AirPlay is the actual streaming media aspect.