How mikhail-ramirez/tv-control works
tv-control is a small browser-based remote for Android TV and Fire TV over network ADB. A user connects or selects a control in the web page; the browser calls the Node HTTP API, which manages connection state and sends commands to the TV. Wake can optionally send a Wake-on-LAN packet and wait before connecting. The README also documents responsive desktop/mobile controls and environment-based configuration. Server behavior is sampled in src/server.js; the page’s markup and styling are present in the tree but were not sampled, so their internal structure is not expanded.
Main entry points: server.js API handlers · app.js Remote controls · index.html Remote page
Components 12
Browser remote
- Remote controls
public/app.js - Remote page
public/index.html
HTTP backend
- HTTP server
src/server.js - API handlers
src/server.js - Connection state
src/server.js
TV transport
- Wake-on-LAN
src/server.js - ADB connection
src/server.js - Key commands
src/server.js
Other components
- User
- ADB CLI
- Local network
- TV device
Connections 15
- User → Remote controls: presses controls
- HTTP server → Remote page: serves static page
- Remote page → Remote controls: loads script
- Remote controls → API handlers: sends HTTP requests
- API handlers → Connection state: reads state
- Connection state → API handlers: returns status
- API handlers → ADB connection: connects
- API handlers → Wake-on-LAN: sends wake packet
- API handlers → Key commands: dispatches key
- Key commands → ADB connection: ensures connection
- ADB connection → ADB CLI: runs connect checks
- Key commands → ADB CLI: runs key event
- ADB CLI → TV device: controls over ADB
- Wake-on-LAN → Local network: broadcasts packet
- Local network → TV device: wakes device