跳到主要内容

Device Management

Status

Device Topology Update

Topic: sys/product/{gateway_sn}/status

Direction: up

Method: update_topo

Data:

ColumnNameTypeconstraintDescription
domainGateway device namespaceintReference: Product Support page
typeGateway device product typeintReference: Product Support page
sub_typeGateway sub-device product subtypeintReference: Product Support page
device_secretGateway device secrettext
noncenoncetext
versionGateway device thing model versiontext
sub_devicesSub-device listarray{"size": 1, "item_type": struct}
»snSub-device serial number (SN)text
»domainSub-device namespaceintReference: Product Support page
»typeSub-device product typeintReference: Product Support page
»sub_typeSub-device product subtypeintReference: Product Support page
»indexChannel index connecting to gateway devicestring
»device_secretSub-device secrettext
»noncenoncetext
»versionSub-device thing model versiontext

Example:


//sub_devices online
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": 2,
"type": 119,
"sub_type": 0,
"device_secret": "secret",
"nonce": "nonce",
"version": "1",
"sub_devices": [
{
"sn": "drone001",
"domain": 0,
"type": 60,
"sub_type": 0,
"index": "A",
"device_secret": "secret",
"nonce": "nonce",
"version": "1"
}
]
}
}

//sub_devices offline
{
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "update_topo",
"timestamp": 1234567890123,
"data": {
"domain": 2,
"type": 119,
"sub_type": 0,
"device_secret":"secret",
"nonce":"nonce",
"version": "1",
"sub_devices":[]
}
}