dwaan / homebridge-adb

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

Add the support of changing the tv signal #60

Closed Pacoakm closed 2 years ago

Pacoakm commented 3 years ago

Hello, would you please add the support of changing the tv signal. Just like changing the HDMI signal.Now I just can open apps in homekit

danielkit83 commented 2 years ago

Hope, we can execute below command as individual input to switch the TV channel on HomeKit TV Channel 1 adb -s 192.168.88.181 shell "input keyevent 8 && input keyevent 11" TV Channel 2 adb -s 192.168.88.181 shell "input keyevent 8 && input keyevent 16” TV Channel 3 adb -s 192.168.88.181 shell "input keyevent 8 && input keyevent 12” TV Channel 4 adb -s 192.168.88.181 shell "input keyevent 9 && input keyevent 11"

dwaan commented 2 years ago

Hope, we can execute below command as individual input to switch the TV channel on HomeKit

TV Channel 1 adb -s 192.168.88.181 shell "input keyevent 8 && input keyevent 11"

TV Channel 2 adb -s 192.168.88.181 shell "input keyevent 8 && input keyevent 16”

TV Channel 3 adb -s 192.168.88.181 shell "input keyevent 8 && input keyevent 12”

TV Channel 4 adb -s 192.168.88.181 shell "input keyevent 9 && input keyevent 11"

Nice info. The current plug-ins support adb shell command as input, have you tried putting it over there? In theory it should work. Sadly my device doesn't have TV input, so I can't confirm if it's working or not.

oscartang1 commented 2 years ago

Unfortunately the app ID is mandatory, so the adb shell command is always ignored. It will go with the app id before the adb shell command.

dwaan commented 2 years ago

Hey. Thank you for the report. To explain it a bit, the id is mandatory because the plug-in use it to identify which running app right now. Without it, the input selection in home app wouldn’t be working.

But for the next problem, I will update it in the next release.

oscartang1 commented 2 years ago

Hey. Thank you for the report. To explain it a bit, the id is mandatory because the plug-in use it to identify which running app right now. Without it, the input selection in home app wouldn’t be working.

But for the next problem, I will update it in the next release.

Thanks a lot for your effort!