Device Management
Device Topology Update
Topic: sys/product/{gateway_sn}/status
Direction: up
Method: update_topo
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| domain | Namespace of the gateway device | string | Device domain identifier | |
| type | Product type of the gateway | int | Device type enumeration value | |
| sub_type | Sub-type of the gateway device | int | Device subtype enumeration value | |
| device_secret | Gateway device secret | text | Device secret key | |
| nonce | nonce | text | Random nonce for authentication | |
| thing_version | Model version of the gateway | text | Thing model version | |
| sub_devices | List of sub-devices | array | {"size": 1, "item_type": struct} | Sub-device list |
| »sn | Serial number of the sub-device (SN) | text | Sub-device serial number | |
| »domain | Namespace of the sub-device | string | Sub-device domain identifier | |
| »type | Product type of the sub-device | int | Sub-device type enumeration value | |
| »sub_type | Sub-type of the sub-device | int | Sub-device subtype enumeration value | |
| »index | Channel index connecting the gateway | string | Sub-device index | |
| »device_secret | Secret of the sub-device | text | Sub-device secret key | |
| »nonce | nonce | text | Sub-device nonce | |
| »thing_version | Model version of the sub-device | text | Sub-device thing model version |
Example:
//sub_devices online
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": "3",
"type": 119,
"sub_type": 0,
"device_secret": "secret",
"nonce": "nonce",
"thing_version": "1.1.2",
"sub_devices": [
{
"sn": "drone001",
"domain": "0",
"type": 60,
"sub_type": 0,
"index": "A",
"device_secret": "secret",
"nonce": "nonce",
"thing_version": "1.1.2"
}
]
}
}
//sub_devices offline
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": "3",
"type": 119,
"sub_type": 0,
"device_secret":"secret",
"nonce":"nonce",
"thing_version": "1.1.2",
"sub_devices":[]
}
}