smartthings

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

SmartThings Skill

SmartThings Skill

Overview

概述

Enables Claude to interact with Samsung SmartThings for controlling connected devices, creating automations, managing scenes, and integrating various smart home protocols.
让Claude能够与Samsung SmartThings交互,实现控制联网设备、创建自动化任务、管理场景以及集成各类智能家居协议的功能。

Quick Install

快速安装

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

Setup

配置

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

First, ensure canifi-env is installed:

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

canifi-env set SAMSUNG_EMAIL "your-email@example.com"
undefined
canifi-env set SAMSUNG_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 Z-Wave and Zigbee devices
  • Create automations and scenes
  • Monitor device status
  • Manage SmartThings hub
  • Integrate third-party devices
  • 控制Z-Wave和Zigbee设备
  • 创建自动化任务和场景
  • 监控设备状态
  • 管理SmartThings中枢
  • 集成第三方设备

Usage Examples

使用示例

Example 1: Device Control

示例1:设备控制

User: "Turn on the garage door sensor through SmartThings"
Claude: I'll check the status and control the garage door via SmartThings.
用户:"通过SmartThings打开车库门传感器"
Claude:我将检查状态并通过SmartThings控制车库门。

Example 2: Create Automation

示例2:创建自动化任务

User: "Create an automation to notify me when motion is detected at night"
Claude: I'll create a SmartThings automation for nighttime motion alerts.
用户:"创建一个自动化任务,在夜间检测到运动时通知我"
Claude:我将为你创建一个SmartThings自动化任务,实现夜间运动提醒功能。

Example 3: Scene Management

示例3:场景管理

User: "Run my Away scene in SmartThings"
Claude: I'll activate your Away scene to set all devices appropriately.
用户:"在SmartThings中运行我的离家场景"
Claude:我将激活你的离家场景,对所有设备进行相应设置。

Authentication Flow

认证流程

  1. Navigate to my.smartthings.com via Playwright MCP
  2. Click "Sign In" button
  3. Enter Samsung account credentials
  4. Handle 2FA if enabled
  5. Maintain session for subsequent requests
  1. 通过Playwright MCP导航至my.smartthings.com
  2. 点击“登录”按钮
  3. 输入三星账户凭证
  4. 若启用了双因素认证则完成验证
  5. 保持会话以用于后续请求

Error Handling

错误处理

  • Login Failed: Retry authentication up to 3 times, then notify via iMessage
  • Session Expired: Re-authenticate with Samsung
  • 2FA Required: Wait for code via email
  • Rate Limited: Implement exponential backoff
  • Hub Offline: Report hub connectivity status
  • 登录失败:最多重试3次认证,随后通过iMessage通知用户
  • 会话过期:重新通过三星进行认证
  • 需双因素认证:等待邮件发送验证码
  • 请求受限:实现指数退避策略
  • 中枢离线:报告中枢的连接状态

Self-Improvement Instructions

自我改进说明

When encountering new UI patterns:
  1. Document SmartThings interface changes
  2. Update selectors for new layouts
  3. Track new device integrations
  4. Monitor automation feature updates
遇到新的UI模式时:
  1. 记录SmartThings界面的变化
  2. 更新针对新布局的选择器
  3. 追踪新的设备集成
  4. 监控自动化功能的更新

Notes

注意事项

  • Supports Z-Wave, Zigbee, WiFi, Matter
  • Samsung device deep integration
  • Third-party device compatibility
  • Requires SmartThings Hub for some devices
  • 支持Z-Wave、Zigbee、WiFi、Matter协议
  • 深度集成三星设备
  • 兼容第三方设备
  • 部分设备需要SmartThings中枢支持