[TESTERS NEEDED] Android TV / Fire TV key generation

No problems here ! Works fine ! Great work ! No extra docker container needed for me if this integration works.

same, working great. No unavailable status.

Also could anyone point me to a good guide or example code block of how apps and 'state_detection_rules` are configured?
I’m assuming i should be able to select source of the friendly name of the app I list (that doesnt seem to work, so maybe i have configured it incorrectly).
also i’ve set to debug but i’m not sure how i get the states of the various apps :frowning:
any guidance greatly appreciated

Thanks for the feedback!

  • For configuring apps and state_detection_rules, see Full Configuration
  • Launching apps from the sources list only works for Fire TV devices, not Android TV devices. But you can use the androidtv.adb_command service to do whatever you want. For examples, see this list of intents.
  • For coming up with custom state detection rules, see Custom State Detection. You don’t want to set the log level to debug.

No unavailable issues for me either. Thanks for updating this component and fixing my prior issues with it!

Good to go
:+1::+1::+1:

thanks
the app example was only one app, and couldn’t figure out if i needed a - before when using multiple. This post seemed to have the example i was looking for

I’m also using a Fire Cube and works really well, ditched the shields and the nearby alexa and consolidated.

I was missing how to get the wake_lock_size values.
androidtv.adb_command : GET_PROPERTIES per state to test. ie

  1. open app and play something
  2. run the adb command
  3. check the values
  4. pause whatever is playing
  5. run the command
    6.check the values again
    [this maybe really obvious, but that is the piece i was missing]

Works great here :grinning:

This will be in the 0.101 release!:+1:

1 Like

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