Control SwitchBot smart home devices (curtains, plugs, lights, locks, etc.) via SwitchBot Cloud API. Use when user asks to open/close curtains, turn on/off lights/plugs, check temperature/humidity, or control any SwitchBot device.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install switchbot或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install switchbot⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/switchbot/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: switchbot description: Control SwitchBot smart home devices (curtains, plugs, lights, locks, etc.) via SwitchBot Cloud API. Use when user asks to open/close curtains, turn on/off lights/plugs, check temperature/humidity, or control any SwitchBot device. ---
Control SwitchBot devices through the Cloud API v1.1.
Guide your human through these steps:
Ask your human to:
mkdir -p ~/.config/switchbot
chmod 700 ~/.config/switchbot
cat > ~/.config/switchbot/credentials.json << 'EOF'
{
"token": "YOUR_TOKEN_HERE",
"secret": "YOUR_SECRET_HERE"
}
EOF
chmod 600 ~/.config/switchbot/credentials.json
Run the discovery script to find all devices:
python3 <skill_path>/scripts/switchbot.py list
After discovery, note your device IDs in TOOLS.md for quick reference:
## SwitchBot Devices
| Device | ID | Type |
|--------|-----|------|
| Living Room Curtain | ABC123 | Curtain3 |
| Bedroom Light | DEF456 | Plug Mini |
python3 <skill_path>/scripts/switchbot.py list
# Open curtain (position 0 = fully open)
python3 <skill_path>/scripts/switchbot.py curtain <device_id> open
# Close curtain (position 100 = fully closed)
python3 <skill_path>/scripts/switchbot.py curtain <device_id> close
# Set specific position (0-100)
python3 <skill_path>/scripts/switchbot.py curtain <device_id> 50
python3 <skill_path>/scripts/switchbot.py plug <device_id> on
python3 <skill_path>/scripts/switchbot.py plug <device_id> off
python3 <skill_path>/scripts/switchbot.py status <device_id>
python3 <skill_path>/scripts/switchbot.py command <device_id> <command> [parameter]
| Device Type | Commands | |-------------|----------| | Curtain / Curtain3 | open, close, setPosition | | Plug Mini / Plug | turnOn, turnOff, toggle | | Bot | press, turnOn, turnOff | | Light / Strip Light | turnOn, turnOff, setBrightness, setColor | | Lock | lock, unlock | | Humidifier | turnOn, turnOff, setMode | | Meter / MeterPlus | (read-only: temperature, humidity) | | Hub / Hub Mini / Hub 2 | (gateway only) |
| Status Code | Meaning | |-------------|---------| | 100 | Success | | 151 | Device offline | | 152 | Command not supported | | 160 | Unknown command | | 161 | Invalid parameters | | 190 | Internal error |
status command before reporting sensor readings安装 SwitchBot Smart Home Control 后,可以对 AI 说这些话来触发它
Help me get started with SwitchBot Smart Home Control
Explains what SwitchBot Smart Home Control does, walks through the setup, and runs a quick demo based on your current project
Use SwitchBot Smart Home Control to control SwitchBot smart home devices (curtains, plugs, lights, lock...
Invokes SwitchBot Smart Home Control with the right parameters and returns the result directly in the conversation
What can I do with SwitchBot Smart Home Control in my developer & devops workflow?
Lists the top use cases for SwitchBot Smart Home Control, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/switchbot/ 目录(个人级,所有项目可用),或 .claude/skills/switchbot/(项目级)。重启 AI 客户端后,用 /switchbot 主动调用,或让 AI 根据上下文自动发现并使用。
SwitchBot Smart Home Control 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
SwitchBot Smart Home Control 可免费安装使用。请查阅仓库了解许可证信息。
Control SwitchBot smart home devices (curtains, plugs, lights, locks, etc.) via SwitchBot Cloud API. Use when user asks to open/close curtains, turn on/off lights/plugs, check temperature/humidity, or control any SwitchBot device.
Automate my developer & devops tasks using SwitchBot Smart Home Control
Identifies repetitive steps in your workflow and sets up SwitchBot Smart Home Control to handle them automatically
SwitchBot Smart Home Control 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。