Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.
Coding
Switchbot
Try itControl SwitchBot smart home devices (curtains, plugs, lights, locks, etc.) via SwitchBot Cloud API. Use when user asks to open/close curtains, turn on/off l...
What it does
Control SwitchBot devices through the Cloud API v1.1.
The skill document
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 /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 |
Usage
List All Devices
python3 /scripts/switchbot.py list
Curtain Control
# Open curtain (position 0 = fully open)
python3 /scripts/switchbot.py curtain open
# Close curtain (position 100 = fully closed)
python3 /scripts/switchbot.py curtain close
# Set specific position (0-100)
python3 /scripts/switchbot.py curtain 50
Plug/Light Control
python3 /scripts/switchbot.py plug on
python3 /scripts/switchbot.py plug off
Check Sensor Status
python3 /scripts/switchbot.py status
Generic Command
python3 /scripts/switchbot.py command [parameter]
Supported Devices
| 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) |
Error Handling
| Status Code | Meaning |
|---|---|
| 100 | Success |
| 151 | Device offline |
| 152 | Command not supported |
| 160 | Unknown command |
| 161 | Invalid parameters |
| 190 | Internal 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
statuscommand 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
Related skills
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.
Save, search, and manage personal notes and knowledge bases in Get笔记 on explicit request.
More from daaab
Browse all skillsGive your AI agent a verifiable email address tied to its Base Chain wallet.
NadMail - Email for AI Agents on Monad. Register yourname@nadmail.ai, send emails that micro-invest in meme coins, boost with emo-buy. SIWE auth, no CAPTCHA,...
🔗 WalletConnect Agent - dApp Access for AI. Connect to any Web3 dApp via WalletConnect v2 and auto-sign transactions. Swap tokens, mint NFTs, vote in DAOs,...
🔐 Base Wallet - Crypto Identity for AI Agents. Create wallets, sign messages (SIWE), send transactions programmatically. No browser extensions, no human int...
Build AI phone call reminders with ElevenLabs Conversational AI + Twilio. Free starter guide.
🏷️ Basename Agent - Onchain Identity + Æmail for AI. Register yourname.base.eth and get yourname@basemail.ai — via Donate Buy (recommended), free auto-regis...