[TESTERS NEEDED] Android TV / Fire TV key generation

can you set up twice if you have 2 devices? will if create a second adbkey? Or do I need to add a 2nd custom component

It should work fine, just configure multiple entities as in the sample configuration. It will use the same key for both.

Hi, I could not get this to work on 0.101.02b until I revoked previously granted permissions on the ShieldTV - don’t remember seeing any mention of having to do this so may be worth adding to the docs? As soon as I revoked the permissions a pop-up popped up immediately
Cheers,
James

How to know the name of the packet of installed apps in a fire tv to add them to the config code?

I don’t know, I only have Fire TV devices. I know that my devices can have more than 1 approved key. I think what you’re describing might fall under item 3 in the ADB Troubleshooting section (documentation linked is for 0.101):

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

If you’d like to open a pull request to the next branch of the documentation explaining that an alternative is to revoke the permissions for the current ADB connection, that would be appreciated (assuming that my explanation is correct). Just try not to make the documentation any more complicated than it already is!:smile:

Can you help me to understand how to get the packet names installed in a fire tv so to put them inside the configuration?

Do you mean app names? Just look on the States page in HA, which is one of the tabs under Developer Tools.

These app names are already configured.

Hmmm… in the states i get only this:

For those already configured do i need the same to add in the config?

Is this config right?

  - platform: androidtv
    name: Fire TV
    host: 192.168.1.36
    apps:
      com.netflix.ninja/.MainActivity: "Netflix"
      com.amazon.amazonvideo.livingroom: "Amazon Prime Video"
      com.dazn: "DAZN"
      com.google.android.youtube.tv: "Youtube"
      com.amazon.tv.launcher: "Home"
      com.spotify.tv.android/.SpotifyTVActivity: "Spotify"
      com.android.vending/com.google.android.finsky.tvmainactivity.TvMainActivity: "Play Store"

You’ll see more state attributes when the device is on.

But even simpler, you can just look at the media player card. For example:

Because you have the entry com.amazon.tv.launcher: "Home" in your config, your card would display “Home” instead of “com.amazon.tv.launcher”. That’s all the apps config entry does: display a friendly name for apps in the UI, instead of the app ID.

Ah, ok i understand… so i can also not put apps in the config… only if i want to change the name in the card…

Ok, now i get in the UI this:

46

Why only those apps? And the others already installed?

right, yes i will have a look at the docs
Cheers,
James

Is anyone having dazn app working with this command?

51

I don’t have it working…
EDIT: in states i have this:

adb_response: /system/bin/sh: com.dazn: not found

What’s the meaning? The app DAZN is installed in fireTV.

You need to send a command to launch the app, not simply the app’s ID. Here are a bunch of examples: https://gist.github.com/mcfrojd/9e6875e1db5c089b1e3ddeb7dba0f304

Anyways, this is well beyond the scope of this thread, which was about testing out a new feature. (And this feature has already been merged into HA and will be released today.)

Ok, now understand… so you mean this will be merged into the next release of HA? No anymore need of the custom component?

That’s correct.

I just received through HACS an update of your component. I have two questions about it:

  1. When i’ll update HA to 0.101.x will i delete this from the custom_components folder?
  2. This is the tree of the folder. Is it correct as i see two androidtv folders one inside the other…

20

If wrong how to solve?

  1. Yes. You should always use the latest built-in component. The custom component is just for testing.
  2. The file structure is correct.

So if i leave the custom component it will not creates problems and, more, i’ll get always the latest ?

No. It could create problems by virtue of being experimental. And it might not be the latest, depending on whether I update it. And if anything gets changed in HA core, then the custom component could break.

Bottom line: you should use the latest built-in component.

1 Like