Repository navigation
feat(tv): turn the TV on and switch input over the network (Google TV / Android TV) - #93
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, this is a solid base for #75. Before it moves out of draft:
|
… / 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, 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 Sonnet 5.5 <noreply@anthropic.com>
- adbkey.pem is written through SecretProtector (DPAPI, per Windows user); a key from another user/PC, or a plain one from an older build, is handled (recreated / protected in place). - Guide: nothing is added with the default route, and the TV step is capped at 30 s on start / 15 s on restore. - Tests: the default config runs no TV route. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
08d988e to
c130143
Compare
|
Thanks for the review. Updated, point by point:
|
# Conflicts: # src/ConsoleMode/Services/ConsoleEngine.cs
There was a problem hiding this comment.
ℹ️ One changelog placement issue; no behavioral issues found in the reviewed code.
Reviewed changes This review covers the TV settings/configuration, Android TV ADB and Wake-on-LAN implementation, console-engine integration, and related tests and documentation.
- TV configuration: Adds a disabled-by-default TV provider and settings for Android TV network control.
- ADB control: Adds authentication, shell commands for wake/input/standby, and optional Wake-on-LAN.
- Session integration: Wakes the TV before reading displays at start and optionally puts it in standby after restoring the desktop.
- Validation and guidance: Adds pure-logic tests, localized UI strings, paired guides, and manual hardware checks.
GPT Luna | 𝕏
| - Sounds in the Console interface when you move the focus, pick and go back (made by the app itself, at a low volume). Turn them off in Settings → Interface sounds. (#117) | ||
| - Controller shortcuts of your choice: the button that opens Console Mode, the session menu's and the one that goes back to the PC are now set in Settings (hold the buttons you want and let go on the same controller). Capture never combines buttons from different controllers. None is on by default: the first time you open this version the app shows the setup, with a suggestion for each action (Home, Select + Y and Start + Select). One button can't serve two actions. If you used the Home button or Start + Select before, choose them again. (#116) | ||
| - Settings → "Receive test versions (alpha and beta)": anyone can join the tests of upcoming versions from the app. Off by default; turning it on shows a warning that test versions can have bugs. | ||
| - Settings → TV: console mode turns the TV on and switches it to the PC's HDMI input, and can put it in standby on restore. First route: Google TV / Android TV over the network (ADB), nothing to install on the PC. (#93) |
There was a problem hiding this comment.
This feature is already listed under [Unreleased] above, but this second entry places it in the published [1.6.0-alpha.3] notes as well. Please keep it only under [Unreleased] so that the historical release notes do not claim this PR shipped in alpha.3.

Summary
First step for #75: console mode turns the TV on and switches it to the PC's HDMI input, and can put it in standby after the restore. This PR adds the plumbing plus the Google TV / Android TV route (TCL, Sony, Hisense, Philips…), which needs no extra hardware and nothing installed on the PC.
ConsoleEngine.StartcallsTvControlService.TurnOnfirst, so the TV is up before the fresh screen read /EnsureActivewait;Stopoptionally callsTurnOffafter the desk is back. Both are bounded (30 s / 15 s) and never throw: a TV that doesn't answer is only logged, and the existing "game screen did not turn on" path does the rest.Services/Tv/AdbClient.cs) on port 5555: CNXN, AUTH with this PC's RSA-2048 key (kept in the data folder asadbkey.pem, so the TV asks "Allow debugging?" once), thenshell:input keyeventWAKEUP →TV_INPUT_HDMI_n(SLEEP for standby). No adb.exe to ship. If the TV is unreachable and a MAC is set, it sends Wake-on-LAN and retries for 20 s. "Wireless debugging" (TLS pairing) is detected and explained instead of hanging.ITvController/TvControlService.Createare the extension point for the other routes in the issue (LG webOS, Home Assistant, USB-CEC), which I'll send as separate PRs on top of this one.AdbProtocol.cs/WakeOnLan.cs(framing, checksum/magic, token signature, Android'sRSAPublicKeylayout withn0inv/rr, endpoint parsing, HDMI key codes, MAC parsing, magic packet), linked into the test project.docs/TESTING.md§3c, changelog under[Unreleased].Validation
TvControlTests(ADB framing and header validation, signature verifies as a SHA-1 digest, public key layout checked against BigInteger math, endpoint/HDMI mapping, MAC parsing, magic packet).dotnet testare left to CI.docs/TESTING.md§3c; to be run on a TCL Google TV.🤖 Generated with Claude Code