Fire TV Setup Help

My HTPC bit the dust so we picked up a fire TV as all we really used it for was Youtube and netflix.

I am running Hassio on top of Ubuntu. Currently running 83.3.

In my main configuration file I have:

media_player:
  - platform: firetv
    name: Fire TV
    host: 192.168.1.21
    abdkey: config/android/adbkey

In android/adbkey are:

adkey
adbkey.pub

I created the two adbkey files on another linux machine and it stated that everything connected correctly and I allowed the “always allow connections from this device.” when it popped up.

I am currently getting the following error.

018-12-20 12:00:00 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform firetv
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/firetv.py", line 71, in setup_platform
    ftv = FireTV(host)
  File "/usr/local/lib/python3.6/site-packages/firetv/__init__.py", line 106, in __init__
    self.connect()
  File "/usr/local/lib/python3.6/site-packages/firetv/__init__.py", line 119, in connect
    self._adb = adb_commands.AdbCommands().ConnectDevice(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/adb/adb_commands.py", line 142, in ConnectDevice
    self._Connect(**kwargs)
  File "/usr/local/lib/python3.6/site-packages/adb/adb_commands.py", line 173, in _Connect
    conn_str = self.protocol_handler.Connect(self._handle, banner=banner, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/adb/adb_protocol.py", line 318, in Connect
    'Device authentication required, no keys available.')
adb.usb_exceptions.DeviceAuthError: Device authentication required, no keys available.

I tried the troubleshooting setps, adb is enabled, key should be pre-authenticated, permissions for the key files are read/write for anyone, I disconnected from the adb server and have also restarted the other linux box, the fire TV and homeassistant.

Have you tried the full path to adbkey.
Maybe /config/android/adbkey ?

No dice.

I have tried /config/android/adbkey and config/android/adbkey both get the same error in the log as above.

Also, I tried dropping the keys in the main config folder and updating the path to just /config. Still the same error.

Both Linux and Windows report read access for everyone.

I may just scrap it all and start over tonight.

Should be adbkey

The linux box that you used to do the adb connect to the firesticks with… I know you rebooted it but… humor me… turn it off (leave it off) and then power cycle your firesticks and reboot your HA server… in that order.

What have ya got to lose?

facepalm. its the small things that get me.

Ok adb vs abd corrected but now getting this error.

Invalid config for [media_player.firetv]: not a file for dictionary value @ data['adbkey']. Got '/config/android/adbkey'. (See ?, line ?). Please check the docs at https://home-assistant.io/components/media_player.firetv/

Config is copy pasted from the docs. Only the IP is changed

media_player:
  - platform: firetv
    name: Fire TV 2
    host: 192.168.1.21
    adbkey: "/config/android/adbkey"

File permissions are as loose as I can make them.

-rwxrwxrwx 1 root root 1704 Dec 19 16:02 adbkey
-rwxrwxrwx 1 root root  711 Dec 19 16:02 adbkey.pub

Edit: I have tried “quotes” and ‘quotes’ and no quotes. I have tried /config/android/adbkey and config/android/adbkey

You appear to have more than one firetv. I have several and I know I didn’t have to but I pulled an adb key files for each of the firesticks (I compared, they are not the same) and have my adbkey: parameter point to each individual adbkey file. So in my /config/android folder, I have an adbkey-livingroom and adbkey-livingroom.pub, etc. for each firestick.

No only 1 fire tv stick. name: Fire TV 2 was only because I copied driectly from the config example.

Well then, never mind… :slight_smile:

Try wrapping the name: string with quotes. My past has shown me HA does weird things with unquoted spaces. (or replace the spaces with an underscore)

I thought that too. Currently have name: test

I run two subnets here because of multiple routers. 192.168.1.x and 192.168.100.x and I had issues with the firesticks when they were on different subnets even though they were bridged.

Appreciate the troubleshooting but on the same subnet.

I am tapped out of ideas…

You and me both.

I had trouble initially but got my Amazon Fire TV 2 working with HA recently. My problem (like yours initially) was that I misread the instructions. I thought there was supposed to be a directory called ‘adbkey’, but it was that the file didn’t have a file extension. So the correct directory to store the files would be in \config\android, or whatever you specified in the configuration.yaml.

Here is the fire tv in my configuration.yaml:

- platform: firetv
  name: Fire TV
  host: 192.168.1.111
  adbkey: "/config/android/adbkey"

There are two files, ‘adbkey’ and ‘adbkey.pub’. They are stored in the directory \hassio\config\android

Do not store the files in \config\android\adbkey. It should be in \config\android.

Thanks!

I just figured this out and came here to post the solution.

I had the same problem. I had to go back to the machine I generated the ADB keys and disconnect. adb disconnect