FireTV


The firetv platform allows you to control an Amazon Fire TV/stick.

Steps to configure your Amazon Fire TV stick with Home Assistant:

  • Turn on ADB Debugging on your Amazon Fire TV:
    • From the main (Launcher) screen, select Settings.
    • Select System > Developer Options.
    • Select ADB Debugging.
  • Find Amazon Fire TV device IP:
    • From the main (Launcher) screen, select Settings.
    • Select System > About > Network.

To add FireTV to your installation, Note your device name, and add the following to your configuration.yaml file:

# Example configuration.yaml entry
media_player:
  # a device that does not require ADB authentication
  - platform: firetv
    name: Fire TV 1
    host: 192.168.0.111

  # a device that does require ADB authentication
  - platform: firetv
    name: Fire TV 2
    host: 192.168.0.222
    adbkey: "/config/android/adbkey"

  # a device for which getting the current app (source) and the running apps (sources) cause issues
  - platform: firetv
    name: Fire TV 3
    host: 192.168.0.123
    get_source: false
    get_sources: false

Configuration Variables

host

(string)(Required)The IP address for your Fire TV device.

name

(string)(Optional)The friendly name of the device.

Default value: Amazon Fire TV

port

(integer)(Optional)The port for your Fire TV device.

Default value: 5555

adbkey

(string)(Optional)The path to your adbkey file. Note that the file adbkey.pub must be in the same directory.

get_source

(boolean)(Optional)Whether or not to retrieve the current app as the source.

Default value: true

get_sources

(boolean)(Optional)Whether or not to retrieve the running apps as the list of sources.

Default value: true

ADB Authentication (for Fire TV devices with recent software)

If you get a “Device authentication required, no keys available” error when trying to set up Fire TV, then you’ll need to create an adbkey and add its path to your configuration. Follow the instructions on this page to connect to your Fire TV from your computer: Connecting to Fire TV Through adb.

In the dialog appearing on your Fire TV, you must check the box that says “always allow connections from this device.” ADB authentication in Home Assistant will only work using a trusted key.

Once you’ve successfully connected to your Fire TV via the command adb connect <ipaddress>, the files adbkey and adbkey.pub will be created on your computer. The default locations for these files are (from https://developer.android.com/studio/command-line/adb):

  • Linux and Mac: $HOME/.android.
  • Windows: %userprofile%\.android.

Copy the adbkey and adbkey.pub files to your Home Assistant folder and add the path to the adbkey file to your configuration.

ADB Troubleshooting

If you receive the error message Issue: Error while setting up platform firetv in your log when trying to set up a Fire TV device with an ADB key, then there is probably an issue with your ADB key. Here are some possible causes.

  1. ADB is not enabled on your Fire TV. To remedy this, enable ADB by following the instructions above.

  2. Your key is not pre-authenticated. Before using the adbkey in Home Assistant, you must connect to your Fire TV device using the ADB binary and tell the Fire TV to always allow connections from this computer. For more information, see the section “ADB Authentication (for Fire TV devices with recent software)” above.

  3. Home Assistant does not have the appropriate permissions for the adbkey file and so it is not able to use it. Once you fix the permissions, the component should work.

  4. You are already connected to the Fire TV via ADB from another device. Only one device can be connected, so disconnect the other device, restart the Fire TV (for good measure), and then restart Home Assistant.