chore: rescope repo to lg-smtv-mcp and archive PoC under doc/poc
- Move discover.py, tv_test.py, and capabilities.md into doc/poc/ - Document verified Dev Mode SSH + scp screenshot findings in doc/poc/capabilities.md - Update README.md and flake.nix description for lg-smtv-mcp scope - Ignore *.jpg captures in .gitignore (alongside .env and .direnv)
This commit is contained in:
1 parent
e06a706f0e
commit
800a43456a
6 files changed
+15
-11
No files matched your search
@@ -1,5 +1,8 @@
|
|||||||
|
.env
|
||||||
|
.direnv
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
.ruff_cache/
|
.ruff_cache/
|
||||||
.client_key.json
|
.client_key.json
|
||||||
.tv_state.json
|
.tv_state.json
|
||||||
|
*.jpg
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# webos-testing
|
# lg-smtv-mcp
|
||||||
|
|
||||||
Testing LG webOS local network control (SSDP discovery, SSAP WebSocket RPC, DIAL) from Linux/Python.
|
Model Context Protocol (MCP) server for local network control of LG Smart TVs (webOS) over SSAP WebSockets, Wake-on-LAN, and optional Developer Mode SSH screenshot capture.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@@ -10,11 +10,10 @@ nix develop
|
|||||||
|
|
||||||
Provisions Python 3.14, `websockets`, `ruff`, and `pyright` via [flake.nix](flake.nix).
|
Provisions Python 3.14, `websockets`, `ruff`, and `pyright` via [flake.nix](flake.nix).
|
||||||
|
|
||||||
## Scripts
|
## Historical PoC & Empirical Notes
|
||||||
|
|
||||||
- `discover.py` — SSDP multicast probe (`--all` to list DIAL/DLNA/SSAP services and MAC address).
|
Initial feasibility probes and verified device findings (`65UR8750PSA` / `WebOS/4.1.0`) are archived in [`doc/poc/`](doc/poc/):
|
||||||
- `tv_test.py` — One-shot SSAP pairing + command runner (`toast`, `info`, `apps`, `foreground`, `inputs`, `audio`, `launch`, `vol-up`, `vol-down`, `mute`, `raw`).
|
|
||||||
|
|
||||||
## Documentation
|
- [doc/poc/capabilities.md](doc/poc/capabilities.md) — Verified SSAP/DIAL endpoints, deep-link formats, `401` boundaries, and Developer Mode SSH screenshot pipeline.
|
||||||
|
- [doc/poc/discover.py](doc/poc/discover.py) — SSDP multicast probe (`--all` to list DIAL/DLNA/SSAP services and MAC address).
|
||||||
- [docs/capabilities.md](docs/capabilities.md) — Verified SSAP/DIAL capabilities, deep-link contracts, and boundaries observed on `65UR8750PSA` (`WebOS/4.1.0`).
|
- [doc/poc/tv_test.py](doc/poc/tv_test.py) — One-shot SSAP pairing + command runner.
|
||||||
@@ -28,9 +28,11 @@ Empirical notes from probing `192.168.1.11` (`Ethernet`, MAC `7c:64:6c:94:d1:24`
|
|||||||
- **Deep-linking quirks observed**:
|
- **Deep-linking quirks observed**:
|
||||||
- **YouTube (`youtube.leanback.v4`)**: Expects `{"contentTarget": "v=<id>&t=<seconds>s"}` (full `https://...` URLs were ignored). If cold-started onto the profile picker, a second launch switches to the video.
|
- **YouTube (`youtube.leanback.v4`)**: Expects `{"contentTarget": "v=<id>&t=<seconds>s"}` (full `https://...` URLs were ignored). If cold-started onto the profile picker, a second launch switches to the video.
|
||||||
- **Netflix (`netflix`)**: Expects `{"contentTarget": "m=https://www.netflix.com/title/<id>"}` (or `/watch/<episode_id>`). Without `m=`, Netflix hung on loading. Audio/subtitle track selection is not exposed via `params`.
|
- **Netflix (`netflix`)**: Expects `{"contentTarget": "m=https://www.netflix.com/title/<id>"}` (or `/watch/<episode_id>`). Without `m=`, Netflix hung on loading. Audio/subtitle track selection is not exposed via `params`.
|
||||||
- **Screen capture (local only)**: `ssap://com.webos.service.capture/executeOneShot` with `{"path": "/tmp/test.jpg", "method": "DISPLAY", "format": "JPG"}` succeeded (`960x540`, `12754` bytes), **but**:
|
- **Screen capture (via SSAP + Dev Mode SSH)**: `ssap://com.webos.service.capture/executeOneShot` with `{"path": "/tmp/test.jpg", "method": "DISPLAY", "format": "JPG"}` succeeded (`960x540`, `10410`–`12754` bytes):
|
||||||
- Calling without `"path"` fails with `5 ERROR_NOT_ENOUGH_MEMORY`.
|
- Calling without `"path"` fails with `5 ERROR_NOT_ENOUGH_MEMORY`.
|
||||||
- `/tmp/test.jpg` is not served over `https://192.168.1.11:3001/tmp/...` (timed out); reading it off the TV requires **LG Developer Mode** SSH (port `9922`) or external HDMI capture.
|
- `/tmp/test.jpg` is not served over `https://192.168.1.11:3001/tmp/...` (timed out).
|
||||||
|
- **Verified workaround**: With **LG Developer Mode** + **Key Server** enabled (SSH on port `9922`, `ssh-rsa` host/pubkey algorithms enabled for the TV host), `scp webos-tv:/tmp/test.jpg .` transfers the `~10 KB` screenshot in `< 1s` (`1.1 MB/s`).
|
||||||
|
- Dev Mode shell environment observed: `uid=6739(prisoner) gid=5000(jailer)`, home `/media/developer`, `Linux LGwebOSTV 5.4.268-294.24.papikonda.2 #1 SMP PREEMPT ... aarch64 GNU/Linux` (`1222 MB` RAM).
|
||||||
|
|
||||||
### Blocked on Retail Firmware
|
### Blocked on Retail Firmware
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "LG webOS local control testing environment";
|
description = "LG Smart TV (webOS) MCP server and testing environment";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|||||||
Reference in new issue
Block a user