Device Member Update
This topic is used to subscribe to updates on bindings between end devices and edge nodes.
Topic
$hw/events/node/{node_id}/membership/updated
| Parameter | Type | Description |
|---|---|---|
| node_id | String | Node 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. |
| added_devices | Array | Information about end devices, including the device ID, name, properties, and twin properties. |
| removed_devices | Array | Information about end devices, including the device ID, name, properties, and twin properties. |
Example
When an end device is bound to an edge node, the following message is received:
$hw/events/node/{node_id}/membership/updated
{
"event_id":"04a975ab-fd51-49be-85f5-5967e994f640",
"timestamp":1557314742136,
"added_devices":[
{
"id":"ab39361a-6fc0-4c94-b919-72b1e08ca690",
"name":"IEF-device",
"state":"unknown",
"attributes":{
"address":{
"value":"shenzhen",
"optional":true,
"metadata":{
"type":"string"
}
}
},
"twin":{
"state":{
"expected":{
"value":"running",
"metadata":{
"timestamp":1557314434570
}
},
"optional":true,
"metadata":{
"type":"string"
}
}
}
}
],
"removed_devices":null
} Last Article: Device Twin Delta
Next Article: Device Property Update
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.