aqara-open-api
Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON). Use when the user asks to list Aqara devices, get device status, control lights/switches/sensors, or manage rooms/spaces. Requires AQARA_OPEN_API_TOKEN and AQARA_ENDPOINT_URL.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aiot-f2e-team/aqara-open-apiAqara Open API Skill
This skill equips the agent to operate Aqara/Lumi Studio smart home devices via HTTPS requests to the Aqara Open Platform API. All operations are performed exclusively through curl commands, except GetAllDevicesWithSpaceRequest, which must be executed through bash scripts/fetch_all_devices.sh to refresh the local cache file data/devices.json.
This skill supports only:
- device discovery and device type lookup
- device state queries from cache
- device control
- space listing, creation, update, and device assignment
Configuration
The following environment variables are required:
AQARA_ENDPOINT_URL: The base URLAQARA_OPEN_API_TOKEN: Your Long-Lived Access Token.
AI Quick Navigation (Read This First)
This section is a navigation and execution summary only. It does not add new rules or change existing constraints.
What This Skill Can Do
- Device discovery: load all devices, space mappings, endpoints, functions, traits, and current values
- Device type catalog: query all device types in the project with code and display name
- Device queries: filter by type, name, room/space, or online status; read current trait values
- Device control: send control requests using real
deviceId,endpointId,functionCode, andtraitCodefrom cache - Space management: list spaces, create spaces, update spaces, and assign devices to spaces
Intent to Fastest Path
- List all devices / devices by type / devices in a room / device state
- Check
data/devices.json - If cache exists: read the file
- If cache is missing: run
bash scripts/fetch_all_devices.sh
- Check
- Control a device
- Ensure
data/devices.jsonexists - Read
deviceId + endpointId + functionCode + traitCodefrom cache - Then use bash +
curlforExecuteTraitRequest
- Ensure
- What device types are there?
- Use bash +
curlforGetDeviceTypeInfosRequest
- Use bash +
- Refresh all device data
- Only run
bash scripts/fetch_all_devices.sh
- Only run
- List spaces
- Use bash +
curlforGetSpacesRequest
- Use bash +
- Create or update a space
- First get the real
spaceIdfromGetSpacesRequest - Then call
CreateSpaceRequestorUpdateSpaceRequest
- First get the real
- Assign devices to a space
- First get the real
spaceIdfromGetSpacesRequest - Read real
deviceIdvalues fromdata/devices.json - Then call
AssociateDevicesToSpaceRequest
- First get the real
Six Highest-Priority Rules
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aiot-f2e-team-aqara-open-api": {
"enabled": true,
"auto_update": true
}
}
}