Native support for Android TV / Android devices

I have similar issue. 0.91

2019-04-04 18:46:33 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package androidtv==0.0.14: Failed building wheel for pycryptodome

python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.8.1 which is incompatible.

pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but you'll have oauth2client 4.0.0 which is incompatible.

broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.8.1 which is incompatible.

Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-2a4zmcxt/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-sr77539d/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-2a4zmcxt/pycryptodome/

2019-04-04 18:46:33 ERROR (MainThread) [homeassistant.requirements] Not initializing androidtv.media_player because could not install requirement androidtv==0.0.14

2019-04-04 18:46:33 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform androidtv.media_player: Could not install all requirements.

I have this issue aswell.

+1 with the same issues listed in the previous 5 comments after updating to 0.91

2019-04-04 21:59:27 ERROR (SyncWorker_14) [homeassistant.util.package] Unable to install package androidtv==0.0.14: Failed building wheel for pycryptodome
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.8.1 which is incompatible.
pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but you'll have oauth2client 4.0.0 which is incompatible.
broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.8.1 which is incompatible.
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-bxch3zcf/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-m6qh8e0_/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-bxch3zcf/pycryptodome/
2019-04-04 21:59:27 ERROR (MainThread) [homeassistant.requirements] Not initializing androidtv.media_player because could not install requirement androidtv==0.0.14
2019-04-04 21:59:27 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform androidtv.media_player: Could not install all requirements.
2019-04-04 17:20:00 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package androidtv==0.0.14: Failed building wheel for pycryptodome
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.8.1 which is incompatible.
pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but you'll have oauth2client 4.0.0 which is incompatible.
broadlink 0.9 has requirement pycryptodome==3.4.11, but you'll have pycryptodome 3.8.1 which is incompatible.
Command "/usr/local/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-leq3wqr4/pycryptodome/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-m8q09x19/install-record.txt --single-version-externally-managed --prefix  --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-leq3wqr4/pycryptodome/
2019-04-04 17:20:00 ERROR (MainThread) [homeassistant.requirements] Not initializing androidtv.media_player because could not install requirement androidtv==0.0.14
2019-04-04 17:20:00 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform androidtv.media_player: Could not install all requirements.

Same issue here since 0.91 update. Rolling back…

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?