Skip to main content

Device Management

Status

Device topology update

Topic: sys/product/{gateway_sn}/status

Direction: up

Method: update_topo

Data:

ColumnNameTypeconstraintDescription
domainGateway device namespacestringReference: Product Support
typeGateway device product typeintReference: Product Support
sub_typeGateway sub-device product subtypeintReference: Product Support
device_secretGateway device keytext
noncenoncetext
thing_versionThing model version of gateway devicetext
sub_devicesSub-device listarray{"size": 1, "item_type": struct}
»snSub-device serial number (SN)text
»domainSub-device namespacestringReference: Product Support
»typeSub-device product typeintReference: Product Support
»sub_typeSub-device product subtypeintReference: Product Support
»indexChannel index connecting to the gateway devicestring
»device_secretSub-device keytext
»noncenoncetext
»thing_versionThing model version of 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": "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": []
}
}

Topic: sys/product/{gateway_sn}/status_reply

Direction: down

Method: update_topo

Data:

ColumnNameTypeconstraintDescription
resultReturn codeintA non-zero value indicates an error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "update_topo"
}