Native support for Android TV / Android devices

It’s fixed in 0.113.4 (or 0.114 if they don’t make a 0.113.4 release). You can either wait for that release or use this custom component: https://github.com/JeffLIrion/ha-androidtv

If you use the custom component, after you tell it to remember the connection you can remove the custom component and go back to using the native component and the connection will be remembered.

1 Like

I am a n00bie on some of this. I assume I just drop this in the custom components directory? Anything else to do besides grab the code?

Yeah, that’s it. But I think that 0.113.4 should be released soon, so if you don’t use the custom component you won’t have long to wait.

1 Like

Worked perfectly btw

I’m having problems with starting some of the apps on the shield using the media_player.select_source.
The apps that are predefined by the integration work fine, but the others don’t. I’m running latest Hassio (113.3)

I have found the following app IDs: nl.nlziet, com.ziggo.tv and nl.rtl.videoland.

This does NOT work

    - service: media_player.select_source
      data:
        entity_id: media_player.nvidia_shield
        source: 'com.ziggo.tv'

This starts Netflix

    - service: media_player.select_source
      data:
        entity_id: media_player.nvidia_shield
        source: 'com.netflix.ninja'

Im pretty sure I have the correct IDs, as I extracted them with NodeRed and als the naming of the app to include it in the source list works. Is this a known error, or am I overlooking something?

@Try2Fly and anyone else trying to launch apps, try this (replace com.ziggo.tv with the app you want to launch):

- service: androidtv.adb_command
  data:
    entity_id: media_player.example
    command: "monkey -p com.ziggo.tv -c android.intent.category.LAUNCHER --pct-syskeys 0 1"
1 Like

Thanks, unfortunately that didn’t work. I get no reaction after sending the command.

Later I found a command that does work (for the Ziggo app):

command: "am start -a android.intent.action.VIEW -d -n com.ziggo.tv/.ui.splash.SplashActivity"

hello
I have MI android tv box which is connected to home-assistant via suggested integrations, so everything works but the state of android tv changes sometimes and third-party apps don’t work.
For this, I have checked the internet and found a solution via addon in ha ie ADB so, I have installed everything and also done with configuration but the problem comes here
I cannot see the new entity in states :frowning: don’t know why.
I have checked addon logs and also home assistant logs and restarted many times, everything is ok and they say connected but no entity
And by the way after addon installation, I removed previous media player integration so now even that is not coming I am struck here

how can my problem be solved, please help

did they kill 0.113.4?
how can i tell if there will be a .4?

edit* no help needed

Hello.

I have 2 FireStick 4K working via ADB connected via hass.io add-on, without too many issues (unavailability).

Still then, I found that if I use the Wireless Display functionality from Windows10 (it is what I tried in both FireSticks), once you cancel this connection, FireStick becomes immediately unavailable.

Don’t know exactly if all needed, but only got it to work properly again (back online) after rebooting the FireStick itself and then HA. Restarting the hass.io add-on didn’t seem to do the trick, for an availability perspective.

Has anyone else experienced this issue or is this something new? Can I provide any more useful info for this to be looked at?

Thanks in advance for the amazing work on this component.

I have a new Xiaomi TV Stick and connected via ADB. Source, title and state work fine but I get no artwork. Anybody seen this before?

Never mind. I used the wrong entity. The stick was picked up by the Google Cast integration as well. I had to use the androidtv media player.

@Try2Fly is this still working for you?
I don’t get it to work.

No unfortunately it does not work anymore. I’m not using it that often, and have not looked for a fix.

1 Like

Hi,
I have succesfully configured ADB and androidtv component.
I have a problem with my Philips TV. I have to send a wakeonlan packet to wake it up.
¿Can I use turn_on_command to send a wakeonlan command or what can I do?
TV doesn’t respond to androidtv component until the TV is up. After sending a magicpacket, the component works ok.

I have further read that it seems this Wireless Display connection is done via Miracast/via adb (different TCP/IP port?).

Could it be that the HA androidtv implementation cannot handle these “parallel” connections (or at least reconnect from it)?

Being able to use Wireless Display functionality from Windows10 while not losing the FireStick HA connectivity/functionality would be the cherry on top of the cake for me.

@JeffLIrion Any further insights or help I can provide to get this looked into?

I’m not familiar with Miracast, but devices only allow one ADB connection at a time. You may need to restart your device in order for HA to be able to reconnect.

You could try using the Python ADB implementation instead of an ADB server and see if that’s any better.

I’d rather suspect the FTV stick then the HA implemantation. Wouldn’t be the first time, that Windows isn’t correctly closing it’s connections…

Have you tried only restarting the FTV stick and wait for a little time for HA to find it? If this works, it is the FTV stick.

On the other hand, do you really need the screen mirroring or would it be possible, to use something else, that could chromecast? VLC does chromecasting for pics, music and videos.

Anyone able to get android_tv integration working for new Google TV Chromecast? I can only state as idle in home assistant.