微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🏠

Google Home 智能语音中控

google-home · vlatest
效率 安全 S 级 作者 Unknown 公开目录收录
945 下载 366 安装 2.4k 收藏 44.7k 浏览

简介

基于 Google 官方 SDK 的智能家居语音控制方案,通过安全 OAuth 授权,让用户用自然语言操控全屋设备。

原始描述

Control smart home devices (lights, TV, etc.) via the Google Assistant SDK. Use when the user wants to trigger home automation commands.

通过你的 Agent 添加

安装目录:google-home/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/google-home-6979/
Codex CLI~/.codex/skills/google-home-6979/
DeepSeek Harness~/.agents/skills/google-home-6979/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Google Home Control 是一个基于 Python 的智能家居控制桥接工具,让 Claude/Clawdbot 能够直接调用 Google Assistant API 控制灯光、电视、音量等设备。用户需完成 Google Cloud OAuth 配置,建立本地 Python 虚拟环境并生成凭证,之后即可通过自然语言指令(如"关闭办公室灯""电视音量调到20")触发自动化。

显著优点

  • 官方 SDK 背书:使用 Google 官方发布的 google-assistant-sdk 和 google-auth-oauthlib,无第三方依赖风险
  • 架构简洁:仅 146 行代码、3 个文件,功能单一透明,无复杂隐藏逻辑
  • 数据本地化处理:OAuth 凭证存储于 ~/.config 本地目录,语音指令仅传输至 Google 官方服务器
  • 多维度安全通过:静态分析 95 分、依赖审计 100 分、网络分析 85 分,GDPR/CCPA/数据最小化原则全部合规

潜在缺点与局限

  • 配置门槛高:需自行创建 Google Cloud 项目、配置 OAuth 同意屏幕、生成 Desktop 类型客户端 ID,对非技术用户不友好
  • T3 来源风险:维护者为个人开发者 Mathew Pittard,GitHub 组织 clawdbot 活跃度有限,长期维护存在不确定性
  • 环境依赖重:必须维护独立的 Python 虚拟环境及特定版本依赖,跨平台兼容性需自行验证
  • 功能边界受限:仅支持 Google Assistant 已集成的设备生态,无法扩展至非 Google 协议的智能家居

适合人群

  • 具备 Linux/macOS 终端操作能力的进阶用户
  • 已深度使用 Google Home 生态、希望打通 AI 助手控制的技术爱好者
  • 愿意承担 T3 来源维护风险、能自行审查代码变更的隐私敏感型用户

常规风险

  1. 凭证泄露风险:credentials.json 若权限设置不当(默认可能 644),可被系统其他用户读取,建议手动改为 600
  2. OAuth 令牌长期有效性:Google 刷新令牌理论上长期有效,若设备丢失需及时在 Google 账户"第三方应用访问权限"中撤销
  3. gRPC 连接不可控性:网络分析显示依赖 Google 官方 gRPC 端点,虽加密传输但存在 API 变更或服务终止的被动风险
  4. 无审计追踪:Skill 本身不记录操作日志,难以排查异常指令来源

技能正文


name: google-home description: Control smart home devices (lights, TV, etc.) via the Google Assistant SDK. Use when the user wants to trigger home automation commands. author: Mathew Pittard (Mat)

Google Home Control (N.O.V.A.)

Created by: Mathew Pittard (Mat)
Portfolio: mathewpittard.vercel.app

This skill allows Clawdbot to control your smart home devices (lights, TVs, appliances) directly using a Python-based bridge to the Google Assistant SDK.

🛠️ Step-by-Step Setup

To get this skill working, you'll need to link it to your own Google account. Follow these steps:

1. Create a Google Cloud Project

  1. Go to the Google Cloud Console.
  2. Create a new project (e.g., "My Smart Home").
  3. Enable the Google Assistant API.

2. Configure OAuth

  1. Go to APIs & Services > Credentials.
  2. Configure your OAuth Consent Screen (set User Type to "External" and add yourself as a test user).
  3. Create an OAuth 2.0 Client ID with the type Desktop app.
  4. Download the JSON file and rename it to client_secret.json.

3. Prepare the Python Environment

This skill requires a Python virtual environment with specific dependencies:

# Create and activate environment
python3 -m venv google_home_env
source google_home_env/bin/activate

# Install requirements
pip install google-assistant-sdk[samples] google-auth-oauthlib[tool] tenacity

4. Authorize and Generate Credentials

Run the following command in your terminal to authorize the SDK:

google-oauthlib-tool --client-secrets /path/to/your/client_secret.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save
  • This will open a browser window. Log in and grant permissions.
  • It will save a credentials.json file to ~/.config/google-oauthlib-tool/credentials.json.

5. Final Configuration

Ensure the google_home_env is accessible to Clawdbot. When Clawdbot runs the skill, it will look for your credentials in the standard ~/.config path automatically.


🚀 Usage

Simply tell the agent what to do:

  • "Turn off the office lights."
  • "Set the TV volume to 20."

The agent will use the control.py script inside this skill to execute the command via Google Assistant.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

automationapismart-home

同类 Skill