google-home

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Google Home Skill

Google Home Skill

Overview

概述

Enables Claude to interact with Google Home for controlling smart home devices, creating automations, managing household members, and configuring Google Assistant settings.
让Claude能够与Google Home交互,实现智能家居设备控制、自动化创建、家庭成员管理以及Google Assistant设置配置。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/google-home/install.sh | bash
Or manually:
bash
cp -r skills/google-home ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/google-home/install.sh | bash
或者手动安装:
bash
cp -r skills/google-home ~/.canifi/skills/

Setup

设置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set GOOGLE_EMAIL "your-email@example.com"
undefined
canifi-env set GOOGLE_EMAIL "your-email@example.com"
undefined

Privacy & Authentication

隐私与认证

Your credentials, your choice. Canifi LifeOS respects your privacy.
您的凭据,由您掌控。 Canifi LifeOS尊重您的隐私。

Option 1: Manual Browser Login (Recommended)

选项1:手动浏览器登录(推荐)

If you prefer not to share credentials with Claude Code:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果您不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化设置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. Claude将使用您的已认证会话,全程不会获取您的密码

Option 2: Environment Variables

选项2:环境变量

If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果您愿意共享凭据,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅能在您的本地设备上访问,绝不会被传输。

Capabilities

功能

  • Control smart home devices
  • Create and manage automations
  • Manage household and members
  • View device activity
  • Configure Assistant preferences
  • 控制智能家居设备
  • 创建并管理自动化流程
  • 管理家庭及家庭成员
  • 查看设备活动记录
  • 配置Assistant偏好设置

Usage Examples

使用示例

Example 1: Device Control

示例1:设备控制

User: "Dim the living room lights to 50% through Google Home"
Claude: I'll adjust the living room lights to 50% brightness via Google Home.
用户:“通过Google Home将客厅灯光调暗至50%”
Claude:我将通过Google Home把客厅灯光亮度调整至50%。

Example 2: Create Automation

示例2:创建自动化流程

User: "Create an automation that turns on porch light at sunset"
Claude: I'll create a new automation triggered by sunset for the porch light.
用户:“创建一个在日落时打开门廊灯的自动化流程”
Claude:我将创建一个由日落触发的门廊灯自动化流程。

Example 3: Check Devices

示例3:查看设备列表

User: "What devices are connected to my Google Home?"
Claude: I'll list all devices connected to your Google Home ecosystem.
用户:“我的Google Home连接了哪些设备?”
Claude:我将列出Google Home生态系统中连接的所有设备。

Authentication Flow

认证流程

  1. Navigate to home.google.com via Playwright MCP
  2. Click "Sign In" button
  3. Enter Google credentials
  4. Handle 2FA if enabled
  5. Maintain session for subsequent requests
  1. 通过Playwright MCP导航至home.google.com
  2. 点击“登录”按钮
  3. 输入Google凭据
  4. 若启用了双因素认证则进行处理
  5. 维持会话以用于后续请求

Error Handling

错误处理

  • Login Failed: Retry authentication up to 3 times, then notify via iMessage
  • Session Expired: Re-authenticate with Google
  • 2FA Required: Wait for code via authenticator
  • Rate Limited: Implement exponential backoff
  • Device Offline: Report device connectivity
  • 登录失败:最多重试3次认证,随后通过iMessage通知用户
  • 会话过期:重新通过Google认证
  • 需要双因素认证:等待验证码(通过认证器获取)
  • 速率限制:实现指数退避策略
  • 设备离线:报告设备连接状态

Self-Improvement Instructions

自我改进说明

When encountering new UI patterns:
  1. Document Google Home app changes
  2. Update selectors for new layouts
  3. Track Matter device support
  4. Monitor automation features
当遇到新的UI模式时:
  1. 记录Google Home应用的变更
  2. 更新针对新布局的选择器
  3. 跟踪Matter设备支持情况
  4. 监控自动化功能更新

Notes

注意事项

  • Works with Google Assistant
  • Matter/Thread device support
  • Family sharing available
  • Integrates with Nest devices
  • 与Google Assistant兼容
  • 支持Matter/Thread设备
  • 支持家庭共享功能
  • 可与Nest设备集成