dwaan / homebridge-adb

Homebridge script to control remote ADB enabled Android device
MIT License
74 stars 14 forks source link

[HOOBS on Rpi4] Nvidia Shield not showing up #26

Closed LaNouille974 closed 3 years ago

LaNouille974 commented 3 years ago

Hi there!

Thanks for this plugin! :-)

I've installed the plugin through HOOBS (Raspberry Pi 4, up to date) web interface and then installed ADB: sudo apt-get install android-tools-adb android-tools-fastboot

It seems to connect well to my Shield (after enabling dev mode and debugging over network):

hoobs@hoobs:~ $ adb connect 192.168.1.176
* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 192.168.1.176:5555
hoobs@hoobs:~ $ adb -s 192.168.1.176  shell "getprop ro.product.model"
SHIELD Android TV

I currently use the following config file in HOOBS interface:

{
    "platform": "HomebridgeADB",
    "accessories": [
        {
            "name": "SHIELD Android TV",
            "interval": 1000,
            "ip": "192.168.1.176",
            "playpauseobutton": "KEYCODE_MEDIA_PLAY_PAUSE",
            "backbutton": "KEYCODE_BACK",
            "infobutton": "KEYCODE_HOME",
            "inputs": [
                {
                    "name": "YouTube",
                    "id": "com.google.android.youtube.tv"
                },
                {
                    "name": "Netflix",
                    "id": "com.netflix.ninja"
                }
            ]
        }
    ]
}

Sadly, after many things done (upgrading HOOBS, restarting the Rpi4, and so on), I stille can't see my Shield...

I've also noticed this error in HOOBS' logs, but haven't any idea on how to solve it nor identify the root cause.

18/01/2021 à 23:19:40 [HomebridgeADB] Initializing HomebridgeADB platform...
18/01/2021 à 23:19:40 [HomebridgeADB] Cannot initialize. Type: object 

Any idea of what I'm doing wrong plz?

Thanks a lot for your help.

LaNouille974 commented 3 years ago

Replying to myself: I finally got it to work by just putting the "accessories" array in the plugin's configuration textarea.

So only:

[
        {
            "name": "SHIELD Android TV",
            "interval": 1000,
            "ip": "192.168.1.176",
            "playpauseobutton": "KEYCODE_MEDIA_PLAY_PAUSE",
            "backbutton": "KEYCODE_BACK",
            "infobutton": "KEYCODE_HOME",
            "inputs": [
                {
                    "name": "YouTube",
                    "id": "com.google.android.youtube.tv"
                },
                {
                    "name": "Netflix",
                    "id": "com.netflix.ninja"
                }
            ]
        }
    ]

instead of the platforms object as shown in my previous comment.

HOOBS

I've figured it out thanks to this thread: https://github.com/dwaan/homebridge-adb/issues/13

Thank you

ManioqTv commented 2 years ago

Replying to myself: I finally got it to work by just putting the "accessories" array in the plugin's configuration textarea.

So only:

[
      {
          "name": "SHIELD Android TV",
          "interval": 1000,
          "ip": "192.168.1.176",
          "playpauseobutton": "KEYCODE_MEDIA_PLAY_PAUSE",
          "backbutton": "KEYCODE_BACK",
          "infobutton": "KEYCODE_HOME",
          "inputs": [
              {
                  "name": "YouTube",
                  "id": "com.google.android.youtube.tv"
              },
              {
                  "name": "Netflix",
                  "id": "com.netflix.ninja"
              }
          ]
      }
  ]

instead of the platforms object as shown in my previous comment.

HOOBS

I've figured it out thanks to this thread: #13

Thank you

Hello , j'ai le meme soucis que toi c'est a dire je ne vois pas shield quand je veux le rajouter dans l'application Home, je ne comprends pas trop ce que tu as fais pour résoudre le pb, peux tu m'aider s'il te plait ? Merci d'avance dalon

LaNouille974 commented 2 years ago

Replying to myself: I finally got it to work by just putting the "accessories" array in the plugin's configuration textarea. So only:

[
        {
            "name": "SHIELD Android TV",
            "interval": 1000,
            "ip": "192.168.1.176",
            "playpauseobutton": "KEYCODE_MEDIA_PLAY_PAUSE",
            "backbutton": "KEYCODE_BACK",
            "infobutton": "KEYCODE_HOME",
            "inputs": [
                {
                    "name": "YouTube",
                    "id": "com.google.android.youtube.tv"
                },
                {
                    "name": "Netflix",
                    "id": "com.netflix.ninja"
                }
            ]
        }
    ]

instead of the platforms object as shown in my previous comment. HOOBS I've figured it out thanks to this thread: #13 Thank you

Hello , j'ai le meme soucis que toi c'est a dire je ne vois pas shield quand je veux le rajouter dans l'application Home, je ne comprends pas trop ce que tu as fais pour résoudre le pb, peux tu m'aider s'il te plait ? Merci d'avance dalon

Wopé l'ami ! Je suis désolé, c'est loin tout ça, j'ai abandonné HOOBS depuis longtemps pour passer sur HomeAssistant : plus puissant, plus facile à utiliser et extrêmement bien documenté + grosse communauté. A mon avis, tu gagnerai à considérer cette option. C'est tout simple à installer sur un Raspi grâce à l'image. Désolé de ne pas pouvoir t'aider. Bon courage et bonne année à toi. Nartrouvé :-)