Nividia Shield TV - integration options?

Well, I don’t really turn off my Shield, only put in sleep mode. It may be enough anyway :slight_smile:

Tried the same some time ago. However it failed because Android tends to reboot itself if some stuff is going wrong. I needed to fix this again and again by hooking up my laptop to my nexus tv, because I was too lazy rooting it (Root means wipe). So I created this franken setup :D. So my advice is either root and permanent adb over TCP enabled or sticking with a usb cable. The ADB over TCP option is nicer but requires root to be useful.

If it doesn’t work reliably (I never saw my Shield TV reboot by itself, but it might be discreet :-p), it would be a reason to dig a Raspberry Pi from a drawer :slight_smile:

@Mark_Boss @kernald Well root just for that doesn’t seem to be something that I will do (too lazy configuring everything again) So maybe I can put in use my rpi zero instead and making the scripts from rpi 3 (HA) to communicate with the rpi zero.

The best solution though would be if Tasker could do everything instead and use the HA REST API.

@Mark_Boss I have to make probably a stupid question but is it adb.zip your ADB binary and if yes how do I make one? or is it possible to share?

The adb.zip is a python implementation of ADB by google (Github Python ADB). Currently testing the python implementation. However I previously compiled a adb binary from the AOSP source code for the rapi. Somewhere in this thread there is a fairly recent adb binary. The one in the OP is outdated and won’t work.

1 Like

I used Automagic (paid Android app, but free trial available to be able to start specific apps on the Shield from my Harmony remote. It runs as a background service and allows all kinds of automations that can be triggered, among others, using a HTTP Request. The actions are quite comprehensive, but I’m not sure if you can find out which app is in the foreground and what state it is in. Maybe ask on their forums.

2 Likes

@janw might you be able to go into more detail… Automagic looks like Tasker, but I’m not 100% sure either. I’m wanting to do similar things as you described, e.g., tell alexa to start/play/turn-on Vudu, which would be a harmony hub/remote activity that is able to, at the very least, launch the Vudu app on my nVidia SHIELD TV.

Would you mind going into a little more setup detail on configuring your Shield + Harmony Remote activities to achieve that achieve that?

Thanks much!

I never integrated it into my home assistant setup, but a nice information: ADB over TCP doesn’t disable itself anymore after a reboot on the Shield TV.

One thing ive noticed with the Nvidia Shield is that you can enable network debugging in the developer settings. Once you enable usb debugging then you can access network debugging and it assigns your address for you (“localaddress”:5555) I made sure that my 5555 port wasn’t exposed to the outside world so im not too worried about having it on.

I did learn that ADB doesnt seem to like multiple sessions for some reason (or im doing something wrong) I use ADB locally on the shield and it works but then ill start using it on my HASS VM and I can confirm its connected but it constantly says device is offline. I can kill the ADB session and restart successfully but until I retoggle the “network USB” setting

I have a little experience with adb but mostly just for rooting and installing apps. It seems you can do a lot in regarding to activating things. Im going to create a QUICK how to after this post of what I have set up so far.

quick tutorial for how Im dealing the shield. Thanks for all the ideas guys

Not really sure if anyone still needs the basic power controls for an Nvidia Shield TV, but I recently wanted voice controlled power on and power off and could not find proper ways or decent IR codes.

NOTE: The following is only tested on Nvidia Shield TV GEN1

So I setup and configured emulted_hue.
I took an old Harmony One I was not using anymore and quickly configured it for the Nvidia Shield TV. (you won’t need this, since I’ll give you the Base64 codes later)
I then used a Broadlink RM Mini 3 (10 euro’s) and configured the RM Switch

Here is the end result:

# Broadlink RM Mini 3 IR Blaster
switch 1:
  - platform: broadlink
    host: x.x.x.x
    mac: 'xx:xx:xx:xx:xx:xx'
    timeout: 15
    switches:
      shieldtv_up:
        friendly_name: "Office Nvidia Shield TV"
        command_on: 'JgBIAAABJpMTEhMSExITERMSExITEhM2ExITNhM2EzYTNhM2FDYTEhI3EhMSNxISExITEhM2ExISExI3ExISNxI3EjcTEhM2EwANBQ=='
        command_off: 'JgBIAAABJ5MTEhITEhITEhMSEhITEhM2ExITNhM3EjcSNxI3EjcTEhM2ExITEhMSEhITEhM2ExISExI3EjcTNhM2EzcSEhM2EwANBQ=='

Now I can just say “OK Google, turn Shield TV on” or “Hey Google, turn Nvidia TV off” (any word combo that relates, google home will match)

Hope it helps someone, since it took me some time to get it all sorted out :wink:

2 Likes

I didn’t know the remote controlled with IR, I thought was all on WiFI.

WHere is the Shield Tv IR RECEIVER located???

@anon35356645 Hi I forgot to mention that I own GEN1 Nvidia Shields which have IR receivers on the front. I remember reading that the latest GEN2’s don’t have that anymore :frowning:

I went into some depth on a method here that doesn’t require ir or extra hardware, after automagic was mentioned here. It will allow you to expose specific apps (Alexa, turn on netflix!)

It can likely post power status elsewhere on a given interval but I haven’t gone down that route (yet).

1 Like

Hi Guys,
I have been using STV for quiet some time together with Logitech Harmony. Planing to switch to Crestron since I got few other devices to control (RS232, Relay and custom IP command). However, I am worried do I miss the Bluetooth keyboard functionality which is a key thing while I use the Shield primarily for KODI!!
I was wondering is there a success story/any simple solution anyone can share?

Thanks in advance!

Sony.

Thanks @STVE, definitely going to try this as I have a Broadlink RM 3 which is still unused in the box.

Hey @STVE, do you happen to have other IR codes for Nvidia Shield TV? I’ve managed to get a working template from broadlink store, but the only button that does not work is left (needed to unlock screen), so I cannot run a scene successfully :confused: .

If someone is still searching for this:

    "shield": {
        "power": "JgBgAAABJ5MTExITEhMSExITEhMSExI3ExMSNxM3EzcTNxM3EzcTExITEjcTNxMTEhMSExITEhMSNxMTEhMSNxM3EzcTNxM3EwAFPQABJkoSAAxTAAEmSRMADFIAASdJEwANBQAAAAAAAAAA",
        "back": "JgBgAAABJpMTExITEhMSExITEhMSExI3ExMSNxM4EjgSOBI4EjgSExITEjgTEhMSExITEhMSExITNxMSEzcTNxM3EzcTNxM3EwAFPQABJ0kTAAxRAAEmSRMADFIAASZJEwANBQAAAAAAAAAA",
        "right": "JgBgAAABJ5MTEhMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTExI3ExITNxM3ExITEhMTEhITEhM3ExITExI3EzcTNxM3EwAFPgABJ0kTAAxTAAEmSRMADFIAASZJFQANBQAAAAAAAAAA",
        "ok": "JgBgAAABJ5MVEBMSExITEhMSFRAVEBM3FRAVNRQ2EzcTNxM3EzcTEhU1EzcTEhMSExIVERISFRESEhMSFTUTNxM3EzcTNxM3EwAFPgABJkoTAAxTAAEmSRUADFEAAShHFQANBQAAAAAAAAAA",
        "left": "JgBgAAABKJIUERQRFBEUERQRFBEUERQ2FBEVNRQ2FTUVNRU1FTUVEBU1FTUVEBU1FRAVEBUQFRAVEBUQFTUVEBU1FTUVNRU1FQAFOgABJkkVAAxSAAEoRxUADE8AASdJEwANBQAAAAAAAAAA",
        "up": "JgBgAAABKZEVEBUQFRAVEBUQFRAVEBU1FRAVNRU1FTUVNRU1FTUVEBUQFRAVNRU1FRAVEBUQFRAVNRU1FRAVEBU1FTUVNRU1FQAFOgABKUcVAAxQAAEnSRMADFIAASZKEwANBQAAAAAAAAAA",
        "down": "JgBgAAABKJEVEBUQFRAVEBUQFRAVEBU1FRAVNRU1FTUVNRU1FTUVEBUQFTUVNhQ1FREUERQRFBEVNRUQFBEVEBU1FTUVNRU1FQAFOgABKEcVAAxRAAEoRxUADE8AAShIFQANBQAAAAAAAAAA"
    }

Hope it helps

3 Likes

do i need to first sync or add the nvidia remote with broadlink and paste this preconfigured commands? or no need that? just copy paste and it works? I have the nvidia shield pro 2021