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

v2 - WOL/ADB power ON - not working properly #84

Open
obs945 opened this issue May 14, 2022 · 4 comments
Open

v2 - WOL/ADB power ON - not working properly #84

obs945 opened this issue May 14, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@obs945
Copy link

obs945 commented May 14, 2022

Describe the bug
Directly upgrade to v2.0.0 and homebridge-adb not work anymore.

Expected behavior
My tv sideloaded wakelock v3 and homebridge-adb v1.5.5 did all the trick but cannot work after upgrade to latest version 2.0.0.
I tried add mac address on v2.0.0 setting and WOL function works (can turn on tv), however, the system cannot get status from my tv. TV toggle always showed off on Homekit app. But I went back to v1.5.5 (remove WOL setting code) and all worked again.

Log output
v..2.0.0 log [abnormal status]
[14/05/2022, 09:18:15] [HomebridgeADB] Mi TV - Trying to turn ON accessory. This will take awhile, please wait...
[14/05/2022, 09:18:29] [HomebridgeADB] Mi TV - Power On - Failed
[14/05/2022, 09:18:29] [HomebridgeADB] Mi TV - Power on error message:
Failed
[14/05/2022, 09:18:39] [HomebridgeADB] Mi TV - Trying to turn ON accessory. This will take awhile, please wait...
[14/05/2022, 09:18:53] [HomebridgeADB] Mi TV - Power On - Failed
[14/05/2022, 09:18:53] [HomebridgeADB] Mi TV - Power on error message:
Failed

v.1.5.5 log [normal status]
[14/05/2022, 09:20:32] [HomebridgeADB] Mi TV - Trying to Turn On device
[14/05/2022, 09:20:32] [HomebridgeADB] Mi TV - Running - adb -s 192.168.1.147 shell "input keyevent KEYCODE_POWER"
[14/05/2022, 09:20:33] [HomebridgeADB] Mi TV - ADB - Power On
[14/05/2022, 09:20:34] [HomebridgeADB] Mi TV - checkPower - true
[14/05/2022, 09:20:34] [HomebridgeADB] Mi TV - checkInput - using dumpsys window
[14/05/2022, 09:20:34] [HomebridgeADB] Mi TV - Current app - home
[14/05/2022, 09:20:44] [HomebridgeADB] Mi TV - Trying to Turn Off device
[14/05/2022, 09:20:45] [HomebridgeADB] Mi TV - ADB - Power Off
[14/05/2022, 09:20:45] [HomebridgeADB] Mi TV - checkPower - false

Config
"accessories": [
{
"name": "Mi TV",
"ip": "192.168.1.147",
"timeout": 5000,
"interval": 500,
"category": "TELEVISION",
"inputs": [
{
"name": "Netflix",
"id": "com.netflix.ninja"
},
{
"name": "Youtube",
"id": "com.google.android.youtube.tv"
},
{
"name": "Disney+",
"id": "com.disney.disneyplus"
},
{
"name": "Apple TV+",
"id": "com.apple.atve.androidtv.appletv"
},
{
"name": "Input Source",
"id": "com.mediatek.wwtv.tvcenter"
}
],
"debug": true,
"backbutton": "KEYCODE_BACK",
"playpausebutton": "KEYCODE_MEDIA_PLAY_PAUSE",
"infobutton": "KEYCODE_HOME",
"poweron": "KEYCODE_POWER",
"poweroff": "KEYCODE_POWER"
}
],
"platform": "HomebridgeADB"
},

@obs945 obs945 added the bug Something isn't working label May 14, 2022
@dwaan
Copy link
Owner

dwaan commented May 14, 2022

Hey Thank you for the report. Just to clarified:

v2

  • Turn on with ADB: work. Home app status: Doesn’t work?
  • Turn in with WOL: work. Home app status: doesn’t work.

V1.5.5

  • turn on with ADB: work. Home status: work
  • Turn on with WOL: doesn’t work. Home app status: work

@obs945
Copy link
Author

obs945 commented May 14, 2022

In order to more clearly clarify the status I test several combinations. Please referred to below

====

I execute wakelock v3 to prevent homebridgeADB missing connection to tv messages pop up during sleeping mode (but missing connection messages will pop up after power off till to next power on).

[14/05/2022, 13:33:22] [HomebridgeADB] MiTV - missing port in specification: tcp:192.168.1.147
[14/05/2022, 13:33:22] [HomebridgeADB] MiTV - Reconnected
[14/05/2022, 13:33:22] [HomebridgeADB] MiTV - Reconnecting...

My working setting on V1.5.5
"poweron": "KEYCODE_POWER", "poweroff": "KEYCODE_POWER"
I didn't set MAC address and keep TV in sleeping mode (not totally turn off).
-> Turn on/off with ADB: work. Home status: work
Turn on with WOL: doesn’t use. Home app status: work

Partial working setting on V1.5.5
"poweron": "KEYCODE_POWER" or "KEYCODE_WAKEUP", "poweroff": "KEYCODE_SLEEP"
Set MAC for WOL function.
-> Turn on with ADB: doesn't work, Turn off with ADB: work. Home status: work
Turn on with WOL: work (but cannot turn on again with ADB after turn off). Home app status: work


There is no need to execute wakelock v3. There will no missing connection to tv message showed in log even power off the tv.

Partial working setting on V2
"poweron": "KEYCODE_POWER", "poweroff": "KEYCODE_POWER"
or
"poweron": "KEYCODE_POWER" or "KEYCODE_WAKEUP", "poweroff": "KEYCODE_SLEEP"
Set MAC for WOL function.
-> Turn on/off with ADB: doesn't work. Home app status: doesn’t work
Turn on with WOL: work (but cannot turn on/off again with ADB). Home app status: doesn’t work.

Although Homebridge log showed as below, WOL function always doing great.
[14/05/2022, 14:18:00] [HomebridgeADB] MiTV - Wake On LAN - Sending magic
[14/05/2022, 14:18:00] [HomebridgeADB] MiTV - Wake On LAN - Failed
[14/05/2022, 14:18:00] [HomebridgeADB] MiTV - WOL error message:
Device is not connected

@dwaan dwaan changed the title Upgrade to ADB 2.0.0 and not work v2 WOL/ADB power ON - not working properly May 18, 2022
@dwaan dwaan changed the title v2 WOL/ADB power ON - not working properly v2 - WOL/ADB power ON - not working properly May 18, 2022
@ahmadnazirafiq
Copy link

Had to downgrade to version 1.5.5. Seems like it doesn’t work at all on version 2.

@halk1982
Copy link

halk1982 commented Sep 11, 2022

I have the exact same issue on one of my devices (it was fine on 1.5.5). Specifically, while the device remain attached and connected (adb connect response is : already connected), when I try to wakeup the device I'm getting "error: closed" in response (device is a Samsung tablet SM-T235). Then if I kill and start server or if I disable and then enable USB debugging on the device, everything goes back to normal. This is so strange because on another tablet I have (BMAX MaxPad I10) everything works fine, with no issue at all. Just installed 2.1.2, no change. @dwaan any thoughts ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants