{
  "schemaVersion": "1.0",
  "item": {
    "slug": "switchbot-cloudapi",
    "name": "SwitchBot OpenAPI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/switchbot-dev/switchbot-cloudapi",
    "canonicalUrl": "https://clawhub.ai/switchbot-dev/switchbot-cloudapi",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/switchbot-cloudapi",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=switchbot-cloudapi",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README-CLAWHUB.md",
      "SKILL.md",
      "_meta.json",
      "scripts/execute_scene.sh",
      "scripts/get_status.sh",
      "scripts/list_devices.sh"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "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."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "slug": "switchbot-cloudapi",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-09T15:05:42.006Z",
      "expiresAt": "2026-05-16T15:05:42.006Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=switchbot-cloudapi",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=switchbot-cloudapi",
        "contentDisposition": "attachment; filename=\"switchbot-cloudapi-1.0.4.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "switchbot-cloudapi"
      },
      "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-cloudapi"
    },
    "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."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/switchbot-cloudapi",
    "agentPageUrl": "https://openagent3.xyz/skills/switchbot-cloudapi/agent",
    "manifestUrl": "https://openagent3.xyz/skills/switchbot-cloudapi/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/switchbot-cloudapi/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "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."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "SwitchBot OpenAPI Skill",
        "body": "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."
      },
      {
        "title": "Quick Start (Operator)",
        "body": "Set environment variables:\n\nSWITCHBOT_TOKEN: your OpenAPI token\nSWITCHBOT_SECRET: your OpenAPI secret\n\nTest (list devices):\n\nBash: scripts/list_devices.sh\nNode: node scripts/switchbot_cli.js list\n\nCommon tasks:\n\nBasic controls:\n\nList devices: node scripts/switchbot_cli.js list\nGet status: node scripts/switchbot_cli.js status <deviceId>\nTurn on/off: node scripts/switchbot_cli.js cmd <deviceId> turnOn / turnOff\nToggle: node scripts/switchbot_cli.js cmd <deviceId> toggle\nPress (Bot): node scripts/switchbot_cli.js cmd <deviceId> press\n\nCurtain / Curtain 3:\n\nSet position: node scripts/switchbot_cli.js cmd <deviceId> setPosition --pos=50\n(0=open, 100=closed; CLI auto-formats to 0,ff,50)\nPause: node scripts/switchbot_cli.js cmd <deviceId> pause\n\nLock / Lock Pro / Lock Ultra / Lock Lite:\n\nLock/Unlock: node scripts/switchbot_cli.js cmd <deviceId> lock / unlock\nDeadbolt: node scripts/switchbot_cli.js cmd <deviceId> deadbolt\n\nLights (Color Bulb / Strip Light / Floor Lamp / Strip Light 3 / RGBICWW etc.):\n\nSet color: node scripts/switchbot_cli.js cmd <deviceId> setColor --param=\"255:100:0\"\nSet brightness: node scripts/switchbot_cli.js cmd <deviceId> setBrightness --param=80\nSet color temp: node scripts/switchbot_cli.js cmd <deviceId> setColorTemperature --param=4000\n\nFans (Battery Circulator Fan / Circulator Fan / Standing Circulator Fan):\n\nWind mode: node scripts/switchbot_cli.js cmd <deviceId> setWindMode --param=natural\nWind speed: node scripts/switchbot_cli.js cmd <deviceId> setWindSpeed --param=50\nNight light: node scripts/switchbot_cli.js cmd <deviceId> setNightLightMode --param=1\nAuto-off timer: node scripts/switchbot_cli.js cmd <deviceId> closeDelay --param=3600\n\nRobot Vacuum S1/S1 Plus/K10+/K10+ Pro:\n\nStart: node scripts/switchbot_cli.js cmd <deviceId> start\nStop: node scripts/switchbot_cli.js cmd <deviceId> stop\nDock: node scripts/switchbot_cli.js cmd <deviceId> dock\nSuction: node scripts/switchbot_cli.js cmd <deviceId> PowLevel --param=2\n\nRobot Vacuum K10+ Pro Combo / K20+ Pro / S10 / S20 / K11+:\n\nStart clean: node scripts/switchbot_cli.js cmd <deviceId> startClean --param='{\"action\":\"sweep_mop\",\"param\":{\"fanLevel\":2,\"waterLevel\":1,\"times\":1}}'\nPause/Dock: node scripts/switchbot_cli.js cmd <deviceId> pause / dock\nVolume: node scripts/switchbot_cli.js cmd <deviceId> setVolume --param=50\nSelf clean (S10/S20): node scripts/switchbot_cli.js cmd <deviceId> selfClean --param=1\n\nBlind Tilt:\n\nSet position: node scripts/switchbot_cli.js cmd <deviceId> setPosition --param=\"up;60\"\nFully open: node scripts/switchbot_cli.js cmd <deviceId> fullyOpen\nClose: node scripts/switchbot_cli.js cmd <deviceId> closeUp / closeDown\n\nRoller Shade:\n\nSet position: node scripts/switchbot_cli.js cmd <deviceId> setPosition --param=50\n\nHumidifier (original):\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param=auto\n\nEvaporative Humidifier / Auto-refill:\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param='{\"mode\":7,\"targetHumidify\":60}'\nChild lock: node scripts/switchbot_cli.js cmd <deviceId> setChildLock --param=true\n\nAir Purifier (VOC/PM2.5/Table):\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param='{\"mode\":2,\"fanGear\":2}'\nChild lock: node scripts/switchbot_cli.js cmd <deviceId> setChildLock --param=1\n\nSmart Radiator Thermostat:\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param=1\nSet temp: node scripts/switchbot_cli.js cmd <deviceId> setManualModeTemperature --param=22\n\nRelay Switch 1PM / 1 / 2PM:\n\nToggle: node scripts/switchbot_cli.js cmd <deviceId> toggle\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param=0\n2PM channel: node scripts/switchbot_cli.js cmd <deviceId> turnOn --param=\"1\" (channel 1 or 2)\n\nGarage Door Opener:\n\nOpen/Close: node scripts/switchbot_cli.js cmd <deviceId> turnOn / turnOff\n\nVideo Doorbell:\n\nMotion detection: node scripts/switchbot_cli.js cmd <deviceId> enableMotionDetection / disableMotionDetection\n\nCandle Warmer Lamp:\n\nBrightness: node scripts/switchbot_cli.js cmd <deviceId> setBrightness --param=50\n\nAI Art Frame:\n\nNext/Previous: node scripts/switchbot_cli.js cmd <deviceId> next / previous\n\nKeypad / Keypad Touch / Keypad Vision / Keypad Vision Pro:\n\nCreate passcode: node scripts/switchbot_cli.js cmd <deviceId> createKey --param='{\"name\":\"Guest\",\"type\":\"permanent\",\"password\":\"12345678\"}'\nDelete passcode: node scripts/switchbot_cli.js cmd <deviceId> deleteKey --param='{\"id\":\"11\"}'\n⚠️ Keypad commands are async — results come via webhook.\n\nIR Remote - Air Conditioner:\n\nSet all: node scripts/switchbot_cli.js cmd <deviceId> setAll --param=\"26,2,1,on\"\n(format: temperature, mode, fan speed, power state)\n\nmode: 0/1=auto, 2=cool, 3=dry, 4=fan, 5=heat\nfan: 1=auto, 2=low, 3=medium, 4=high\npower: on/off\n\nIR Remote - TV:\n\nChannel: node scripts/switchbot_cli.js cmd <deviceId> SetChannel --param=5\nVolume: node scripts/switchbot_cli.js cmd <deviceId> volumeAdd / volumeSub\n\nIR Remote - Others (DIY):\n\nCustom button: node scripts/switchbot_cli.js cmd <deviceId> <buttonName> --commandType=customize\n\nScenes (fallback):\n\nList scenes: node scripts/switchbot_cli.js scenes\nExecute scene: node scripts/switchbot_cli.js scene <sceneId>"
      },
      {
        "title": "API Reference",
        "body": "Base URL: https://api.switch-bot.com\nPath prefix: /v1.1\nDaily limit: 10,000 API calls\n\nHeaders (all required):\n\nAuthorization: <SWITCHBOT_TOKEN>\nsign: HMAC-SHA256(token + t + nonce, secret), Base64-encoded\nt: 13-digit millisecond timestamp\nnonce: random UUID\n\nKey endpoints:\n\nGET /v1.1/devices — list all devices\nGET /v1.1/devices/{deviceId}/status — device status\nPOST /v1.1/devices/{deviceId}/commands — send command\nGET /v1.1/scenes — list scenes\nPOST /v1.1/scenes/{sceneId}/execute — execute scene\n\nCommand body format:\n\n{\n  \"command\": \"<commandName>\",\n  \"parameter\": \"<string|object>\",\n  \"commandType\": \"command\"\n}\n\nFor IR \"Others\" (DIY) devices, use \"commandType\": \"customize\"."
      },
      {
        "title": "Agent Guidelines",
        "body": "Always use the provided CLI scripts — they handle HMAC signatures automatically.\nThe CLI runs preflight checks for BLE devices (Bot, Lock, Curtain, Blind Tilt) — requires Hub + Cloud Services enabled.\nFor IR Air Conditioner, only setAll is supported (not separate setMode/setTemp).\nFor Keypad commands (createKey/deleteKey), results are async via webhook.\nIf a command returns statusCode 160, the device may not support that command — use Scenes as fallback.\nNever log tokens/secrets. Ask user to set them as environment variables."
      },
      {
        "title": "Files",
        "body": "scripts/switchbot_cli.js — Node CLI (list/status/cmd/scenes)\nscripts/list_devices.sh — curl: list devices\nscripts/get_status.sh — curl: get status\nscripts/send_command.sh — curl: send command\nscripts/list_scenes.sh — curl: list scenes\nscripts/execute_scene.sh — curl: execute scene\nreferences/commands.md — complete command reference per device type\nreferences/examples.md — usage examples"
      }
    ],
    "body": "SwitchBot OpenAPI Skill\n\nThis 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.\n\nQuick Start (Operator)\nSet environment variables:\nSWITCHBOT_TOKEN: your OpenAPI token\nSWITCHBOT_SECRET: your OpenAPI secret\nTest (list devices):\nBash: scripts/list_devices.sh\nNode: node scripts/switchbot_cli.js list\nCommon tasks:\n\nBasic controls:\n\nList devices: node scripts/switchbot_cli.js list\nGet status: node scripts/switchbot_cli.js status <deviceId>\nTurn on/off: node scripts/switchbot_cli.js cmd <deviceId> turnOn / turnOff\nToggle: node scripts/switchbot_cli.js cmd <deviceId> toggle\nPress (Bot): node scripts/switchbot_cli.js cmd <deviceId> press\n\nCurtain / Curtain 3:\n\nSet position: node scripts/switchbot_cli.js cmd <deviceId> setPosition --pos=50 (0=open, 100=closed; CLI auto-formats to 0,ff,50)\nPause: node scripts/switchbot_cli.js cmd <deviceId> pause\n\nLock / Lock Pro / Lock Ultra / Lock Lite:\n\nLock/Unlock: node scripts/switchbot_cli.js cmd <deviceId> lock / unlock\nDeadbolt: node scripts/switchbot_cli.js cmd <deviceId> deadbolt\n\nLights (Color Bulb / Strip Light / Floor Lamp / Strip Light 3 / RGBICWW etc.):\n\nSet color: node scripts/switchbot_cli.js cmd <deviceId> setColor --param=\"255:100:0\"\nSet brightness: node scripts/switchbot_cli.js cmd <deviceId> setBrightness --param=80\nSet color temp: node scripts/switchbot_cli.js cmd <deviceId> setColorTemperature --param=4000\n\nFans (Battery Circulator Fan / Circulator Fan / Standing Circulator Fan):\n\nWind mode: node scripts/switchbot_cli.js cmd <deviceId> setWindMode --param=natural\nWind speed: node scripts/switchbot_cli.js cmd <deviceId> setWindSpeed --param=50\nNight light: node scripts/switchbot_cli.js cmd <deviceId> setNightLightMode --param=1\nAuto-off timer: node scripts/switchbot_cli.js cmd <deviceId> closeDelay --param=3600\n\nRobot Vacuum S1/S1 Plus/K10+/K10+ Pro:\n\nStart: node scripts/switchbot_cli.js cmd <deviceId> start\nStop: node scripts/switchbot_cli.js cmd <deviceId> stop\nDock: node scripts/switchbot_cli.js cmd <deviceId> dock\nSuction: node scripts/switchbot_cli.js cmd <deviceId> PowLevel --param=2\n\nRobot Vacuum K10+ Pro Combo / K20+ Pro / S10 / S20 / K11+:\n\nStart clean: node scripts/switchbot_cli.js cmd <deviceId> startClean --param='{\"action\":\"sweep_mop\",\"param\":{\"fanLevel\":2,\"waterLevel\":1,\"times\":1}}'\nPause/Dock: node scripts/switchbot_cli.js cmd <deviceId> pause / dock\nVolume: node scripts/switchbot_cli.js cmd <deviceId> setVolume --param=50\nSelf clean (S10/S20): node scripts/switchbot_cli.js cmd <deviceId> selfClean --param=1\n\nBlind Tilt:\n\nSet position: node scripts/switchbot_cli.js cmd <deviceId> setPosition --param=\"up;60\"\nFully open: node scripts/switchbot_cli.js cmd <deviceId> fullyOpen\nClose: node scripts/switchbot_cli.js cmd <deviceId> closeUp / closeDown\n\nRoller Shade:\n\nSet position: node scripts/switchbot_cli.js cmd <deviceId> setPosition --param=50\n\nHumidifier (original):\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param=auto\n\nEvaporative Humidifier / Auto-refill:\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param='{\"mode\":7,\"targetHumidify\":60}'\nChild lock: node scripts/switchbot_cli.js cmd <deviceId> setChildLock --param=true\n\nAir Purifier (VOC/PM2.5/Table):\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param='{\"mode\":2,\"fanGear\":2}'\nChild lock: node scripts/switchbot_cli.js cmd <deviceId> setChildLock --param=1\n\nSmart Radiator Thermostat:\n\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param=1\nSet temp: node scripts/switchbot_cli.js cmd <deviceId> setManualModeTemperature --param=22\n\nRelay Switch 1PM / 1 / 2PM:\n\nToggle: node scripts/switchbot_cli.js cmd <deviceId> toggle\nSet mode: node scripts/switchbot_cli.js cmd <deviceId> setMode --param=0\n2PM channel: node scripts/switchbot_cli.js cmd <deviceId> turnOn --param=\"1\" (channel 1 or 2)\n\nGarage Door Opener:\n\nOpen/Close: node scripts/switchbot_cli.js cmd <deviceId> turnOn / turnOff\n\nVideo Doorbell:\n\nMotion detection: node scripts/switchbot_cli.js cmd <deviceId> enableMotionDetection / disableMotionDetection\n\nCandle Warmer Lamp:\n\nBrightness: node scripts/switchbot_cli.js cmd <deviceId> setBrightness --param=50\n\nAI Art Frame:\n\nNext/Previous: node scripts/switchbot_cli.js cmd <deviceId> next / previous\n\nKeypad / Keypad Touch / Keypad Vision / Keypad Vision Pro:\n\nCreate passcode: node scripts/switchbot_cli.js cmd <deviceId> createKey --param='{\"name\":\"Guest\",\"type\":\"permanent\",\"password\":\"12345678\"}'\nDelete passcode: node scripts/switchbot_cli.js cmd <deviceId> deleteKey --param='{\"id\":\"11\"}'\n⚠️ Keypad commands are async — results come via webhook.\n\nIR Remote - Air Conditioner:\n\nSet all: node scripts/switchbot_cli.js cmd <deviceId> setAll --param=\"26,2,1,on\" (format: temperature, mode, fan speed, power state)\nmode: 0/1=auto, 2=cool, 3=dry, 4=fan, 5=heat\nfan: 1=auto, 2=low, 3=medium, 4=high\npower: on/off\n\nIR Remote - TV:\n\nChannel: node scripts/switchbot_cli.js cmd <deviceId> SetChannel --param=5\nVolume: node scripts/switchbot_cli.js cmd <deviceId> volumeAdd / volumeSub\n\nIR Remote - Others (DIY):\n\nCustom button: node scripts/switchbot_cli.js cmd <deviceId> <buttonName> --commandType=customize\n\nScenes (fallback):\n\nList scenes: node scripts/switchbot_cli.js scenes\nExecute scene: node scripts/switchbot_cli.js scene <sceneId>\nAPI Reference\n\nBase URL: https://api.switch-bot.com Path prefix: /v1.1 Daily limit: 10,000 API calls\n\nHeaders (all required):\n\nAuthorization: <SWITCHBOT_TOKEN>\nsign: HMAC-SHA256(token + t + nonce, secret), Base64-encoded\nt: 13-digit millisecond timestamp\nnonce: random UUID\n\nKey endpoints:\n\nGET /v1.1/devices — list all devices\nGET /v1.1/devices/{deviceId}/status — device status\nPOST /v1.1/devices/{deviceId}/commands — send command\nGET /v1.1/scenes — list scenes\nPOST /v1.1/scenes/{sceneId}/execute — execute scene\n\nCommand body format:\n\n{\n  \"command\": \"<commandName>\",\n  \"parameter\": \"<string|object>\",\n  \"commandType\": \"command\"\n}\n\n\nFor IR \"Others\" (DIY) devices, use \"commandType\": \"customize\".\n\nAgent Guidelines\nAlways use the provided CLI scripts — they handle HMAC signatures automatically.\nThe CLI runs preflight checks for BLE devices (Bot, Lock, Curtain, Blind Tilt) — requires Hub + Cloud Services enabled.\nFor IR Air Conditioner, only setAll is supported (not separate setMode/setTemp).\nFor Keypad commands (createKey/deleteKey), results are async via webhook.\nIf a command returns statusCode 160, the device may not support that command — use Scenes as fallback.\nNever log tokens/secrets. Ask user to set them as environment variables.\nFiles\nscripts/switchbot_cli.js — Node CLI (list/status/cmd/scenes)\nscripts/list_devices.sh — curl: list devices\nscripts/get_status.sh — curl: get status\nscripts/send_command.sh — curl: send command\nscripts/list_scenes.sh — curl: list scenes\nscripts/execute_scene.sh — curl: execute scene\nreferences/commands.md — complete command reference per device type\nreferences/examples.md — usage examples"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/switchbot-dev/switchbot-cloudapi",
    "publisherUrl": "https://clawhub.ai/switchbot-dev/switchbot-cloudapi",
    "owner": "switchbot-dev",
    "version": "1.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/switchbot-cloudapi",
    "downloadUrl": "https://openagent3.xyz/downloads/switchbot-cloudapi",
    "agentUrl": "https://openagent3.xyz/skills/switchbot-cloudapi/agent",
    "manifestUrl": "https://openagent3.xyz/skills/switchbot-cloudapi/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/switchbot-cloudapi/agent.md"
  }
}