diff --git a/source/_components/apple_tv.markdown b/source/_components/apple_tv.markdown new file mode 100644 index 000000000000..2d01f193f424 --- /dev/null +++ b/source/_components/apple_tv.markdown @@ -0,0 +1,146 @@ +--- +layout: page +title: "Apple TV" +description: "Instructions how to integrate Apple TV devices into Home Assistant." +date: 2017-06-26 20:47 +sidebar: true +comments: false +sharing: true +footer: true +logo: apple.png +ha_category: Hub +ha_iot_class: "Local Push" +ha_release: 0.49 +featured: true +--- + +The `apple_tv` platform allows you to control an Apple TV (3rd and 4th generation). See the [remote platform](/components/remote.apple_tv/) if you want to send remote control buttons, e.g. arrow keys. + +
+Currently you must have Home Sharing enabled for this to work. Support for pairing Home Assistant with your device will be supported in a later release. +
+ +To use this component, you must first install some system libraries and a compiler. For Debian or a similar system, this should be enough: + +```shell +$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev +``` + +If you want to automatically discover new devices, just make sure you have `discovery:` in your `configuration.yaml` file. To manually add one or more Apple TVs to your installation, add the following to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +apple_tv: + - host: IP_1 + login_id: LOGIN_ID_1 + name: NAME_1 + start_off: START_OFF_1 + credentials: CREDENTIALS_1 + - host: IP_2 + login_id: LOGIN_ID_2 + name: NAME_2 + start_off: START_OFF_2 + credentials: CREDENTIALS_2 +``` + +Configuration variables: + +- **host** (*Required*): The IP-address of the device. +- **login_id** (*Required*): An identifier used to login to the device, see below. +- **name** (*Optional*): The name of the device used in the frontend. +- **start_off** (*Optional*): Set to true if device should start in fake standby. +- **credentials** (*Optional*): Credentials used for AirPlay playback. + +In order to connect to the device you need a *login id*. The easiest way to obtain this identifier is to use the `apple_tv_scan` service (described below). Additional information about `start_off` and `credentials` can also be found under the guides section. + +## {% linkable_title Guides %} + +### {% linkable_title Scanning for devices %} + +To scan for devices, press the icon in the upper left corner and select the leftmost icon according to the image: + ++Turning the device on/off in the user interface will *not* turn the physical device on/off according to description above. +
+ + +### {% linkable_title Setting up device authentication %} + +If you, when playing media with `play_url`, get the following error message: + +*“This AirPlay connection requires iOS 7.1 or later, OS X 10.10 or later, or iTunes 11.2 or later.”* + +then device authentication is required. Press the icon in the upper left corner and select the leftmost icon according to the image below: + +-Currently you must have Home Sharing enabled for this to work. Support for pairing Home Assistant with your device will be supported in a later release. -
- -If you want to automatically discover new devices, just make sure you have `discovery:` in your `configuration.yaml` file. To manually add an Apple TV to your installation, add the following to your `configuration.yaml` file: - -```yaml -# Example configuration.yaml entry -media_player: - - platform: apple_tv - host: IP_ADDRESS - login_id: LOGIN_ID -``` - -Configuration variables: - -- **host** (*Required*): The IP-address of the device -- **login_id** (*Required*): An identifier used to login to the device, see below -- **name** (*Optional*): The name of the device used in the frontend - -In order to connect to the device you need a *login id*. The easiest way to obtain this identifier is to use the application ``atvremote``. It should be available in the same environment as you installed Home-Assistant. To install this utility, run ``pip3 install --upgrade pyatv``. The run atvremote scan for all devices (try again if a device is missing): - -```bash -$ atvremote scan -Found Apple TVs: - - Apple TV at 10.0.10.22 (login id: 00000000-1234-5678-9012-345678901234) -``` - -Just copy and paste the login id from the device you want to add. For more details about `atvremote`, see: [this page](https://github.com/postlund/pyatv/blob/master/docs/atvremote.rst). - -## {% linkable_title Notes and Limitations %} - -- Pairing is currently not supported +To setup the `apple_tv` platform, please follow the instructions on the [Apple TV Component page](/components/apple_tv/). diff --git a/source/_components/remote.apple_tv.markdown b/source/_components/remote.apple_tv.markdown new file mode 100644 index 000000000000..e1bba9e06599 --- /dev/null +++ b/source/_components/remote.apple_tv.markdown @@ -0,0 +1,44 @@ +--- +layout: page +title: "Apple TV" +description: "Instructions how to integrate Apple TV remote into Home Assistant." +date: 2017-06-26 20:50 +sidebar: true +comments: false +sharing: true +footer: true +logo: apple.png +ha_category: Remote +ha_iot_class: "Local Push" +ha_release: 0.49 +--- + + +The `apple_tv` remote platform allows you to send remote control buttons to an Apple TV. It is automatically setup when an Apple TV is configured, please see [Apple TV Component](/components/apple_tv/) for configuration details. + +At the moment, the following buttons are supported: + +- up +- down +- left +- right +- menu +- top_menu +- select + +A typical service call for press several buttons looks like this. + +```yaml +service: remote.send_command +data: + entity_id: remote.apple_tv + command: + - left + - left + - menu + - select + device: '' + +``` + +Please note that `device` must be specified (because of validation) but is not used by this platform. So you may specify any value. diff --git a/source/images/components/apple_tv/auth_pin.jpg b/source/images/components/apple_tv/auth_pin.jpg new file mode 100644 index 000000000000..b87b2a7d6ca5 Binary files /dev/null and b/source/images/components/apple_tv/auth_pin.jpg differ diff --git a/source/images/components/apple_tv/auth_start.jpg b/source/images/components/apple_tv/auth_start.jpg new file mode 100644 index 000000000000..6a35609c9962 Binary files /dev/null and b/source/images/components/apple_tv/auth_start.jpg differ diff --git a/source/images/components/apple_tv/scan_result.jpg b/source/images/components/apple_tv/scan_result.jpg new file mode 100644 index 000000000000..0051f451666f Binary files /dev/null and b/source/images/components/apple_tv/scan_result.jpg differ diff --git a/source/images/components/apple_tv/scan_start.jpg b/source/images/components/apple_tv/scan_start.jpg new file mode 100644 index 000000000000..2b40fbf2265b Binary files /dev/null and b/source/images/components/apple_tv/scan_start.jpg differ