smartthings
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSmartThings 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 | bashOr 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
undefinedFirst, ensure canifi-env is installed:
首先,确保canifi-env已安装:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set SAMSUNG_EMAIL "your-email@example.com"
undefinedcanifi-env set SAMSUNG_EMAIL "your-email@example.com"
undefinedPrivacy & 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:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭证:
- 使用CDP模式完成浏览器自动化设置
- 在Playwright控制的Chrome窗口中手动登录该服务
- 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
认证流程
- Navigate to my.smartthings.com via Playwright MCP
- Click "Sign In" button
- Enter Samsung account credentials
- Handle 2FA if enabled
- Maintain session for subsequent requests
- 通过Playwright MCP导航至my.smartthings.com
- 点击“登录”按钮
- 输入三星账户凭证
- 若启用了双因素认证则完成验证
- 保持会话以用于后续请求
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:
- Document SmartThings interface changes
- Update selectors for new layouts
- Track new device integrations
- Monitor automation feature updates
遇到新的UI模式时:
- 记录SmartThings界面的变化
- 更新针对新布局的选择器
- 追踪新的设备集成
- 监控自动化功能的更新
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中枢支持