[TESTERS NEEDED] Android TV / Fire TV key generation

Awesome, thanks for reporting back!:+1:

Questions for testers

  1. [ Yes | No | N/A ] Did the key generation feature work for you?
  2. [ Yes | No ] Once setup, did the media player experience any issues?
    • Becoming unavailable or seeing error messages in the logs qualifies as an issue
    • Incorrect state detection does not count as an issue for these purposes
  1. Yes
    the only issues come from my wifi router “nova mesh” , it restart himself daily at 04:00 am to clean all connections …


  1. key gen didn’t work for me,
  2. everything other than key gen was working after directing to my adbkey(older)

What happened when you tried to generate the key? Did it create the file YOUR_CONFIG_DIRECTORY/.storage/androidtv_adbkey?

nothing comes on TV no popup.
I stopped trying to create key and used the key which i had.
I would like to request one thing, is it possible to use this integration without restarting HA, as alexa_media can be used without restarting.

Today after upgrading and trying withoud my old keys,
it created new keys inside /config/.storage/ (as per you asked me to check) but wihtout any popup on tv asking to grant permission for my HA device.
now it seems to be working

i have been struggling with getting ADB and Fire Cube to work. gave up a while back and moved to an Nvidia Shield. Recently re-tried this and boom!
This worked exactly as you highlighted.

Stopped ADB docker.
Rebooted FireCube
Stopped HA
Deleted the adbkey and adbkey.pub from .storage
started HA
Popup comes up to accept = WINNING

amazing work, thanks for building. Now to work on my apps and statuses

  1. Did the key generation feature work for you?

Yes, no problems. Got a popup right after restarting Home Assistant. So that seems to work fine.

  1. Once setup, did the media player experience any issues?

Just enabled it. But for now no issues. If i run into issues i will post it here.

Thanks for the feedback, @dwinnn, @kirpat, @Fabrice_Barthelemy, @jaburges, and @hvdheurik!

Just to confirm: no one is having any ADB issues with the device becoming unavailable?

I’d like to create a new release of the backend package and get this into HA!

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

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