Aqara Open API Skill for Openclaw

A professional-grade interface for controlling Aqara smart home hardware and managing spatial hierarchies via the Aqara Open Platform API.

aiot-f2e-team
v1.0.2
Mar 10, 2026
1
277
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install aqara-open-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install aqara-open-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Aqara Open API Skill?

The Aqara Open API Skill provides a streamlined bridge between AI agents and the Aqara/Lumi Studio smart home ecosystem. It allows for the discovery, monitoring, and control of various IoT devices through a secure HTTPS JSON protocol. This skill is built to integrate seamlessly into Openclaw Skills, providing developers with a structured way to interact with hardware endpoints, functions, and traits.

By implementing a strict cache-first architecture, the skill ensures that device metadata—including identifiers and current states—is readily available for local filtering. This approach minimizes redundant API calls and maximizes execution speed. Whether you are automating lighting, monitoring environment sensors, or organizing complex room layouts, this skill provides the precision required for enterprise-level smart home management within the context of Openclaw Skills.

Aqara Open API Skill Use Cases

  • Discovering all connected Aqara devices and their current functional states.
  • Real-time control of smart switches, lights, and sensors using specific trait codes.
  • Organizing hardware into hierarchical spaces like rooms, floors, or zones.
  • Local filtering of device lists by type, online status, or spatial location.
  • Syncing device registries to a local cache for high-performance offline querying.

How Aqara Open API Skill Works

  1. The skill first attempts to read device information from a local cache file to reduce latency.
  2. If the cache is missing or outdated, a dedicated bash script is triggered to fetch the full device and space registry from the Aqara Open Platform.
  3. For control requests, the agent extracts unique deviceId and endpointId values from the cached data.
  4. Commands are issued via curl using a standardized four-field JSON body to the unified API endpoint.
  5. The system validates the response code and updates the local state or notifies the user of the hardware execution results.

Aqara Open API Skill Setup

To get started with this skill for Openclaw Skills, ensure you have the following environment variables configured:

export AQARA_ENDPOINT_URL="https://your-api-endpoint.com"
export AQARA_OPEN_API_TOKEN="your-long-lived-access-token"

Once configured, initialize your local device registry by running the provided fetch script:

bash scripts/fetch_all_devices.sh

Aqara Open API Skill Data Schema & Taxonomy

The skill utilizes a centralized JSON cache to manage hardware metadata and state information. Below is the primary taxonomy used:

Key Type Description
deviceId String Unique identifier for each physical device.
endpointId Integer Specific control endpoint within a device.
traitCode String The capability being controlled (e.g., OnOff, Brightness).
spaceId String The identifier for the room or zone assigned to the device.
value Mixed The state or target value for a specific device trait.

Aqara Open API Skill Advanced Features

  • Cache-first data model to ensure ultra-fast response times for discovery queries.
  • Robust error handling for token expiration and device connectivity issues.
  • Hierarchical space management allowing for nested room and building structures.
  • Strict protocol enforcement requiring valid trait codes from a predefined whitelist.
  • Local data aggregation for complex filtering without extra network overhead in Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*