全部使用案例

个人

语音操控自有智能电视:官方本地 API 三工具遥控

遥控器又掉沙发缝——想对自有电视说「Hey Grok, open Netflix」。

分享

当时卡在哪

@0xCodez(@InvestingVault 亦有复述)针对电视官方本地遥控 API(与手机遥控 App 同类)做了仅三工具(open_netflix、press_key、status)的小遥控,再接入 Grok Bot。步骤:同一 Wi-Fi、Settings→About 照片 + 其 prompt 交给 Claude Code、电视上按一次 Allow 配对,绝不 root/刷机/侧载。作者原文 prompt。仅限自有设备。与 xAI 无关。

要装什么、建什么

同一 Wi-Fi → About 照片 + 作者 prompt 进 Claude Code → 三工具 MCP → 电视 Allow → Grok 语音。

机器人

  • TV ears

    语音:经三工具本地遥控插件执行 open Netflix / press_key / status。

插件

  • 第一天不用插件。按「第一次怎么跑」做。

例行任务

  • 第一次先别开。自己看过一轮再说。

提示词

自有电视:官方本地遥控 API 语音遥控(仅 3 工具)

引自 @0xCodez — 按其公开原文。不要另编系统提示词。

最后一行是我们加的审批围栏:Never send, post, spend, or buy without my explicit yes.

(作者英文原文)
This is my own smart TV, my own home Wi-Fi and my own laptop.

I want to control my TV by voice through Grok Bot: I say "Hey Grok, open Netflix" and the TV opens the Netflix home screen and browses it on command ("go right", "scroll down", "open this one").

I'll press Allow on the TV myself and approve every connection.

I authorize you to set up the laptop side, talk to the TV through its official local remote-control API, install what's needed and make the changes below. Every change must be reversible.

I've attached a photo of the TV's Settings → About screen.

Done means: a small local "TV remote" service runs on this laptop with exactly three tools (open_netflix, press_key, status), Grok Bot can call it, and one voice command opens Netflix on my TV while I watch each step.

When a step doesn't need me, keep going.

→ First, identify my TV from the photo and explain in 5 lines how it can be controlled on my network: which OS it runs (Tizen, webOS or Google TV), which local API it exposes, how pairing works, how apps get launched by ID, and how remote key presses are sent.

If the photo shows a TV without network remote control, tell me plainly, and stop. Never root, flash, sideload or put the TV in developer mode.

→ Install only the official or most widely used library for my TV from official sources (PyPI, Homebrew or official GitHub releases): samsungtvws for Samsung, the SSAP/websocket API for LG webOS, adb for Google TV. Find the TV's IP on my network.

If the connection is blocked, tell me exactly which TV setting to check. On macOS, "No route to host" usually means the terminal needs Local Network access: allow it and retry.

→ Before changing anything, save the TV's current app and input, every setting you'll touch, and the undo commands.

→ Pair with the TV. The first time, wait for me to press Allow on the screen. Save the pairing token to a local file with owner-only permissions.

→ Build tvremote: a tiny MCP server with exactly three tools.

open_netflix: launches the Netflix app by its official app ID and waits for the home screen.

press_key: accepts only UP, DOWN, LEFT, RIGHT, ENTER, BACK, HOME, with a short pause between presses.
status: returns what's on the TV right now.
No shell access, no other apps, no free-form commands.

→ Connect tvremote to Grok Bot as a custom plugin through a Cloudflare Tunnel protected by a secret token. Write a short instruction for the bot: "Open Netflix when I ask, navigate only with press_key, describe what's on screen after each step."

If my Grok Bot plan can't use custom plugins, tell me plainly and fall back to a local wake phrase listener on the laptop instead.

→ Check the TV's state before every action and show me what you're about to send.

→ If Netflix shows "Who's watching?", a sign-in screen or any payment or plan prompt, stop and let me handle it. Never sign in, never pick a profile for me, never change the plan, never buy or rent anything.

→ Never touch the TV's firmware, accounts, network settings, parental controls, smart home automations or any other device on my network.

→ Add a live monitor that prints each command with a timestamp, plus a one-line health check: TV paired, tvremote up, tunnel up, Grok connected.

→ End with a cheat sheet (start, stop, re-pair the TV, revoke the plugin token) and the undo commands.

Never expose anything except those three tools to the internet, never type my passwords or sign in for me, never install apps from pirate sites.

Never send, post, spend, or buy without my explicit yes.

第一次怎么跑

  1. 1阅读 https://x.com/0xCodez/status/2113270979476545573 与完整 prompt 回复 https://x.com/0xCodez/status/2113270983142359331(致谢 @0xCodez;复述 https://x.com/InvestingVault/status/2115575750141059351)。
  2. 2智能电视与笔记本同一 Wi-Fi;拍 Settings → About。
  3. 3把作者 prompt 与照片交给 Claude Code(或同类)——只用官方本地遥控 API;绝不 root、刷机、侧载。
  4. 4配对时在电视上按一次 Allow;对外只暴露三工具(open_netflix / press_key / status)。
  5. 5接到 Grok Bot,试「打开 Netflix」;若出现选资料/登录/付费,你来处理——Bot 停下。

审批围栏

电视上的 Allow 由你按;Bot 绝不登录、选资料、购买或动固件。

你该改什么

偷「仅三工具 + 按一次 Allow」;遇到选资料/付费墙就停。

出处

Codez @0xCodez · 原帖

与 xAI 无关。提示词不是我们写的。第三方模板条款照旧适用。

去看模板

去看团队蓝图

Pro 设置包

想要完整设置,而不只是思路?

Pro 设置包为热门用例提供岗位描述、提示词、排程与踩坑。

了解 Pro