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?
Seamlessly control and query your SwitchBot smart home devices directly from OpenClaw with our official OpenAPI integration. Automate your home with ease.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/switchbot-dev/switchbot-cloudapiWhat This Skill Does
The switchbot-openapi skill provides a seamless interface for your OpenClaw agent to interact with the SwitchBot cloud ecosystem. By leveraging the official OpenAPI v1.1, this skill allows the agent to discover, query, and manipulate your smart home devices directly. It handles the complex authentication requirements, specifically the HMAC-SHA256 signature generation required by the SwitchBot API, allowing you to focus on automation rather than boilerplate code. Whether you need to toggle lights, adjust climate settings, control curtains, or trigger advanced home scenes, this skill acts as a bridge between natural language commands and the SwitchBot cloud infrastructure.
Installation
To integrate this capability, run the following command in your terminal:
clawhub install openclaw/skills/skills/switchbot-dev/switchbot-cloudapi
Once installed, you must configure your environment variables to authorize the connection. Navigate to your OpenClaw Gateway configuration and provide your SWITCHBOT_TOKEN and SWITCHBOT_SECRET, which can be generated from the SwitchBot app developer portal. Optionally, set SWITCHBOT_REGION to match your local data center for optimal performance.
Use Cases
This skill is perfect for home automation enthusiasts and developers seeking to integrate IoT control into their AI workflows. Common use cases include:
- Smart Home Orchestration: Creating complex automation scripts where device states trigger specific agent responses.
- Status Monitoring: Automatically checking if doors are locked or if appliances are left running.
- Energy Management: Adjusting thermostat settings or curtain positions based on time of day or ambient light conditions via the API.
- Scene Automation: Using the Scenes API to execute multi-device macros that go beyond individual component control.
Example Prompts
- "List all my SwitchBot devices and tell me the current status of the living room curtain."
- "Turn on the desk lamp and set the bedroom thermostat to 22 degrees."
- "Run the 'Leaving Home' scene to ensure all locks are secured and devices are powered off."
Tips & Limitations
Note that not all SwitchBot models support direct control via the OpenAPI; specifically, some newer robot vacuums and niche sensors require you to define a 'Scene' within the official SwitchBot mobile app first. If you encounter a statusCode 160 or 'unknown command' error, fallback to triggering a pre-configured scene using the scenes/execute endpoint. Always verify your SWITCHBOT_SECRET if the agent receives unauthorized errors, as the HMAC signing process is sensitive to timestamp desyncs between your server and the SwitchBot API servers.
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-switchbot-dev-switchbot-cloudapi": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api