Reading the repo
Reading the repo
How to install on Linux
Your own Google TV home screen and phone remote, with an optional Claude assistant. Set it up by handing this repo to your AI agent.
Saved setup from 3 h ago
Will it work on Linux?
Heads-upBuilding it yourself? It also needs 4 settings in .env.
The maintainers included scripts/install-hook.sh. Run it from the cloned folder after reading it.
bash scripts/install-hook.sh
Do this on the TV itself.
.venv/bin/python scripts/check-tv.py <tv address>. If it says ADB is open on port 5555,
everything in this repo works as it is. If it says only Wireless debugging is on, see the box
below.The first time a computer connects, the TV asks "Allow USB debugging?". Tick Always allow and press Allow. You never see it again.
Allow every computer before you switch the Google home off. Seen on one Google TV (Android 14): after
apply.shswitched off the Google TV home and its setup app, the TV no longer showed "Allow USB debugging?" for any new computer. Computers allowed before that kept working. So connect each computer you will use (check-tv.py <tv address> --adb, and for option C the app's Connect ADB) and press Allow before step 6. If it already happened, see "If something is stuck" in docs/UNINSTALL.md.
Only Wireless debugging? Newer Google TVs (Android 11 and up) may offer only Wireless debugging, which pairs with a code and uses a random port that changes after a restart. couch-tv's scripts and the bridge speak plain ADB on a fixed port, so turn the fixed port on once with Google's own tools (Android platform-tools):
- On the TV: Developer options, Wireless debugging on, then Pair device with pairing code. It shows a code and an address with a port, for example
<tv address>:37123.- On the computer:
adb pair <tv address>:<pairing port> <code>.- Back on the Wireless debugging screen, note the port under "IP address and port", then
adb connect <tv address>:<that port>.adb tcpip 5555. Port 5555 is now open andcheck-tv.pyshould say ADB is open on port 5555.On some TVs port 5555 closes again after a restart. Then run steps 2 to 4 again (option B's daily guard and the remote need it open). If your TV keeps a different fixed port open, set
"adb_port"on that TV inconfig.json(orADB_PORT=<port>for the scripts). The Wireless debugging port itself needs Google'sadb; couch-tv cannot use it directly.
Mac: "allow devices on your local network". macOS asks once per program before it lets it talk to devices at home. Say Allow for Terminal (or the app your AI agent runs in). A program that is new to the Mac, like Google's
adbstraight after downloading it, can be blocked silently: it then cannot reach the TV although everything else can. couch-tv's own tools (tv-home/tools/tvadb.py,on-tv/scripts/real-tv.py,check-tv.py) are plain Python and run inside the Python you have already allowed, so use them for everything except the one-off Wireless debugging pairing above. Ifadbis blocked: System Settings, Privacy and Security, Local Network, and switch on the app it runs in.
git clone https://github.com/Seagey/couch-tv.git
cd couch-tv
python3 --version # 3.11 or newer
python3 -m venv .venv
.venv/bin/pip install -r bridge/requirements.txt
cp config.example.json config.json
Edit config.json (it is private, it never gets committed):
tvs: put your TV's address in ip. Give it a name. Add more TVs by adding more entries.people: the names that show on the "who is watching" switch, any number. None or one: no
switch. Two: a switch. Three or more: a round head icon that opens a list. It shows even before
anyone has watched anything. Mark children with
"kid": true and visitors with "guest": true so they stay out of the household's picks.weather: your latitude, longitude, place name and time zone (Open-Meteo, free, no key). A
suburb or city, never a home address.country: two letter code, for where shows stream.…
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
git clone https://github.com/Seagey/couch-tv.git cd couch-tv
Python 3, Node.js
sudo apt install python3 python3-pip # https://nodejs.org/en/download (or nvm)
In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal.
python3 --version # 3.11 or newer python3 -m venv .venv .venv/bin/pip install -r bridge/requirements.txt cp config.example.json config.json .venv/bin/python bridge/pair_tv.py living-room .venv/bin/python bridge/pair_tv.py living-room --adb npm ci npm run build .venv/bin/python bridge/server.py TV_IP=<your tv address> .venv/bin/python tv-home/tools/survey-tv.py TV_IP=<your tv address> APK=couch-tv-home.apk sh tv-home/tools/apply.sh TV_IP=<your tv address> APK=couch-tv-home.apk BRIDGE_URL=http://my-computer.local:5400 sh tv-home/tools/apply.sh $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platforms;android-34" "build-tools;34.0.0" $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses # answer y to each licence JAVA_HOME=/path/to/jdk-21 ANDROID_HOME=/path/to/android-sdk sh scripts/build-apk.sh
No reports for Linux yet.
Opens a chat with this manual already filled in, for Linux. It uses your own account; gitmanual sends nothing.