跳到主要内容

Status

Device Topology Update

Topic: sys/product/{gateway_sn}/status

Direction: up

Method: update_topo

Data:

ColumnNameTypeconstraintDescription
domainNamespace of the gateway deviceintRefer to the product support page
typeProduct type of the gateway deviceintRefer to the product support page
sub_typeProduct subtype of the gateway sub-deviceintRefer to the product support page
device_secretDevice secret of the gateway devicetext
nonceNoncetext
versionModel version of the gateway devicetext
sub_devicesList of sub-devicesarray{"size": 1, "item_type": struct}
»snSub-device serial number (SN)text
»domainNamespace of the sub-deviceintRefer to the product support page
»typeProduct type of the sub-deviceintRefer to the product support page
»sub_typeProduct subtype of the sub-deviceintRefer to the product support page
»indexChannel index connecting the gateway devicestring
»device_secretDevice secret of the sub-devicetext
»nonceNoncetext
»versionModel version of the sub-devicetext

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":[]
}
}