Aqara OpenAPI Local
by @aqara
Route Aqara Open API requests across device, space, and automation skills with a relationship-first router, shared CLI contract, and structured handoff contr...
clawhub install aqara-open-api-localπ About This Skill
name: aqara-open-api-local-space description: List, create, update, and manage Aqara Open API spaces with structured room resolution, real ID lookup, and cache freshness guardrails through the AQARA CLI. Supports AQARA_OPEN_API_TOKEN and AQARA_ENDPOINT_URL through environment variables or AQARA CLI config. author: aqara metadata: {"clawdbot":{"emoji":"ποΈ","requires":{"bins":["node"],"env":["AQARA_ENDPOINT_URL","AQARA_OPEN_API_TOKEN"]}}}
Aqara Open API Space Skill
Read the parent router first:
aqara-open-api-local/SKILL.mdThis file handles room and space mutation. It should not be used as a general device query skill.
Important boundary:
aqara-open-api-local/device/SKILL.md by filtering aqara-open-api-local/data/devices.jsonUse This File
Stay in this file when the final action target is space:
Do Not Stay Here
Resolve room context here, then leave when the final action target changes:
aqara-open-api-local/device/SKILL.mdaqara-open-api-local/automation/SKILL.mdRequired Inputs
Reuse the parent handoff contract:
resolvedSpaceresolvedDevicesambiguityStateoperationContextIf resolvedSpace.spaceId already exists, reuse it after confirming the user still means the same room.
Evidence Model
Room and device work use two evidence paths:
GetSpacesRequest for real space metadata such as spaceId and room nameaqara-open-api-local/data/devices.json for the current device-to-room membership snapshotImportant rule:
GetSpacesRequestdata/devices.json is refreshedMini SOP
Follow this order:
1. Confirm the final action target is still space.
2. Resolve the target room with GetSpacesRequest when needed.
3. Resolve affected deviceIds from data/devices.json.
4. Confirm destructive scope before broad mutations.
5. Execute the space request with real identifiers only.
6. If the mutation changes room membership, refresh data/devices.json or mark cache freshness as stale before any follow-up automation or room-scoped device work.
Space Rules
GetSpacesRequestGetAllSpacesRequest or QuerySpaceListRequestspaceId or deviceIdsRelationship rules:
1. resolve the target space first 2. resolve affected devices from real data 3. only then build the mutation request
Destructive Change Gate
Confirm scope before any broad mutation:
Clarify these points before execution:
Cache Freshness Guardrails
After AssociateDevicesToSpaceRequest or any room mutation that changes membership:
data/devices.json should be treated as staleReliability And Clarification Rules
Ask for clarification when:
Recovery rules:
spaceId, payload shape, and mutation scopedata/devices.json once before proceedingRequest Catalog
List spaces β GetSpacesRequest
aqara spaces list --json
Create space β CreateSpaceRequest
aqara spaces create --name "Living Room" --spatial-marking living_room --json
Update space β UpdateSpaceRequest
aqara spaces update --space-id "" --name "New Room Name" --json
Associate devices to space β AssociateDevicesToSpaceRequest
aqara spaces associate --space-id "" --device-id "" --device-id "" --json
Reference Index
aqara-open-api-local/SKILL.md β parent router and shared contractaqara-open-api-local/device/SKILL.md β room-scoped device filteringaqara-open-api-local/automation/SKILL.md β automation work after room resolutionaqara-open-api-local/data/devices.json β device membership snapshotaqara-open-api-local/docs/commands.md β CLI command catalog