Remote Log
Event
File Upload Progress Notification
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: fileupload_progress
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-zero represents error | |
| output | Output | struct | ||
| »ext | Extension information | struct | ||
| »»files | File list | array | {"size": -, "item_type": struct} | |
| »»»module | Device type | enum_int | {"0":"Aircraft","3":"Dock"} | |
| »»»size | File size | int | byte | |
| »»»device_sn | Device serial number (SN) | text | ||
| »»»key | Object storage bucket Key | text | ||
| »»»fingerprint | File fingerprint | text | ||
| »»»progress | Progress information | struct | ||
| »»»»progress | Progress value | int | ||
| »»»»finish_time | Upload completion time | int | ||
| »»»»upload_rate | Upload rate | int |
Example:
{
"bid": "5d1ce329-0877-4dbd-a9db-14b894e6f6eb",
"data": {
"output": {
"ext": {
"files": [
{
"device_sn": "HMA111468100",
"fingerprint": "a0f4f397dd110afe8d3fa5f2b47efd2d",
"key": "2e742c87-850d-4f48-9b62-28c6feb14d5b.tar",
"module": "0",
"progress": {
"current_step": 1,
"finish_time": 1708603244736,
"progress": 100,
"result": 0,
"status": "ok",
"upload_rate": 0
},
"size": 89205156
}
]
},
"status": "ok"
}
},
"tid": "4ecd7315-a8fd-4c89-adcb-22633456553f",
"timestamp": 1708603244736,
"method": "fileupload_progress"
}
Service
Get Device Uploadable File List
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: fileupload_list
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| module_list | File ownership filter list | array | {"size": -, "item_type": enum_int} |
Example:
{
"timestamp": 1708654230926,
"data": {
"module_list": [
"3"
]
},
"method": "fileupload_list",
"tid": "a990e2ed-e1be-4ca9-b02f-74094692e889",
"bid": "5b41a737-5c6f-4b40-aa1e-d59c13bb3759",
"gateway": "NM1923221021"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: fileupload_list
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| files | array | {"size": 2, "item_type": struct} | ||
| »device_sn | Device serial number (SN) | text | ||
| »result | Return code | int | Non-zero represents error | |
| »module | Device type | enum_int | {"0":"Aircraft","3":"Dock"} | |
| »list | File index list | array | {"size": -, "item_type": struct} | |
| »»boot_index | File index | int | ||
| »»start_time | Log start time | int | {"unit_name":"Milliseconds / ms"} | |
| »»end_time | Log end time | int | {"unit_name":"Milliseconds / ms"} | |
| »»size | Log file size | int | byte |
Example:
{
"bid": "64fd5d4b-1e7d-4325-b984-4e3035cfddb9",
"data": {
"files": [
{
"device_sn": "NM1923221021",
"list": [
{
"boot_index": 0,
"end_time": 1659427398806,
"name_path": "Dock APP Log/autelrtc/stats/stats240117_194831.db",
"path": "/data/user/0/com.autel.nest/files/autelrtc/stats/stats240117_194831.db",
"size": 33789,
"start_time": 1654070968655
},
{
"boot_index": 22222,
"end_ime": 1659427398806,
"name_path": "Dock APP Log/nestLog/2024022115.xlog",
"path": "/data/user/0/com.autel.nest/files/nestLog/2024022115.xlog",
"size": 33789,
"start_time": 1659427398806
}
],
"module": "0",
"result": 0
}
],
"result": 0
},
"gateway": "NM1923221021",
"tid": "0ed6c833-863b-4ecf-9e61-c09329337144",
"timestamp": 1654070968655,
"method": "fileupload_list"
}
Initiate Log File Upload
After the device receives the command sent by the server, it will directly return the execution result status
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: fileupload_start
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| bucket | Object storage bucket name | text | ||
| region | Data center region | text | ||
| credentials | Credential information | struct | ||
| »access_key_id | Access key ID | text | ||
| »access_key_secret | Secret access key | text | ||
| »expire | Access key expiration time | int | {"step":"1","unit_name":"Seconds / s"} | |
| »security_token | Session token | text | ||
| endpoint | External service access domain | text | ||
| provider | Cloud vendor enumeration value | enum_string | {"ali":"Alibaba Cloud","aws":"Amazon Cloud","minio":"minio"} | |
| params | struct | |||
| »files | array | {"size": -, "item_type": struct} | ||
| »»object_key | File key in object storage bucket | text | ||
| »»module | Log module | text | ||
| »»list | Log list | array | {"size": -, "item_type": struct} | |
| »»»boot_index | Log index | int |
Example:
{
"timestamp": 1708655170850,
"data": {
"bucket": "autel-store",
"credentials": {
"access_key_id": "GII6JJKWCLUQVO13081U",
"access_key_secret": "+p1ES5r0+oAMsBtTrFTqpSG0K+wXSqcaZmLrL74M",
"expire": 360000,
"security_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJHSUk2SkpLV0NMVVFWTzEzMDgxVSIsImV4cCI6MTcwOTAxNTE3MCwicGFyZW50IjoiYWRtaW4ifQ.mHmAH2zdFNS5m_z-k2GT_Z-BYxBHPd8PkX7C1j7Uufg_oCzvkLa_fT5LD0JTH9KaiO-A8cXEzPhkSqauiGSrhw"
},
"endpoint": "http://139.9.78.181:9000",
"provider": "minio",
"params": {
"files": [
{
"device_sn": "NM1923221021",
"object_key": "e7dd5966-5eff-43b8-8d6e-c9cc8c0da97b.tar",
"module": "3",
"list": [
{
"boot_index": 0,
"end_time": "0",
"size": "10867666",
"start_time": "0",
"name_path": "Dock APP Log/nestLog/2024022209.xlog",
"path": "/data/user/0/com.autel.nest/files/nestLog/2024022209.xlog"
}
]
}
]
}
},
"method": "fileupload_start",
"tid": "7fb9135c-41b0-4fb9-830e-f33f3d7b089b",
"bid": "51fd254c-1933-4ea3-bfc8-a17af6467d38",
"gateway": "NM1923221021"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: fileupload_start
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-zero represents error |
Example:
{
"bid": "51fd254c-1933-4ea3-bfc8-a17af6467d38",
"data": {
"result": 0
},
"tid": "7fb9135c-41b0-4fb9-830e-f33f3d7b089b",
"timestamp": 1708655170942,
"method": "fileupload_start"
}
Upload Status Update
After the device receives the command sent by the server, it will directly return the execution result status
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: fileupload_update
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| status | Upload status | enum_string | {"cancel":"Cancel"} | |
| module_list | Log module list | array | {"size": -, "item_type": } |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"module_list": [
"0",
"3"
],
"status": "cancel"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"method": "fileupload_update"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: fileupload_update
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | {0:"Success",324015:"Drone is powered off or not connected, cannot get log list", 701001: "Drone serial number acquisition failed, cannot get log list", 701002: "Log is being uploaded, please do not upload repeatedly", 701003: "Failed to compress drone log file", 701004: "Failed to download drone log file", 701005: "File upload service of this type is not supported", 701006: "Firmware upgrade in progress"} |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"gateway": "",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1655781392412,
"method": "fileupload_update"
}
Set elog log switch
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: elog_status_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| config_type | elog switch | enum | 0:Off 1:On |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"config_type": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "elog_status_set"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: elog_status_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-zero represents error | |
| output | Output | struct | ||
| »fail_reason | Failure reason | string | Failure reason |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"fail_reason": "xxxxx"
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "elog_status_set"
}
Get elog log switch
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: elog_status_get
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| config_type | elog switch | enum | 0:Off 1:On |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "elog_status_get"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: elog_status_get
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | Return code | int | Non-zero represents error | |
| output | Output | struct | ||
| »status | Status | int | // 0:Off 1:On |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"status": 0
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "elog_status_get"
}