Plugin that exposes the Apple TV to HomeKit with much richer features than the vanilla Apple TV implementation of HomeKit.
npm install homebridge-appletv-enhanced-universalconfig.json ;).
virtualenv. (the plugin will create a virtual environment on startup and will install python dependencies in this virtual environment)
virtualenv has to be installed manually. This won't be handled by the plugin itself.
sudo apt install python3-venv
You need to pair your Apple TV before the plugin can connect to it. Enter the PIN that is currently displayed on the device here: http://192.168.0.12:42015/ where the link http://192.168.0.12:42015 is different in your log and distinct for one Apple TV if you are connecting multiple.
Paring was successful. Add it to your home in the Home app: com.apple.home://launch). To be sure, take a look into the logs, you may have entered the PIN wrong too often or let the pairing request time out too many times (Logs: Too many attempts. Waiting for x seconds before retrying.). If you are requested to enter a PIN again (see first image below) you have most probably entered the wrong PIN ... the plugin will attempt a new pairing attempt. Enter the new PIN displayed on the Apple TV again.
Please add [Apple TV Wohnzimmer (2)] manually in
Home app. Setup Code: xxxx-xxxx this is not the code that you have seen on the Apple TV display).
platforms section of Homebridge's config.json after installing the plugin.
config.json
json
{
"name": "Apple TV Enhanced",
"platform": "AppleTVEnhanced",
"mediaTypes": ["music", "video", "tv", "unknown"],
"deviceStates": [
"idle",
"playing",
"loading",
"seeking",
"paused",
"stopped"
],
"deviceStateDelay": 0,
"remoteKeysAsSwitch": [
"channel_down",
"channel_up",
"down",
"home",
"home_hold",
"left",
"menu",
"next",
"pause",
"play",
"play_pause",
"previous",
"right",
"select",
"skip_backward",
"skip_forward",
"stop",
"turn_off",
"turn_on",
"top_menu",
"up",
"volume_down",
"volume_up"
],
"avadaKedavraAppAmount": 15,
"customInputURIs": [
"https://www.disneyplus.com/movies/rogue-one-a-star-wars-story/14CV6eSbygOA",
"https://www.netflix.com/watch/81260280",
"https://tv.apple.com/show/silo/umc.cmc.3yksgc857px0k0rqe5zd4jice",
"vlc://https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8"
],
"disableVolumeControlRemote": false,
"setTopBox": false,
"deviceSpecificOverrides": [
{
"mac": "AA:BB:CC:DD:EE:FF",
"overrideMediaTypes": true,
"mediaTypes": ["music", "video"],
"overrideDeviceStates": true,
"deviceStates": ["paused", "playing"],
"overrideDeviceStateDelay": true,
"deviceStateDelay": 3,
"overrideRemoteKeysAsSwitch": true,
"remoteKeysAsSwitch": [
"home",
"play_pause",
"stop",
"volume_down",
"volume_up"
],
"overrideAvadaKedavraAppAmount": true,
"avadaKedavraAppAmount": 15,
"overrideCustomInputURIs": true,
"customInputURIs": [
"https://www.disneyplus.com/de-de/movies/avatar-the-way-of-water/6hlsDJnhiU30"
],
"overrideDisableVolumeControlRemote": true,
"disableVolumeControlRemote": true,
"overrideSetTopBox": true,
"setTopBox": true
}
],
"discover": {
"multicast": true,
"unicast": ["192.168.0.15"],
"blacklist": ["AA:BB:CC:DD:EE:FF", "192.168.0.42"]
},
"forceVenvRecreate": false,
"logLevel": 3,
"updateCheckLevel": "stable",
"autoUpdate": "on"
}
`
| Attribute | Description | Type | Valid values | defaults to ... |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| name | The name of the plugin, e.g. shown in the logs. | string | | Apple TV Enhanced |
| mediaTypes | edia types for which a motion sensor is created that triggers when the according media type is present on the Apple TV | array[string] | music, tv, unknown, video | [] |
| deviceStates | Device states for which a motion sensor is created that triggers when the according device state is present on the Apple TV | array[string] | idle, loading, paused, playing, seeking, stopped | [] |
| deviceStateDelay | The time in seconds that the Apple TV needs to report a device state continuously before the plugin will report the device state. E.g. when pausing a video, the video needs to stay paused for x seconds before the state will be reported. | integer | 0 - 15 | 0 |
| remoteKeysAsSwitch | Remote keys which will be exposed as switches to HomeKit, e.g. to use the remote keys in automations. | array[string] | channel_down, channel_up, down, home, home_hold, left, menu, next, pause, play, play_pause, previous, right, select, skip_backward, skip_forward, stop, turn_off, turn_on, top_menu, up, volume_down, volume_up | [] |
| avadaKedavraAppAmount | How many apps should be closed when selecting the Avada Kedavra Input? Avada Kedavra works by sending a sequence of remote control inputs to the Apple TV. The plugin therefore acts blindly and does not receive any feedback when all apps are closed. So if a high number is selected, the plugin presses the remote control until theoretically x apps are closed, although in reality all apps are already closed. | integer | 5 - 35 | 15 |
| customInputURIs | Provide URIs for custom Inputs that open the URI on the Apple TV when selected. | array[string] | | [] |
| disableVolumeControlRemote | Disables the volume control in the iOS remote. It is recommended to disable volume control when the audio setup that the Apple TV is connected to does not supports ARC since the Apple TV does not have any control over the volume in this scenario anyways. | boolean | | false |
| setTopBox | Instead of exposing an Apple TV accessory, the plugin will expose a set-top box accessory. You need to repair the accessory with your Home app in order to see the changes. | boolean | | false |
| discover.multicast | The default and recommended way to discover Apple TVs. | boolean | | true |
| discover.unicast | Recommended for Apple TV devices that are not discovered by multicast discovery. Add the IPv4 addresses here. Remember that this requires the Apple TV to have a static IP. | array[string] | valid IPv4 addresses | [] |
| discover.blacklist | Apple TVs that should not be added as a device. You can get the MAC-Address from the logs. When using IPv4 Addresses the regarding Apple TVs need to have a static IP. | array[string] | valid MAC addresses | [] |
| forceVenvRecreate | Set this to force to recreate the virtual python environment with the next restart of the plugin. Remember to set this option to false after the virtual environment has been recreated. | boolean | | false |
| logLevel | Set the log level. (0 - None; 1 - Error; 2 - Warn; 3 - Info; 4 - Debug; 5 - Verbose) | integer | 0 - 5 | 3 |
| updateCheckLevel | Apple TV Enhanced is regularly checking if there is an update available and printing it to the logs. You can select whether you want to check for stable or beta updates. | string | stable, beta | stable |
| autoUpdate | Apple TV Enhanced will update itself automatically once there is an update available. Change the "Update Check Level" to install or leave out betas. It is recommended to operate this plugin as a child bridge if enabling this functionality since the plugin will automatically restart the bridge after updating (the whole homebridge if it the plugin is not running as its own child bridge). By default, auto updating is turned on when operating AppleTV Enhanced as a child bridge. | string | on, off, _undefined_ | on if the plugin acts as a child bridge, otherwise off`. |