Skip to content

feat(tv): LG webOS route (Wake-on-LAN + SSAP over WebSocket) - #94

Draft
nextestudios wants to merge 5 commits into
lippdev:mainfrom
nextestudios:feat/tv-webos
Draft

nextestudios wants to merge 5 commits into
lippdev:mainfrom
nextestudios:feat/tv-webos

Conversation

@nextestudios

Copy link
Copy Markdown
Contributor

Depends on #93 (TV control plumbing + Google TV / Android TV). This branch sits on top of it; only the last commit, feat(tv): LG webOS route, is new here. I'll rebase once #93 is merged.

Summary

Second route for #75: LG webOS TVs (2014+), over the local network, nothing to install.

  • Power on: Wake-on-LAN with the TV's MAC (needs "Turn on via Wi-Fi" / "LG Connect Apps" on the TV), through the shared TvNetwork.ConnectAsync retry loop from feat(tv): turn the TV on and switch input over the network (Google TV / Android TV) #93.
  • Pairing: SSAP register over ws://host:3000, falling back to wss://host:3001 (newer firmware; self-signed certificate, so validation is off for that socket only, on the LAN address the user typed). The manifest asks only for CONTROL_POWER, CONTROL_INPUT_TV, READ_INPUT_DEVICE_LIST, READ_POWER_STATE (no signed manifest needed, like aiowebostv). The client-key the TV returns is kept per TV in the data folder (webos-<ip>.key), so it prompts once.
  • Input / standby: ssap://tv/switchInput with HDMI_1-HDMI_4; ssap://system/turnOff.
  • Settings: new LG webOS (network) option reusing the IP / MAC / HDMI fields; strings in pt-BR / en-US / es-ES.
  • Pure message building/parsing in WebOsProtocol.cs, linked into the tests.
  • Guide section (en + pt-BR), README bullet, docs/TESTING.md §3d, changelog under [Unreleased].

Validation

  • New WebOsProtocolTests (register payload with/without key, switchInput for each port, reply classification: prompt, registered, response, refused, error, garbage).
  • Written on macOS: the app build and dotnet test are left to CI.
  • Not tested on an LG TV (I don't have one); manual checks in docs/TESTING.md §3d.

🤖 Generated with Claude Code

nextestudios and others added 5 commits September 26, 2026 19:57
… / Android TV)

Settings → TV: console mode wakes the TV and switches it to the PC's HDMI
input before the display flow, and can put it in standby after the restore.
First provider: Google TV / Android TV through ADB (port 5555), with a small
in-process ADB client (auth with this PC's RSA key, shell key events), so
nothing has to be installed on the PC. Optional Wake-on-LAN for TVs that drop
off the network in standby, and a custom input command for TVs that ignore
the HDMI key codes. A TV that doesn't answer is only logged.

Refs lippdev#75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Powers the TV on with Wake-on-LAN, pairs over ws://:3000 (falling back to
wss://:3001 on newer firmware) with a minimal permission list, keeps the
client key per TV, then switches to HDMI_n with ssap://tv/switchInput;
standby uses ssap://system/turnOff.

Refs lippdev#75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant