How griches/lgtvremote-cli works
LG TV Remote CLI is a standard-library Python command-line client for controlling webOS TVs over SSAP/WebSocket and Wake-on-LAN. The main workflow discovers or adds a TV, pairs it, saves device details, then routes commands to the selected TV. The README documents additional control areas and integrations, but the implementation is a single 110 KB module; the graph separates its documented responsibilities rather than implying separate packages. Edges use README-documented behavior or the excerpted dispatcher; unsampled command internals are not independently verified.
Main entry points: lgtvremote_cli.py Command dispatcher
Components 16
CLI and devices
- Command dispatcher
lgtvremote_cli.py - TV discovery
lgtvremote_cli.py - Device management
lgtvremote_cli.py - Device configuration
lgtvremote_cli.py
Connection and pairing
- PIN pairing
lgtvremote_cli.py - SSAP WebSocket
lgtvremote_cli.py
TV controls
- Power control
lgtvremote_cli.py - Remote and media
lgtvremote_cli.py - Audio control
lgtvremote_cli.py - Inputs and channels
lgtvremote_cli.py - Apps and URLs
lgtvremote_cli.py - Display settings
lgtvremote_cli.py
Network integrations
- Wake-on-LAN
lgtvremote_cli.py
Other components
- CLI user
- LG webOS TV
- Local network
Connections 24
- CLI user → Command dispatcher: runs commands
lgtvremote_cli.py - Command dispatcher → TV discovery: dispatches
README.md - Command dispatcher → Device management: dispatches
README.md - Command dispatcher → Power control: dispatches
lgtvremote_cli.py - Command dispatcher → Remote and media: dispatches
README.md - Command dispatcher → Audio control: dispatches
README.md - Command dispatcher → Inputs and channels: dispatches
README.md - Command dispatcher → Apps and URLs: dispatches
README.md - Command dispatcher → Display settings: dispatches
README.md - TV discovery → Device management: adds found TVs
README.md - Device management → PIN pairing: pairs devices
README.md - Device management → Device configuration: saves device data
README.md - PIN pairing → SSAP WebSocket: registers over
lgtvremote_cli.py - PIN pairing → Device configuration: stores pairing key
README.md - SSAP WebSocket → LG webOS TV: sends SSAP requests
README.md - TV discovery → Local network: discovers TVs
README.md - Power control → SSAP WebSocket: controls power
README.md - Power control → Wake-on-LAN: wakes TV
README.md - Wake-on-LAN → Local network: sends wake packets
lgtvremote_cli.py - Remote and media → SSAP WebSocket: sends controls
README.md - Audio control → SSAP WebSocket: sends audio commands
README.md - Inputs and channels → SSAP WebSocket: queries and switches
README.md - Apps and URLs → SSAP WebSocket: launches apps
README.md - Display settings → SSAP WebSocket: sets display options
README.md