home / skills / openclaw / skills / google-home-control

google-home-control skill

/skills/tvdofficial/google-home-control

This skill lets you control smart home devices via Google Assistant, enabling hands-free automation from your preferred AI agent.

npx playbooks add skill openclaw/skills --skill google-home-control

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
2.3 KB
---
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](https://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](https://console.developers.google.com/).
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:
```bash
# 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:
```bash
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.

Overview

This skill connects Clawdbot to your Google Assistant account so it can control smart home devices (lights, TV, appliances) through a Python bridge. It requires a Google Cloud project, OAuth credentials, and a local Python environment to run the assistant SDK. Once configured, Clawdbot sends commands to the included control script which triggers actions via your Google account.

How this skill works

The skill uses the Google Assistant SDK and a local Python script to relay spoken or typed commands to devices linked to your Google account. You create a Google Cloud project, generate OAuth client credentials, authorize the SDK locally, and place the resulting credentials where the skill expects them. When invoked, the skill runs control.py inside the prepared virtual environment and issues the requested home-automation command through Google Assistant.

When to use it

  • You want Clawdbot to control lights, TV, or other Google Home-linked devices.
  • You need a local, account-specific bridge without relying on third-party cloud integrations.
  • You already have or are comfortable creating a Google Cloud project and OAuth credentials.
  • You want voice or text-triggered automation routed through your Google account.

Best practices

  • Use a dedicated Google Cloud project and OAuth client for this skill to keep credentials isolated.
  • Run the skill inside a Python virtual environment and pin dependency versions to avoid conflicts.
  • Keep client_secret.json and credentials.json secure and never share them publicly.
  • Test commands manually after authorization to confirm device names and behaviors.
  • Ensure the virtual environment path and ~/.config credential path are accessible to Clawdbot.

Example use cases

  • Turn office or room lights on/off with a simple voice command routed through Clawdbot.
  • Adjust TV volume or switch inputs using natural language sent to Google Assistant.
  • Trigger routines or automation scenes defined in your Google Home account.
  • Control smart plugs or appliances that are linked to Google Assistant.

FAQ

Do I need my own Google account and cloud project?

Yes. You must create a Google Cloud project, enable the Assistant API, and authorize OAuth with your account so the skill can control devices linked to that account.

Where are credentials stored?

After authorizing with the google-oauthlib-tool, credentials are saved to ~/.config/google-oauthlib-tool/credentials.json, which the skill reads at runtime.