Skip to content

feat: HDMI-CEC — wake the TV, remote keys - #5

Merged
madeofpendletonwool merged 1 commit into
mainfrom
agent/lead-software-engineer-server/01a13cb1
Oct 15, 2026
Merged

madeofpendletonwool merged 1 commit into
mainfrom
agent/lead-software-engineer-server/01a13cb1

Conversation

@madeofpendletonwool

@madeofpendletonwool madeofpendletonwool commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

MAD-807. HDMI-CEC through the kernel framework (cec-ctl, not libcec): the TV wakes and switches to the box when music starts, the TV remote drives /tv through injected uinput keys, a 3 s OK hold opens setup and shows the box's IP and version, and an optional standby (off by default) puts a box-owned TV to sleep when the room goes quiet.

  • boxd registers as a playback device on /dev/cec0 (+ /dev/cec1 for audio=hdmi2) and watches the bus with cec-ctl --monitor
  • wake/switch is rate-limited to once per playback start and once every 5 minutes
  • access comes from a cec group + udev rule, not root
  • tests pin the monitor parsing, the long-press state machine, the rate limits and the standby policy; the smoke test covers the new image stage
  • docs: ADR 0009, docs/hardware.md TV brand matrix (hardware checks pending — needs real TVs), the CEC gauntlet in docs/testing.md
  • pairs with one web case in Syncphony so the remote's play/pause (MediaPlayPause) works: web: treat MediaPlayPause as play/pause on the big screen Syncphony#72

- boxd claims the playback logical address on the CEC adapters at start (cec-ctl, not libcec) and watches the bus with a monitor per adapter
- playing bridge events wake the TV and switch it to the box, once per playback start and at most every 5 minutes
- the TV remote's keys (arrows, OK, Back, Play/Pause) become Chromium key events through an injected uinput keyboard
- a 3 s OK hold opens the setup window and shows the box's IP and version on the TV
- cec_standby=on puts a TV the box switched on into standby after cec_standby_minutes idle, unless someone else has taken the input
- cec group + udev rule grant /dev/cec* and /dev/uinput without relying on root; smoke test covers the new stage
- docs: ADR 0009, docs/hardware.md TV matrix (pending bench), CEC gauntlet in docs/testing.md
@madeofpendletonwool
madeofpendletonwool merged commit 477dff1 into main Oct 15, 2026
1 of 2 checks passed
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