Skip to content

Align SwitchBot API and harden account switching - #79

Merged
chenliuyun merged 3 commits into
mainfrom
feat/switchbot-api-alignment
Nov 6, 2026
Merged

chenliuyun merged 3 commits into
mainfrom
feat/switchbot-api-alignment

Conversation

@chenliuyun

Copy link
Copy Markdown
Collaborator

Summary

  • Align device catalog, command/status validation, and discovery with documented SwitchBot API additions.
  • Close MCP destructive-command bypasses and isolate inventory, status, credentials, and idempotency results across account changes.
  • Preserve both rule RGB formats, remove redundant JSON parsing, and update documentation and regression coverage.

Compatibility

  • No CLI version bump or CLI/MCP/audit payload shape changes.
  • Both setColor 255 0 0 and setColor 255:0:0 remain supported, including the corresponding setColorLightRGB forms.
  • Cold-cache rule dry-runs fail closed; destructive operations require the appropriate approval path.
  • Restart MQTT subscriptions and rules daemons after switching accounts. Policy, audit, and event history are retained.
  • Unconfirmed Light Bars webhook type identifiers remain unmapped.

Verification

  • npm test: 180 files, 3163 tests passed; setup includes build and TypeScript checks.
  • npm run lint:md, pre-commit, and pre-push checks passed.
  • Isolated real CLI and MCP SDK smoke covered cross-process account replacement, destructive-command refusal with zero POSTs, HTTP profile recovery, and unchanged RGB/JSON/audit parameters.
  • No real OAuth, cloud API, MQTT broker, camera URL, or physical device validation.

MVP scope and evidence

@chenliuyun
chenliuyun merged commit 38afe73 into main Nov 6, 2026
25 checks passed
@chenliuyun chenliuyun mentioned this pull request Nov 6, 2026
@chenliuyun
chenliuyun deleted the feat/switchbot-api-alignment branch November 6, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant