Overview and common payload
Overview and common payload
Full examples for each event remain in Event message format. This page lists fields that repeat in those examples.
Capability events (capabilityEvent)
After you subscribe to capabilityEvent in setMessageCallback, capability events and property changes share one push payload structure (same push body as Receive device messages and Receive alarm messages). That is not the legacy did/cid/desc shape in the tables below.
| JSON field | Notes |
|---|---|
msgType | Equals the capability eventId, e.g. detection.motion.detected; property reports use device.property.report |
deviceId | Device serial number |
productId | Product model |
channelId | Present on channel-level events; omitted on device-level events |
outputData | Event-specific fields; {} when none |
time | Report time, Unix seconds |
localTime | Device local time yyyyMMddTHHmmss |
alarmId | Alarm id for query/delete |
token | Present when linked cloud recording is available |
Event pages under /events/* expand outputData only; use this table and Receive device messages for the push payload.
Legacy alarm messages
These fields apply to legacy alarm push (e.g. alarm callback, old msgType values such as scene change or motion). They differ from the capabilityEvent push payload.
Scene change, motion, and intrusion samples all include:
| JSON field | Notes |
|---|---|
id | Message id |
appId | Developer appId |
did | Device serial number |
cid | Channel number |
msgType | Message type |
type | Type value |
time | Alarm time |
utcTime | UTC alarm time |
cname | Channel name |
remark | Remark |
token | Cloud recording token; only when platForm is 4 |
subType | Sub-type, e.g. Alarm |
skip | Extension; sample is {} |
action | Action, e.g. start |
desc | Business fields per msgType; for intrusion, desc.region is the zone name |
Device or channel online/offline
msgType is online or offline. cid -1 means device online/offline; other values mean a channel. devices may return pid. Samples may also include dname, iotFlag, and userId.
device alarms
msgType is iotEvent. The channel field is channelId, not cid. content.event is the capability model event type; content.localTime is local event time; content.outputData is {} in the sample.
Legacy sections above match Event message format sections 1–3; msgType enums are in Event message types. Archived copies: legacy payload format · legacy msgType table.
