360 Secure SkillHub
360 安全技能中心

Google Home Control

该 Skill 通过 Python 桥接 Google Assistant SDK,让用户用自然语言指令控制智能家居设备(灯光、电视等)。使用前需配置 Google Cloud 项目、OAuth 凭据并安装 Python 依赖,运行 control.py 执行命令。

tvdofficial
tvdofficial
热度 73.37
最近更新 2026-05-11 15:51:31
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 工作流 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add google-home-control
Metadata
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.