dwaan / homebridge-adb

Homebridge script to control remote ADB enabled Android device
MIT License
76 stars 15 forks source link

Not working for me after V1.3.1 #38

Closed produdegr closed 3 years ago

produdegr commented 3 years ago

Since Version 1.4.0 my ADB device Nvidia Shield TV (pro 2017) shows in Homekit "No Response". I tried to check with ADB commands if it connects (like adb connect ) and it works as expected, simply Homekit icon says "No Response". When downgrading to 1.3.1 it works just as it used to.

Can I check or try something to fix it?

dwaan commented 3 years ago

I’m afraid the new version added some new functionality that made your device unrecognizable by HomeKit, so it appear unresponsive.

Usually removing the old device from home app, then renaming the device name in the config will recreate new accessories in the HomeKit that you can re-add again in home app. The downside is you need to reconfigure your automation again after this.

Let me know if this working.

produdegr commented 3 years ago

First of all thanks for the super fast response. I removed the the device from Homekit, upgraded to latest and restart homebridge. Then added back the device without problem. At this point it works like before. Then restarted Homebridge service a couple of times (at this point the device would go "No response" before), but this time it is still working perfectly! So problem solved! Thank You

produdegr commented 3 years ago

Today unfortunately same problem. I guess that removing device does not help, but removing whole homebridge. Will test this when it's time to reconfigure everything.

dwaan commented 3 years ago

I’m actually using the same Nvidia shield like yours, and haven’t got into any problem, yet. If there’s some error output in Homebridge? I could debug it, but right now I’m not sure what causing this.

produdegr commented 3 years ago

I don't know if it helps, but I did some testing and found out that installing V1.3.1 - restart homebridge it works, reinstalling latest and restarting homebridge it still works. But after a while (few hours or so, maybe multiple restarts, too) it stops working. The only thing I can see in the log is: "[3/23/2021, 11:04:56 AM] [HomebridgeADB] NVIDIA Shield TV - Device disconnected? Trying to reconnect." but no further error messages. It must be something silly like a copy/paste error perhaps, where at initialize you use the correct IP to connect to, but at a different function you use something else. Just a thought. And thanks again for your time.

produdegr commented 3 years ago

I'm not an expert on JS but if there is an error you try to disconnect first then to connect again. But if there is an error with the disconnect, the connect will not be performed. exec(adb disconnect ${this.ip}, (err, stdout, stderr) => { if(err) error(); else { exec(adb connect ${this.ip}, (err, stdout, stderr) => { if(err) error(); else if(callback) callback(); }); } });

produdegr commented 3 years ago

dwaan Thanks!

dwaan commented 3 years ago

dwaan Thanks!

I'm not sure if this will fix all of your issues, but there is some changes in how this plugins to detect power status.

produdegr commented 3 years ago

It works perfectly, no "No Response" anymore. All good.

somethingsomethingburtward commented 3 years ago

The only thing I can see in the log is: "[3/23/2021, 11:04:56 AM] [HomebridgeADB] NVIDIA Shield TV - Device disconnected? Trying to reconnect." but no further error messages.

Unfortunately I’m getting this error even on the latest version of the plugin. I didn’t have a known good config beforehand but I can’t see any errors on my side. No issue with ADB connecting.

dwaan commented 3 years ago

The only thing I can see in the log is: "[3/23/2021, 11:04:56 AM] [HomebridgeADB] NVIDIA Shield TV - Device disconnected? Trying to reconnect." but no further error messages.

Unfortunately I’m getting this error even on the latest version of the plugin. I didn’t have a known good config beforehand but I can’t see any errors on my side. No issue with ADB connecting.

The new version only display that message once, while it keep trying to connect until it get connected. If your device appears and working in home app, you can ignore the message. If not, then there’s a connection error in the homebridge server.

somethingsomethingburtward commented 3 years ago

Ah, that’s great - thanks for clarifying, it’s not showing in the Home app as a new accessory so I’ll keep digging.