Device Management

2024-11-11
No Rating

Status

Device topology update

Topic: sys/product/{gateway_sn}/status

Direction: up

Method: update_topo

Data:

ColumnNameTypeconstraintDescription
domainGateway device namespacestringReference to Product Supportopen in new window
typeGateway device product typeintReference to Product Supportopen in new window
sub_typeGateway sub-device product subtypeintReference to Product Supportopen in new window
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 to Product Supportopen in new window
»typeSub-device product typeintReference to Product Supportopen in new window
»sub_typeSub-device product subtypeintReference to Product Supportopen in new window
»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 codeintNon-zero represents an error

Example:

{
	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"data": {
		"result": 0
	},
	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
	"timestamp": 1654070968655,
	"method": "update_topo"
}
If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.