Status
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 | int | Refer to the product support page | |
type | Product type of the gateway device | int | Refer to the product support page | |
sub_type | Product subtype of the gateway sub-device | int | Refer to the product support page | |
device_secret | Device secret of the gateway device | text | ||
nonce | Nonce | text | ||
version | Model version of the gateway device | text | ||
sub_devices | List of sub-devices | array | {"size": 1, "item_type": struct} | |
»sn | Sub-device serial number (SN) | text | ||
»domain | Namespace of the sub-device | int | Refer to the product support page | |
»type | Product type of the sub-device | int | Refer to the product support page | |
»sub_type | Product subtype of the sub-device | int | Refer to the product support page | |
»index | Channel index connecting the gateway device | string | ||
»device_secret | Device secret of the sub-device | text | ||
»nonce | Nonce | text | ||
»version | Model version of the sub-device | text |
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":[]
}
}