lukasroegner / homebridge-philips-hue-sync-box

Homebridge plugin for the Philips Hue Sync Box.
MIT License
55 stars 12 forks source link

Question: Is there a way to expose the active HDMI port to HomeKit? #44

Closed Calorion closed 2 years ago

Calorion commented 3 years ago

I’ve got the plugin up and running in Homebridge, but I don’t see any way for HomeKit to tell which if any HDMI ports are active, so that I can use “Apple TV turns on” in Automations. Is there a way to do this that I don’t see?

luigi-lauro commented 3 years ago

This should definitely be possible as per documentation/wiki.

tvAccessory (optional): Enables a TV Accessory for switching the inputs of the Sync Box. Defaults to false. tvAccessoryType (optional): Type of icon that the Apple Home app should show. Possible values are tv, settopbox, tvstick or audioreceiver. Defaults to tv.

With this you should have a selector to switch the input, or even to read the current HDMI input, as a TV accessory of the type chosen in the configuration. This shows as "Enable HDMI TV" and "HDMI TV HomeKit Type" in Homebridge Configuration UI if you don't want to mess with the JSON config yourself.

I didn't try it myself because I have only one input plugged in in my sync box due to using an AV Receiver, but everything else in the plugin works perfectly so I would be surprised if this didn't. If you face an issue though I can try it on my setup and report back but first try :-)

luigi-lauro commented 3 years ago

Were you able to make it work?

Calorion commented 3 years ago

Were you able to make it work?

Well, the reason I needed this feature became moot, so I never tried.

lukasroegner commented 2 years ago

There is a status property reported for each HDMI input by the Sync Box API. The values are unplugged, plugged, linked and unknown, however, the API docs do not provide a description of that those values mean.

I haven't found a way to expose something like "input X is active" to HomeKit. It may be possible to enable/disable inputs of a TV accessory based on the state reported by the Sync Box, but that cannot be used for automations.