A simple wrapper around ADB to send commands to Android TVs.
Currently it only allows switching input sources (since this functionality is not exposed in the Philips TV API).
You need Android Debug Bridge (standard Android debugging app) installed for this tool to work, since it's just a wrapper around adb
to send specific key inputs to the TV. Just google install adb %your_os%
for installation instructions for your OS.
Make sure adb
is added to PATH!
Install on Ubuntu:
sudo apt install adb
This has to be enabled to allow adb
to talk to the TV:
- On your TV find Android Settings > Device > About > Build and press it 7 times until you see a notification.
- Go back to Android Settings > Preferences > Developer options
- In Developer options enable 'USB debugging'. If you have a separate option for LAN/WI-FI debugging, enable it instead.
Set the TV's ip address with a --host
parameter and a desired input source with an --input
parameter (number from 1 to 6).
The first time you connect to your TV it will display a promt. Answer 'yes' so it does not show up at every request.
Examples:
Select HDMI1:
python android-tv-remote.py --host %tv_ip_address% --input 1
Select SCART:
python android-tv-remote.py --host %tv_ip_address% --input 6