Home
Events
Aqara
studioWebSocket
AsyncAPI channel ·
Aqara
· Studio WebSocket API
studioWebSocket
单连接双向 JSON 文本消息通道。
新接入统一使用 `studio-id`;服务端当前兼容 `X-Studio-Id`、`Studio-Id`、`studioId` 等历史名称。
Studio 局域网 Studio 环境可使用握手 Header 认证;如未在握手 Header 携带 Authorization,客户端必须在连接建立后 7 秒内发送 `AuthRequest`。
Studio 局域网 Studio 环境使用 `AuthRequest` 时,鉴权完成前只允许发送 `AuthRequest`;鉴权成功后再发送心跳、订阅、取消订阅等业务消息。
客户端应周期性发送 `ping` 或其他业务消息保持连接活跃,发送间隔不应超过 30 秒;超过 30 秒无任何消息时,链路中的网关或代理可能主动断开 WebSocket 连接。
使用 API AccessToken 且配置了访问范围时,设
Channel address
studioWebSocket
Operations
send
sendAuthRequest
仅 Studio 自身域名地址和局域网 Studio 环境使用;生产或云端环境不使用 AuthRequest。
receive
receiveSubscriptionCommandResponse
订阅或取消订阅失败时,服务端可能返回 ErrorMessage,也可能返回与请求对应的业务响应类型且 code 非 0。
调用端应按 msgId 关联请求,并对所有响应统一判断 code,不应只等待固定响应 type。
Messages
AuthRequest
Studio 自身域名地址和局域网 Studio 环境的首包认证方式;生产或云端环境不使用。
Content-Type:
AuthResponse
WebSocket 鉴权响应
Content-Type:
SubscribeAllRequest
全量/设备级订阅
Content-Type:
SubscribeAllResponse
全量/设备级订阅响应
Content-Type:
UnsubscribeAllRequest
取消全量/设备级订阅
Content-Type:
UnsubscribeAllResponse
取消全量/设备级订阅响应
Content-Type:
SubscribeTraitValueRequest
订阅指定 Trait 功能值
Content-Type:
SubscribeTraitValueResponse
订阅指定 Trait 功能值响应
Content-Type:
UnsubscribeTraitValueRequest
取消订阅指定 Trait 功能值
Content-Type:
UnsubscribeTraitValueResponse
取消订阅指定 Trait 功能值响应
Content-Type:
SubscribeObjectEventRequest
按当前 WebSocket 会话增量增加对象事件订阅;重复订阅幂等。
Content-Type:
SubscribeObjectEventResponse
对象事件订阅响应
Content-Type:
UnsubscribeObjectEventRequest
按当前 WebSocket 会话移除指定对象规则或清空指定事件类型。
Content-Type:
UnsubscribeObjectEventResponse
取消对象事件订阅响应
Content-Type:
TraitValueUpdate
Trait 功能值变化推送
Content-Type:
objectEvent
设备增删默认推送;空间、自动化和空间关联变化按精确对象订阅投递。
Content-Type:
ErrorMessage
错误响应
Content-Type:
About AsyncAPI
The AsyncAPI specification describes event-driven APIs the way OpenAPI describes request/response APIs. A channel is the named pipe — a webhook URL, a Kafka topic, a WebSocket route, an MQTT subject — that producers and consumers publish or subscribe to. Each channel carries one or more messages with structured payloads, and an operation declares whether a given party sends or receives on that channel.
Browse every event-driven channel on the APIs.io network or compare with the broader Agent Skill and MCP server surfaces of the same providers.
Every channel here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for event channels
4 MCP tools reach this
find_channelsBrowse and filter every channel in the catalog.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This channel
curl "https://apis.io/api/v1/channels/studio-websocket-api-studiowebsocket"
All event channels
curl "https://apis.io/api/v1/channels?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key .
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms .
A second provider on the same verified email joins the account you already have.