Giter Club home page Giter Club logo

homebridge-appletv's Introduction

Homebridge Apple TV

This is a Homebridge plugin that exposes Apple TVs to HomeKit, noteably the power state as a switch and optionally the device state (playing, paused, etc.) as motion sensors.

Installation

To make this plugin work you need to install PyATV. To ensure you did it right run

atvremote --version

Configuration

Configuration can be done using Homebridge Config UI X.

Sample Configuration

{
    "platform": "AppleTV",
    "devices": [
        {
            "name": "Living Room",
            "host": "192.168.0.36",
            "credentials": "...",
            "device_state_sensors": [
                "idle",
                "paused",
                "playing"
            ],
            "app_sensors": [
                "Netflix",
                "Disney+"
            ],
            "generic_sensors": [
                {
                    "property": "mediaType",
                    "values": [
                        "music",
                        "tv",
                        "video",
                        "unknown"
                    ]
                },
                {
                    "property": "genre",
                    "values": [
                        "Pop"
                    ]
                }
            ]
        }
    ]
}

Configuration Definition

  • platform: The identifier for the platform (AppleTv).
  • devices: A list of devices you would like to register with the platform.
    • name: The name of the Apple TV.
    • host: The IP of the device.
    • credentials: The credentials needed to authorise connection to the device.
    • device_state_sensors [optional]: Enables a "motion sensor" for detecting device states. Possible values: "idle", "loading", "paused", "playing", "seeking", "stopped"
    • app_sensors [optional]: Enables a "motion sensor" for detecting current appin use.
    • generic_sensors [optional]: Enables a "motion sensor" for detecting generic states.

Retrieving credentials

In order to retrieve credentials for your Apple TV, please follow these step

  1. Execute the following command to scan for Apple TVs:
atvremote scan
  1. Choose the device with which you would like to pair and run the following command:
atvremote -s {YOUR-APPLE-ID-IP-ADDRESS} --protocol companion pair
  1. Enter the PIN shown on your device.

homebridge-appletv's People

Contributors

hujohner avatar joelwetzel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.