Updated on 2023-11-24 GMT+08:00

Device Property Update

This topic is used to subscribe to updates on end device properties.

Topic

$hw/events/device/{device_id}/updated

Parameter

Type

Description

device_id

String

End device ID.

Usage

Use an MQTT client to subscribe to this topic.

Parameter Description

Parameter

Type

Description

event_id

String

Event ID.

timestamp

Int64

Timestamp when the event occurred.

attributes

Object

A set of updated end device properties, which are in the key-value pair format. The key indicates the property name, the value contains the property value and the optional flag, and metadata contains the value type.

Example

When an end device is bound to an edge node, the following message is received:

$hw/events/device/{device_id}/updated
{
     "event_id":"",
     "timestamp":1557314742136,
     "attributes":{
         "address":{
             "value":"xxx",
             "optional":true,
             "metadata":{
                 "type":"string"
             }
         }
     }
 }