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.
- Create a new project (e.g., "My Smart Home").
- Enable the Google Assistant API.
2. Configure OAuth
- 1. Go to APIs & Services > Credentials.
- Configure your OAuth Consent Screen (set User Type to "External" and add yourself as a test user).
- Create an OAuth 2.0 Client ID with the type Desktop app.
- 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:
CODEBLOCK0
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.
Google Home 控制 (N.O.V.A.)
创建者:Mathew Pittard (Mat)
作品集:mathewpittard.vercel.app
此技能允许 Clawdbot 通过基于 Python 的桥接器直接使用 Google Assistant SDK 控制您的智能家居设备(灯光、电视、家电)。
🛠️ 分步设置
要使此技能正常工作,您需要将其关联到您自己的 Google 账户。请按照以下步骤操作:
1. 创建 Google Cloud 项目
- 1. 访问 Google Cloud 控制台。
- 创建一个新项目(例如:我的智能家居)。
- 启用 Google Assistant API。
2. 配置 OAuth
- 1. 进入 API 和服务 > 凭据。
- 配置您的 OAuth 同意屏幕(将用户类型设置为外部,并将您自己添加为测试用户)。
- 创建一个类型为 桌面应用 的 OAuth 2.0 客户端 ID。
- 下载 JSON 文件并将其重命名为 client_secret.json。
3. 准备 Python 环境
此技能需要一个具有特定依赖项的 Python 虚拟环境:
bash
创建并激活环境
python3 -m venv google
homeenv
source google
homeenv/bin/activate
安装所需依赖
pip install google-assistant-sdk[samples] google-auth-oauthlib[tool] tenacity
4. 授权并生成凭据
在终端中运行以下命令以授权 SDK:
bash
google-oauthlib-tool --client-secrets /path/to/your/client_secret.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save
- * 这将打开一个浏览器窗口。登录并授予权限。
- 它将在 ~/.config/google-oauthlib-tool/credentials.json 保存一个 credentials.json 文件。
5. 最终配置
确保 Clawdbot 可以访问 google
homeenv。当 Clawdbot 运行此技能时,它将自动在标准的 ~/.config 路径中查找您的凭据。
🚀 使用方法
只需告诉代理要做什么:
代理将使用此技能中的 control.py 脚本通过 Google Assistant 执行命令。