HassIO doesn't connect to nVidia Shield

Hello all,

My first post, and first endeavor in home automation.

I’ve installed a fresh install of HassIO on an NUC I had lying around. So far so good. It sees my existing Hue lights and they show up in the devices.

No for a first challenge I wanted to set up an automation where the lights come on when I pause a movie on my nVidia Shield - and I’m not getting it to work.

Here’s what I did so far:

Install ADB, and set the following in the ADB config.

{
  "devices": [
    "192.168.178.133"
  ],
  "reconnect_timeout": 90,
  "log_level": "info"
}

I also enabled the debugging on the Shield.

In the configuration.yaml I added this:

media_player:
  - platform: androidtv
    host: 192.168.178.133
    name: "ShieldCinema"
    adb_server_ip: 127.0.0.1
    adb_server_port: 5037

It’s not clear to me whether after a restart of HassIO I the Shield should be visible in the devices, but the only thing that’s there is the Chromecast target - which was already there before taking the above steps.

In Automation I used this as a trigger:

entity_id: media_player.ShieldCinema
from: playing
platform: state
to: paused

But when I play something in Netflix or another player, and pause it, nothing happens.

The ADB log says this:

Add-on version: 0.5.5
 You are running the latest version of this add-on.
 System: HassOS 3.7  (amd64 / intel-nuc)
 Home Assistant version: 0.103.6
 Supervisor version: 193
[14:08:27] INFO: Starting the Android Debug Bridge server...
[14:08:27] INFO: Connecting to device: 192.168.178.133...
connected to 192.168.178.133:5555

And the HassIO service log says this:

Could not connect to ShieldCinema at 192.168.178.133:5555 using ADB server at 127.0.0.1:5037

Thanks for any guidance or hints as to where to look for solutions.

Best,

Barend

As is often the case, this magically fixed itself - I’m guessing a reboot of the nVidia Shield did the trick. Should have thought about his. Thanks for looking, I’ll leave this here in case anyone runs into the same problem.

I don’t know if this was your issue, but for the sake of anyone else encountering a similar problem here’s what was blocking me:

In order to allow new debug authention requests and show the popup dialog on the Shield’s screen to allow them, you need both USB debugging and Network debugging enabled.

I had network debugging enabled already from when I first got the Shield and wanted to set up some more complex Kodi setup on it, so I must have done this before and then disabled USB debugging and promptly forgot it’s importance in setting up new incoming adb authorizations.

What you need to do is enable USB debugging, (re)start the adb debug bridge add-on. You should see a popup dialog appear on the shield which you can now accept. Finally, disable USB debugging as leaving it on is a vulnerability.

Lost several hours yesterday trying to get this working!

2 Likes

Thank you A LOT for this post! I had my network debugging enabled, and restarted both shield and Home Assistant several times but didn’t get any popup to appear on my Shield. After enabling USB debugging, I didn’t do anything, just got the popup after few seconds. After that, I just disabled USB debugging again. And HA has new media player working now :slight_smile:

1 Like