Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
    • Browse by device type
    • Device capabilities
    • Events overview
      • Event types
      • Device status
      • Binding and authorization
      • Detection and alarms
      • Doorbell and lock
      • Service events
      • Overview and common payload
      • Event message types
      • Event message format
    • Permission codes
    • Capability error codes
    • Alarm and capability messages
    • Capability FAQ
    • Legacy ability and push types
  • API reference
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Capability events (capabilityEvent)
Legacy alarm messages
Device or channel online/offline
device alarms

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 fieldNotes
msgTypeEquals the capability eventId, e.g. detection.motion.detected; property reports use device.property.report
deviceIdDevice serial number
productIdProduct model
channelIdPresent on channel-level events; omitted on device-level events
outputDataEvent-specific fields; {} when none
timeReport time, Unix seconds
localTimeDevice local time yyyyMMddTHHmmss
alarmIdAlarm id for query/delete
tokenPresent 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 fieldNotes
idMessage id
appIdDeveloper appId
didDevice serial number
cidChannel number
msgTypeMessage type
typeType value
timeAlarm time
utcTimeUTC alarm time
cnameChannel name
remarkRemark
tokenCloud recording token; only when platForm is 4
subTypeSub-type, e.g. Alarm
skipExtension; sample is {}
actionAction, e.g. start
descBusiness 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.

Service events
Event message types