Skip to content

feat(tv): USB-CEC route (Pulse-Eight adapter through libCEC's cec-client) - #96

Draft
nextestudios wants to merge 6 commits into
lippdev:mainfrom
nextestudios:feat/tv-cec
Draft

nextestudios wants to merge 6 commits into
lippdev:mainfrom
nextestudios:feat/tv-cec

Conversation

@nextestudios

Copy link
Copy Markdown
Contributor

Depends on #93 (TV control plumbing). This branch sits on top of it; only the feat(tv): USB-CEC route commits are new here. Independent of #94 (LG) and #95 (Home Assistant). I'll rebase once #93 is merged.

Summary

Fourth route for #75: real HDMI-CEC through a Pulse-Eight USB-CEC adapter, the "most reliable, needs extra hardware" option from the issue. Works with any CEC TV (Anynet+, Bravia Sync, SimpLink…), no network involved.

  • Uses libCEC's own cec-client.exe (the user installs libCEC, which also brings the adapter driver), so there's no native library to bundle or P/Invoke: cec-client -s -d 1 -t p -p <input> with on 0 then as (Active Source, so the TV switches to the port the adapter is on); standby 0 on restore.
  • Finds cec-client.exe in Program Files (x86) / Program Files → Pulse-Eight\USB-CEC Adapter, then the PATH, or a custom path (file or folder). Settings shows which one will be used.
  • Clear messages for a missing client, no adapter ("autodetect FAILED" / "could not open a connection"), timeout (15 s per command) and non-zero exit.
  • Settings: USB-CEC adapter (Pulse-Eight) option reusing the HDMI input field, plus the cec-client card; strings in pt-BR / en-US / es-ES.
  • Pure argument/command/output/path logic in CecCommands.cs, linked into the tests.
  • Guide section (en + pt-BR), README bullet, docs/TESTING.md §3f, changelog under [Unreleased].

Validation

  • New CecCommandsTests (arguments per port with clamping, commands, adapter-missing detection, custom path as file or quoted exe, default search order).
  • Written on macOS: the app build and dotnet test are left to CI.
  • Not tested with an adapter (I don't have one); manual checks in docs/TESTING.md §3f.

🤖 Generated with Claude Code

nextestudios and others added 6 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>
…ent)

Runs cec-client -s -t p -p <input> with "on 0" then "as" (Active Source)
to wake the TV on the PC's input, and "standby 0" on restore. Finds
cec-client in libCEC's install folders or on the PATH (or a custom path),
and explains a missing adapter or client.

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>
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