Native support for Android TV / Android devices

but it works to turn on a switch that wakes up the shield and run the application, for example, Netflix?

Yes it does!

I do this but I get connection refusedā€¦?

1 Like

Have you:

  1. enabled adb over network in the developer settings on the shield?
  2. Accepted the popup when you try to connect?

I just got this working tonight and it works quite well.

  1. yes

  2. mmhhh it did not appear ā€¦ will try again later, maybe I missed it ā€¦ not sure

Hey mate, you can set a from playing to paused automation for the lights. See here.

If it did not appear, try going into the developer settings and clearing all adb keys and then try to connect again. It can be a bit finnicky.

Thanks will try it.

My Shield goes into sleep mode (or whatever it is, the green led lights go to off), whenever I turn off my TV/Receiver (I guess its the CEC function?).

Will I still be able to send a command (turn on Netflix) that wakes up the Shield and runs the app Netflix?

Yeah, it still stays connected when asleep. However, I am not sure if app launching has been integrated yet.

Not sure if this can be usefull for @a1ex4 but there is an amazing plugin for Jeedom on github: https://github.com/Jeedom-Plugins-Extra/plugin-AndroidRemoteControl

This plugin also uses ADB Server and got a lot of nice features that would be awesome if added to your plugin :slight_smile:

Oh and btw, theyā€™re also french, it seems that weā€™re the only one using AndroidTV with home automations :smiley:

Hello,
my HA is installed on Raspbian in Docker, I tried:
apk --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ add android-tools

but canā€™t add this package, I got:

BlockquoteERROR: unsatisfiable constraints:
android-tools (missing):
required by: world[android-tools]

At the very moment there is no android-tools package in the Alpine for armhf architecture (i.e. Raspberry Pi 3). The available packages are for x86 systems: https://pkgs.alpinelinux.org/packages?name=android-tools&branch=edge&repo=testing

Until the armhf android-tools package is available (again?) you may use a ready Docker image for armhf with adb installed. This one might work: https://hub.docker.com/r/sorccu/adb

For the Hassio users in here:

Topic: https://community.home-assistant.io/t/community-hass-io-add-on-adb-android-debug-bridge/96375

2 Likes

Anything special to think of if I want to switch to the Frenck addon instead of @noedelvreter addon? Will everything blow up. Anyone switched?

@frenck Thanks for the add-on, working great

@M203 Nope, just uninstall mine and then install frenckā€™s version. And then accept the dialog on all your devices.

How do I find out what the apps I use are called to write it in the config ?

Iā€™m running this on a Shield TV and have the following issues:

  • Once I launch an app the status switches to playing even if iā€™m not playing any media within that app.
  • The lag time between opening an app and that change propogating back to HAss can be quite significant.

My use case is to dim lights when I start playing a show on Netflix but both of these issues are blockers for me doing that at the moment.
Anyone else having these problems?

Great, thanks.

Did you use this https://github.com/hassio-addons/addon-adb/blob/master/custom_components/media_player/androidtv.py or the one previously mentioned in this thread by jefflirion?

So, I switched all of it. Works but I feel that there is more of a lag than before. All in all, works just fine!

Hello, my dear. How to add button for launch app?