Native support for Android TV / Android devices

Has anyone updated to .91.1 and has it resolved the issue?

This is the fix. One can use the custom component in the meantime.

1 Like

Dear, someone here guide me.
I would like to turn on my androidtv box with broadlink.
How to add custom command in turn on command provided in new config.

dear,
i would like to add broadlink send packet for turning on androidtv as turn_on_command.
Please guide, how to do?
thanks in adv

Hi there,

I am trying to set up my nvidia shield tv as android tv using ADB but it is not working.
Out of the box HA discover Nvidia as casting device, but when I try to set up androidtv component I am getting error:

Exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/zeroconf.py", line 2101, in send
bytes_sent = s.sendto(packet, 0, (addr, port))
PermissionError: [Errno 1] Operation not permitted

Any help please.

Did you use the ADB server method using the ADB add-on for Hassio?

If not, how have you tried to set things up?

Ok so from start I did not install anything and HA out of the box recognized in Integrations:

Google cast with
NVIDIA TV
media_player.nvidia_tv
I can control a bit this one turn on but not off, volume sometimes works, skipping tracks works.

In entities I have additional player as well

Kodi on Shield
media_player.kodi_android_3_local
kodi

And there is an error in the HA
Exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/zeroconf.py", line 2101, in send bytes_sent = s.sendto(packet, 0, (addr, port)) PermissionError: [Errno 1] Operation not permitted

But after installing ADB bridge I finally can connect to nvidia on port 5555 and player appeared on Overview NVIDIA TV
com.google.android.tvlauncher

I can control it on/off, etc. So all good it seems but that error about zeroconf.py is still in the logs so should I disregard it?

How to turn off google cast integration which start at? do not want this one.

Cheers

Hey all of you,
i had my firth working befor 91.4 but now it doesn’t work anymore. does anyone has a clue how to fix it? my config: error i get is

Could not connect to Fire TV at 192.168.178.53:5555 using ADB server at 127.0.0.1:5037

      - platform: androidtv
        name: Fire TV
        device_class: firetv
        host: xxx.xxx.xxx.xxx
        adbkey: "/home/pi/.android/adbkey"
        get_sources: true
        adb_server_ip: 127.0.0.1

Try reconnecting, restarting, reconnectin

hey thanks for the quick answer first of all, do you mean:

add kill-server
adb start-server
adb connect xx.xx.xxx
sudo systemctl restart home-assistant

?

I had to restart my android device (fire tv), then restart home assistant after the device booted back up.

1 Like

that finally worked for me, got my component back running!

thanks to all of you!

media_player.volume_up and media_player.volume_down services stopped working for NVIDIA Shield with HA 0.92

Everything is working for me. 0.92.1 installed. Thanks.

I’m trying to start an android app using the example on the component page:

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

With my own configuration offcourse:

      sequence:
      - service: media_player.select_source
        data:
          entity_id: media_player.android_tv
          source: 'nl.nlziet'

But there is no result. Nothing. What am I missing?

I’m using this addon with a FireTv Stick and its working great! However the state doesn’t reflect wether its currentl playing or not. As soon as I launch an App (Netflix/Amazon Video) it stays as “paused” independently wether im playing or paused.

Is this a known issue?

It’s a known issue and isn’t easily solvable.

For Fire TV devices, you can launch an app using the media_player.select_source command.

This is only supported for Fire TV devices.

But you can launch apps using intents from here: ADB intents.

2 Likes

Thanks. I’ll try that

Hello.
I created the folder config\custom_components\androidtv and have in it the files:

init.py
media_player.py
manifest.json
and a folder pycache
In this folder there are 2 files: init.cpython-37.pyc & media_player.cpython-37.pyc

In my config file I have:
`

  • platform: androidtv
    host: xxx.xxx.xx.xxx
    name: MIBOX3
    apps:
    netflix: “Netflix”
    adb_server_port: 5037
    adb_server_ip: 127.0.0.1
    `

I am also running the add-on ADB - Android Debug Bridge V 0.4.1

In HA.log file I get:
WARNING (SyncWorker_6) [custom_components.androidtv.media_player] Could not connect to MIBOX3 at xxx.xxx.xx.xxx:5555

Also enabled USB Debugging in mibox3 and checked the pop up allowing access.

What am I doing wrong??? I am confused a bit…

Thanks!