install the app in /usr/local/lib/pdtv26-status, not in the state
directory: with DynamicUser, systemd makes /var/lib/pdtv26-status its
own symlink to /var/lib/private, and the service failed at
STATE_DIRECTORY ("File exists"). The package's check now catches a unit
that runs a program from its own StateDirectory.
Generated-by: Claude Opus 5.5
Peace and Dignity at the TV: delegating the remotes to an agent
Watching TV used to mean turning the dial to 4 (NBC), 5 (CBS), or 9 (ABC). Now one stray press of the Input button leaves a "No Signal" screen with no obvious way back; the TV comes on but the cable box doesn't; the sound disappears because a menu sent it somewhere else. Rather than inflict this mess on our elders, we can respect them: let them say what they want, and delegate the details of handling the devices to an agent.
Part of the agent is a box within reach of the couch: press its button and talk. Its ears and voice, speech recognition and synthesis, run on a computer at home, so recordings of you never leave the house; the language model behind it sees only a transcript.
"Put on the ballgame," says Dad
One request from the couch becomes a dozen steps for the agent, with a look at the screen when it needs one:
Dad: [presses the button] Put on the ballgame.
↳ notes: the home team, and the cable lineup
↳ web search: today's game, start time, which network
↳ ir: TV power, cable box power
↳ ir: Input, to the cable box
↳ ir: channel 6, 1, 4, Enter
↳ look: the game?
Agent: Here's the game. It started ten minutes ago.
The game isn't on 4, 5, or 9. It's on a sports network in the hundreds, behind two Power buttons, the Input button, and the cable box's remote. Our elders have done their share; let the agent do this.
How it works
The agent has two parts: the box within reach of the couch, with an IR emitter on a cord where the TV can see it, and a home server that runs speech and the brain; the diagram draws those two apart, since they can be.
near the couch speech server brain host
┌───────────────┐ hear ──▶ ┌──────────────┐
│ the box │ speak ──▶ │ whisper.cpp │
│ Pi 3B │ │ piper │
│ AIY Voice HAT │ ask ──────────────────────────────▶ ┌──────────────┐
│ button + LED │ │ brain, in │
│ │ ◀──── ir (learn, send) ───────────── │ bwrap, with │
│ │ ◀──── look (one frame) ───────────── │ an MCP chan. │
└───────────────┘ └──────────────┘
└─ USB cord ─▶ Pico IR ──▶ TV, cable box
- A press of the box's button starts a conversation, and a chime says it's your turn.
- The box records the clip and, with its
speechcapability, has the speech server transcribe it (whisper.cpp). - The box sends the text with its
askcapability: an MCP channel into the brain: a long-running, sandboxed language model session. - To act, the brain uses its capabilities on the box:
ir(send a learned code through the Pico) orlook(one still frame from a camera aimed at the TV; the box flashes its LED and taps a sound on every look, so there's no unannounced looking). - With the same
speechcapability, the box has the speech server voice the brain's reply (piper), and plays the WAV. - When the brain can't fix something,
report_problemopens an issue on one repository, using a fine-grained token that can do nothing else, so the person who looks after the box gets mail.
Whoever looks after the box can check a status page from a phone: whether the box, speech, and the brain are up, and counts of conversations, turns, IR presses, and looks. No transcripts.
The brain is Claude Code today, by way of its channels feature; the capabilities don't depend on it, and another harness that speaks MCP could take its place. Its instructions say how to work the TV; a household file says who's who.
Capabilities and confinement
An agent in the living room should be able to do what it's for, and no more. A capability is a reference that both names a service and grants the right to use it. Each part holds capabilities for exactly the services it uses. The brain can press IR buttons and take one camera frame, but it can't reach a shell on the box or anyone's files.
The parts talk over Cap'n Web; CONTRIBUTING says how.
Parts
The agent is built from parts you can buy and solder:
- The box: a Raspberry Pi 3B with a Google AIY Voice Kit v1 (speaker, two mics, the button), running NixOS.
- The IR emitter: a Raspberry Pi Pico H with an IR transceiver (wiring), on a USB cord from the box, aimed at the equipment.
- The camera: an RTSP camera on the LAN, aimed at the TV.
- Home server: any Linux machine with Nix and systemd, for speech and the brain; x86_64 with AVX2 is plenty. whisper.cpp's base.en model transcribes an 11 s clip in about 2 s.
Make your own
You'll need the parts above, a Linux home server with Nix, and an afternoon. You choose a few names: the box's, your home server's, your Wi-Fi network's. Everything else has a default. The setup guide walks through it.