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, or send commands (turn on/off, press, set mode, lock/unlock, set temperature, curtain open %, etc.). Requires SWITCHBOT_TOKEN and SWITCHBOT_SECRET.
Why use this skill?
Control your SwitchBot smart devices automatically with OpenClaw. This skill handles authentication, status queries, and command execution for a seamless smart home experience.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/woan1105/switchbot-openapiWhat This Skill Does
The switchbot-openapi skill integrates the official SwitchBot OpenAPI (v1.1) directly into your OpenClaw agent. It allows the agent to communicate with your smart home ecosystem by performing authenticated HTTPS requests. Instead of manually using the app, you can command your agent to list devices, poll status, and trigger actions for a variety of hardware, including Bots, Curtains, Locks, and smart climate controls. It provides a robust, pre-configured framework for handling the complex HMAC-SHA256 authentication required by the SwitchBot cloud, ensuring that signatures, timestamps, and nonces are generated correctly without requiring user intervention.
Installation
To integrate this skill, run the installation command within your OpenClaw environment: clawhub install openclaw/skills/skills/woan1105/switchbot-openapi. After installation, ensure you set your environment variables via the OpenClaw Gateway or container configuration. You will need your SWITCHBOT_TOKEN and SWITCHBOT_SECRET from the SwitchBot Developer Portal. Optionally, define SWITCHBOT_REGION if your account is localized to specific regions (defaults to global).
Use Cases
- Home Automation: Automatically opening or closing curtains based on the time of day or light levels.
- Security Management: Querying the status of smart locks to ensure doors are secured at night.
- Climate Control: Adjusting room temperature via linked devices when internal sensors report specific data.
- Voice-Assisted Device Control: Simplifying the control of simple "press" devices like coffee makers or lights by using natural language commands.
- Scene Orchestration: Triggering complex sequences of events (scenes) configured in the SwitchBot app that are not directly supported by the standard device API.
Example Prompts
- "List all my SwitchBot devices and tell me the current battery percentage of the lock."
- "Close the bedroom curtains to 50% and turn on the desk light."
- "My vacuum is reporting an unknown command error; please find the 'Clean Up' scene and execute it instead."
Tips & Limitations
Always check the references/commands.md file included with the skill for specific parameter formatting. Be aware that some newer device lines, such as specific robot vacuums, may have limited OpenAPI v1.1 exposure. If a command fails with a 160 status code, pivot to the Scenes API by creating a dedicated scene in your SwitchBot mobile app and triggering that via the agent instead.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-woan1105-switchbot-openapi": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api