# Send SwitchBot Smart Home Control to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "switchbot",
    "name": "SwitchBot Smart Home Control",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/dAAAb/switchbot",
    "canonicalUrl": "https://clawhub.ai/dAAAb/switchbot",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/switchbot",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=switchbot",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/switchbot.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "switchbot",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-09T15:06:52.481Z",
      "expiresAt": "2026-05-16T15:06:52.481Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=switchbot",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=switchbot",
        "contentDisposition": "attachment; filename=\"switchbot-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "switchbot"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/switchbot"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/switchbot",
    "downloadUrl": "https://openagent3.xyz/downloads/switchbot",
    "agentUrl": "https://openagent3.xyz/skills/switchbot/agent",
    "manifestUrl": "https://openagent3.xyz/skills/switchbot/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/switchbot/agent.md"
  }
}
```
## Documentation

### SwitchBot Smart Home Control

Control SwitchBot devices through the Cloud API v1.1.

### First-Time Setup

Guide your human through these steps:

### 1. Get API Credentials

Ask your human to:

Open SwitchBot App on their phone
Go to Profile (bottom right)
Tap Preferences (or Settings)
Find About → Developer Options
Copy Token and Secret Key

### 2. Store Credentials Securely

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

### 3. Discover Devices

Run the discovery script to find all devices:

python3 <skill_path>/scripts/switchbot.py list

### 4. Update Your TOOLS.md

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 |

### List All Devices

python3 <skill_path>/scripts/switchbot.py list

### Curtain Control

# 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

### Plug/Light Control

python3 <skill_path>/scripts/switchbot.py plug <device_id> on
python3 <skill_path>/scripts/switchbot.py plug <device_id> off

### Check Sensor Status

python3 <skill_path>/scripts/switchbot.py status <device_id>

### Generic Command

python3 <skill_path>/scripts/switchbot.py command <device_id> <command> [parameter]

### Supported Devices

Device TypeCommandsCurtain / Curtain3open, close, setPositionPlug Mini / PlugturnOn, turnOff, toggleBotpress, turnOn, turnOffLight / Strip LightturnOn, turnOff, setBrightness, setColorLocklock, unlockHumidifierturnOn, turnOff, setModeMeter / MeterPlus(read-only: temperature, humidity)Hub / Hub Mini / Hub 2(gateway only)

### Error Handling

Status CodeMeaning100Success151Device offline152Command not supported160Unknown command161Invalid parameters190Internal error

### Tips for Agents

First interaction: If no credentials exist, guide the human through setup
Device aliases: Create friendly names in TOOLS.md (e.g., "living room" → device ID)
Batch operations: Multiple devices can be controlled in sequence
Status checks: Use status command before reporting sensor readings
Error recovery: If device is offline (151), suggest checking Hub connection

### Security Notes

Credentials file should be chmod 600
Never log or display the token/secret
API calls are made over HTTPS to api.switch-bot.com
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: dAAAb
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-09T15:06:52.481Z
- Expires at: 2026-05-16T15:06:52.481Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/switchbot)
- [Send to Agent page](https://openagent3.xyz/skills/switchbot/agent)
- [JSON manifest](https://openagent3.xyz/skills/switchbot/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/switchbot/agent.md)
- [Download page](https://openagent3.xyz/downloads/switchbot)