Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nvidia Shield TV pro - unrecognized device #86

Open
nseries100 opened this issue Jul 4, 2022 · 8 comments
Open

Nvidia Shield TV pro - unrecognized device #86

nseries100 opened this issue Jul 4, 2022 · 8 comments
Labels
good first issue Good for newcomers

Comments

@nseries100
Copy link

  • I installed plugin, installed ADB tools inside Homebridge server
  • Device config is bellow. IP is correct and is reachable
  • HB is authorized in Shield for adb over network
  • Shield is visible and added to Home app

--> Still getting error in HB which says Unrecognized device
--> In Home app Shield is shown as OFF but should be shown as ON

Device:
Nvidia Shield TV pro

adb tcp 5555 without error

homebridge@raspberrypi:/var/lib/homebridge $ adb connect 192.168.1.117:5555
already connected to 192.168.1.117:5555

homebridge@raspberrypi:/var/lib/homebridge $ adb --version
Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5
Installed as /usr/lib/android-sdk/platform-tools/adb

[03/07/2022, 14:59:24] [HomebridgeADB]

WARNING:
Unrecognized accessory - "Nvidia Shield".
Please check if the accessory's IP address is correct.
If your accessory is turned OFF, please turn it ON.

[03/07/2022, 14:59:24] Nvidia Shield E02F is running on port 32971.
[03/07/2022, 14:59:24] Please add [Nvidia Shield E02F] manually in Home app. Setup Code: xxx-xx-xxx
[03/07/2022, 14:59:24] Nvidia Shield Playback Sensor 9DE5 is running on port 37683.
[03/07/2022, 14:59:24] Please add [Nvidia Shield Playback Sensor 9DE5] manually in Home app. Setup Code: xxx-xx-xxx
[03/07/2022, 15:05:32] [HomebridgeADB] Nvidia Shield - Awake
[03/07/2022, 15:05:33] [HomebridgeADB] Nvidia Shield - Playback - On
[03/07/2022, 15:05:43] [HomebridgeADB] Nvidia Shield - Playback - Off

HomeBridge config:
"accessories": [
{
"name": "Nvidia Shield",
"ip": "192.168.1.117",
"path": "/usr/bin/adb",
"mac": "48:b0:2d:65:2d:37",
"timeout": 1000,
"interval": 1000,
"category": "TV_STREAMING_STICK",
"hidenumber": true,
"hidehome": true,
"hideother": true,
"playbacksensor": true,
"skipSpeaker": true,
"upbutton": "KEYCODE_DPAD_UP",
"downbutton": "KEYCODE_DPAD_DOWN",
"leftbutton": "KEYCODE_DPAD_LEFT",
"rightbutton": "KEYCODE_DPAD_RIGHT",
"selectbutton": "KEYCODE_ENTER",
"backbutton": "KEYCODE_BACK",
"playpausebutton": "KEYCODE_MEDIA_PLAY_PAUSE",
"infobutton": "KEYCODE_HOME",
"poweron": "KEYCODE_POWER",
"poweroff": "KEYCODE_POWER",
"volumeup": "KEYCODE_VOLUME_UP",
"volumedown": "KEYCODE_VOLUME_DOWN"
}
],
"platform": "HomebridgeADB"
}
],

@nseries100 nseries100 added the good first issue Good for newcomers label Jul 4, 2022
@RobotLimeLtd
Copy link

tl;dr - the latest version of adb available for Raspbian is out of date and will not authorize. The only workaround at the moment is to run Homebridge on a device for which the latest version is available (Mac, Linux or Windows PC).

Longer explanation...

The message already connected to 192.168.1.117:5555 is a false positive. If you run

adb devices

you will see that your device isn't authorized, and that's the critical thing.

Unfortunately, it seems this is because the version of adb available to Raspbian/Debian is too old, coming from version 28.0.2 of the SDK, when what you need is versiopn 30.x.x or later.

I did get it to work from adb on a Mac, using the version from https://developer.android.com/studio/releases/platform-tools, but adb needs to be run from the device on which you are running Homebridge. If you want to run it from a Rapberry Pi, you're out of luck for the moment. :-(

@RobotLimeLtd
Copy link

Ok, I have a workaround/solution for this.

You can install a more recent (latest?) version of adb via Snap Store.

First, remove your local android-tools installation:

sudo apt remove android-sdk-platform-tools-common

Then install Snap ( as per https://snapcraft.io/install/android-tools/raspbian but I will type out the steps in case the link ever disappears):

sudo apt update
sudo apt install snapd

Reboot your Pi, then

sudo snap install core
sudo snap install android-tools --edge --devmode

The path to adb is /snap/bin/android-tools.adb, so you should be able to run

/snap/bin/android-tools.adb connect <ip-address>:5555

If you see errors such as

ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.

then

sudo vi /etc/ld.so.preload

and comment out the line /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so

@RobotLimeLtd
Copy link

One last set of "gotchas"...

  1. you must add ":5555: to the IP address - you'll have to do this in the Homebridge config file as the plugin's web UI won't let you, e.g.:
"ip": "10.0.0.16:5555",
  1. You must set the category as "Streaming Stick" e.g.:
"category": "TV_STREAMING_STICK",
  1. You must set the path to the correct version of adb, e.g.
"path": "/snap/bin/android-tools.adb",

@Homebridge4life
Copy link

Hello @RobotLimeLtd would you be so kind to explain to me like I'm five.

I'm pretty sure my setup is all over the place and probably why your instructions aren't working for me. if you think I would be better off starting my server from scratch idc, I just really want to get my Shield TV in Homekit again like before. Following your steps

1- do I run all of the command in homebridge commmand line? if yes, do I need to change something or run it right from this section? pi@homebridge:/var/lib/homebridge $
or do I log into my Pi directly and do it from there.
2- if the answer was pi I guess I have two users to login. (pi or homebridge) why I don't know.

now after following all your steps I did notice my shield asked for the permission. That is something I've not seen in a long time so that's progress. Thank you! :D

What would you suggest I do?

@Homebridge4life
Copy link

@RobotLimeLtd One more thing. What do you mean when you said this? and comment out the line /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so
When I follow this, the command is already there. Do I need to delete it or type it again. That is one step I'm missing. Thank you!

@SawkeeReemo
Copy link

I’m trying to install this inside a docker container on my raspberry pi since I ran into the same problems everyone else is. In the Homebridge terminal, after installing snapd, when I type snap install core it gives me the following error:
error: cannot communicate with server: Post "http://localhost/v2/snaps/core": dial unix /run/snapd.socket: connect: no such file or directory

Any ideas how to proceed?

@Mr-Bridge-0
Copy link

@SawkeeReemo I'm having the same issues too, did anyone ever find a fix for running Homebridge-ADB in a docker container?

@SawkeeReemo
Copy link

@SawkeeReemo I'm having the same issues too, did anyone ever find a fix for running Homebridge-ADB in a docker container?

Pardon the lag, I missed your message here. And unfortunately no, there doesn't seem to exist a way to make this work anymore. I've been trying to figure it out for months. I just gave up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants