Control and query SwitchBot devices using the official OpenAPI (v1.1). Use when the user asks to list SwitchBot devices, get device status, send commands, or...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install switchbot-cloudapi或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install switchbot-cloudapi⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/switchbot-cloudapi/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: switchbot-openapi description: Control and query SwitchBot devices using the official OpenAPI (v1.1). Use when the user asks to list SwitchBot devices, get device status, or send commands (turn on/off, press, set mode, lock/unlock, curtain open %, IR air conditioner, lights, fans, robot vacuums, keypads, etc.). Requires SWITCHBOT_TOKEN and SWITCHBOT_SECRET. ---
This skill equips the agent to operate SwitchBot devices via HTTPS requests to the official OpenAPI v1.1. It includes ready-to-run scripts and a Node CLI; use these instead of re-deriving the HMAC signature each time.
1) Set environment variables:
2) Test (list devices):
scripts/list_devices.shnode scripts/switchbot_cli.js list3) Common tasks:
Basic controls:
node scripts/switchbot_cli.js listnode scripts/switchbot_cli.js status node scripts/switchbot_cli.js cmd turnOn / turnOffnode scripts/switchbot_cli.js cmd toggle node scripts/switchbot_cli.js cmd press Curtain / Curtain 3:
node scripts/switchbot_cli.js cmd setPosition --pos=50 (0=open, 100=closed; CLI auto-formats to 0,ff,50)
node scripts/switchbot_cli.js cmd pause Lock / Lock Pro / Lock Ultra / Lock Lite:
node scripts/switchbot_cli.js cmd lock / unlocknode scripts/switchbot_cli.js cmd deadbolt Lights (Color Bulb / Strip Light / Floor Lamp / Strip Light 3 / RGBICWW etc.):
node scripts/switchbot_cli.js cmd setColor --param="255:100:0" node scripts/switchbot_cli.js cmd setBrightness --param=80 node scripts/switchbot_cli.js cmd setColorTemperature --param=4000 Fans (Battery Circulator Fan / Circulator Fan / Standing Circulator Fan):
node scripts/switchbot_cli.js cmd setWindMode --param=natural node scripts/switchbot_cli.js cmd setWindSpeed --param=50 node scripts/switchbot_cli.js cmd setNightLightMode --param=1 node scripts/switchbot_cli.js cmd closeDelay --param=3600 Robot Vacuum S1/S1 Plus/K10+/K10+ Pro:
node scripts/switchbot_cli.js cmd start node scripts/switchbot_cli.js cmd stop node scripts/switchbot_cli.js cmd dock node scripts/switchbot_cli.js cmd PowLevel --param=2 Robot Vacuum K10+ Pro Combo / K20+ Pro / S10 / S20 / K11+:
node scripts/switchbot_cli.js cmd startClean --param='{"action":"sweep_mop","param":{"fanLevel":2,"waterLevel":1,"times":1}}' node scripts/switchbot_cli.js cmd pause / docknode scripts/switchbot_cli.js cmd setVolume --param=50 node scripts/switchbot_cli.js cmd selfClean --param=1 Blind Tilt:
node scripts/switchbot_cli.js cmd setPosition --param="up;60" node scripts/switchbot_cli.js cmd fullyOpen node scripts/switchbot_cli.js cmd closeUp / closeDownRoller Shade:
node scripts/switchbot_cli.js cmd setPosition --param=50 Humidifier (original):
node scripts/switchbot_cli.js cmd setMode --param=auto Evaporative Humidifier / Auto-refill:
node scripts/switchbot_cli.js cmd setMode --param='{"mode":7,"targetHumidify":60}' node scripts/switchbot_cli.js cmd setChildLock --param=true Air Purifier (VOC/PM2.5/Table):
node scripts/switchbot_cli.js cmd setMode --param='{"mode":2,"fanGear":2}' node scripts/switchbot_cli.js cmd setChildLock --param=1 Smart Radiator Thermostat:
node scripts/switchbot_cli.js cmd setMode --param=1 node scripts/switchbot_cli.js cmd setManualModeTemperature --param=22 Relay Switch 1PM / 1 / 2PM:
node scripts/switchbot_cli.js cmd toggle node scripts/switchbot_cli.js cmd setMode --param=0 node scripts/switchbot_cli.js cmd turnOn --param="1" (channel 1 or 2)Garage Door Opener:
node scripts/switchbot_cli.js cmd turnOn / turnOffVideo Doorbell:
node scripts/switchbot_cli.js cmd enableMotionDetection / disableMotionDetectionCandle Warmer Lamp:
node scripts/switchbot_cli.js cmd setBrightness --param=50 AI Art Frame:
node scripts/switchbot_cli.js cmd next / previousKeypad / Keypad Touch / Keypad Vision / Keypad Vision Pro:
node scripts/switchbot_cli.js cmd createKey --param='{"name":"Guest","type":"permanent","password":"12345678"}' node scripts/switchbot_cli.js cmd deleteKey --param='{"id":"11"}' IR Remote - Air Conditioner:
node scripts/switchbot_cli.js cmd setAll --param="26,2,1,on" (format: temperature, mode, fan speed, power state) - mode: 0/1=auto, 2=cool, 3=dry, 4=fan, 5=heat - fan: 1=auto, 2=low, 3=medium, 4=high - power: on/off
IR Remote - TV:
node scripts/switchbot_cli.js cmd SetChannel --param=5 node scripts/switchbot_cli.js cmd volumeAdd / volumeSubIR Remote - Others (DIY):
node scripts/switchbot_cli.js cmd --commandType=customize Scenes (fallback):
node scripts/switchbot_cli.js scenesnode scripts/switchbot_cli.js scene Base URL: https://api.switch-bot.com Path prefix: /v1.1 Daily limit: 10,000 API calls
Headers (all required):
token + t + nonce, secret), Base64-encodedKey endpoints:
GET /v1.1/devices — list all devicesGET /v1.1/devices/{deviceId}/status — device statusPOST /v1.1/devices/{deviceId}/commands — send commandGET /v1.1/scenes — list scenesPOST /v1.1/scenes/{sceneId}/execute — execute sceneCommand body format:
{
"command": "<commandName>",
"parameter": "<string|object>",
"commandType": "command"
}
For IR "Others" (DIY) devices, use "commandType": "customize".
setAll is supported (not separate setMode/setTemp).scripts/switchbot_cli.js — Node CLI (list/status/cmd/scenes)scripts/list_devices.sh — curl: list devicesscripts/get_status.sh — curl: get statusscripts/send_command.sh — curl: send commandscripts/list_scenes.sh — curl: list scenesscripts/execute_scene.sh — curl: execute scenereferences/commands.md — complete command reference per device typereferences/examples.md — usage examples安装 SwitchBot OpenAPI 后,可以对 AI 说这些话来触发它
Help me get started with SwitchBot OpenAPI
Explains what SwitchBot OpenAPI does, walks through the setup, and runs a quick demo based on your current project
Use SwitchBot OpenAPI to control and query SwitchBot devices using the official OpenAPI (v1
Invokes SwitchBot OpenAPI with the right parameters and returns the result directly in the conversation
What can I do with SwitchBot OpenAPI in my developer & devops workflow?
Lists the top use cases for SwitchBot OpenAPI, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/switchbot-cloudapi/ 目录(个人级,所有项目可用),或 .claude/skills/switchbot-cloudapi/(项目级)。重启 AI 客户端后,用 /switchbot-cloudapi 主动调用,或让 AI 根据上下文自动发现并使用。
SwitchBot OpenAPI 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
SwitchBot OpenAPI 可免费安装使用。请查阅仓库了解许可证信息。
Control and query SwitchBot devices using the official OpenAPI (v1.1). Use when the user asks to list SwitchBot devices, get device status, send commands, or...
SwitchBot OpenAPI 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using SwitchBot OpenAPI
Identifies repetitive steps in your workflow and sets up SwitchBot OpenAPI to handle them automatically