Control andoird TV/Nvidia shield?

thanks, yeah the blog would be awesome… i still havent got my nvidia shield, so maybe you’ll be done when i get it?

There’s always a possibility!

awesome thanks

Hello .i got the broadlink pro 2017 and Nvidia shield TV old version .is there a way just to turn it on through IR ? How can I add it to broadlink.i be both app the new and the old one…thanks

The old app has a community downloadable shield remote. You’d need to grab the code from there and then either grab the xml and translate it using the tool someone posted in the forums, or set it to learn then fire the code (I think you can set it to learn in ha and fire the code in the app but haven’t tried it).

@Hayman: Check my post here, I explain how to do it through IR. Hope it works out for you !

1 Like

Unfortunately that only works for gen1. Because gen 2 doesn’t have an IR Receiver

ill try it thanks…

i’ve the First Gen

Ohh right… Well I’m trying to get my 2nd gen easily controlled…

Hi @nikc0069 , could you please post an example of a command line switch for use with automagic and shield TV?

The thing I specifically don’t get about using a command line switch is that you need to give one command for on and one command for off. If you just want something like “activate plex” then you don’t want two commands, you just want to toggle one command.

Indeed but I don’t think there is a command line toggle. However you can have your off command as go home and sleep or something similar. I’ve actually got a harmony hub now so I just do that. Interestingly it registers as a Bluetooth keyboard. This would be a great addition to hass.

Thanks,

I’m about to try and set this up now. If you’re able to post an example config I’d appreciate it.

Hey @nikc0069! Sorry for asking another question, but this definitely woke the shield from standby? I’m able to activate an app if the Shield is on, but if it’s on Standby then it doesn’t work. :frowning:

I got it to power on by getting the screen to come on for a while. Any idea what automagic option you used for off? There is no obvious function that translates to turning the shield on to standby…

Whenever I’ve triggered an app it’s woken from sleep

How do you simulate a pause/play button through automagic? Had a play but couldn’t find anything that looked obvious?

Not sure as I now use a harmony remote. I’m sure there are key presses that will do that though.

Why don’t you use ADB?

It should be trivial to send the KEYCODE_WAKEUP and then open the Plex app.

The complete script would be:

adb connect <SHIELD_TV_IP>
adb shell input keyevent KEYCODE_WAKEUP
adb shell monkey -p com.plexapp.android -v 500

If you need adb on a Raspberry Pi, get it from here:

Then, just add this to configuration.yml:

shell_command:
  start_plex_shield_tv: 'adb connect <SHIELD_TV_IP> && adb shell input keyevent KEYCODE_WAKEUP && adb shell monkey -p com.plexapp.android -v 500 && adb kill-server'

I just tried this on my RPi3 and SHIELD TV and it works just fine.

Remember you have to first authorize the homeassistant user to access your NVIDIA SHIELD TV with adb, so first run

sudo su homeassistant
adb connect <SHIELD_TV_IP>

And authorize it from the SHIELD TV interface.

2 Likes