跳到主要内容

Remote Log

File Upload Progress Notification​

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: fileupload_progress

Data:

ColumnNameTypeconstraintDescription
outputOutputstructEvent output data
»extExtension infostructExtension information
»»filesFile listarray{"size": -, "item_type": struct}Log file list
»»»moduleDevice typetext{"0":"Drone","3":"Nest"}Module the log belongs to
»»»sizeFile sizeintbyte
»»»device_snDevice serial numbertextDevice serial number
»»»keyObject storage keytextFile key in the storage bucket
»»»fingerprintFile fingerprinttextFile fingerprint
»»»progressProgress infostructProgress information
»»»»current_stepCurrent stepintIndex of the current step
»»»»total_stepTotal stepsintTotal number of steps
»»»»progressProgress valueintProgress value (percentage)
»»»»finish_timeUpload completion timeint{"unit_name":"milliseconds / ms"}Upload completion timestamp (milliseconds)
»»»»upload_rateUpload speedint{"unit_name":"bytes per second / bytes/s"}Upload speed (bytes/s)
»»»»resultResult codeint{0:"Success",108:"Log compression failed",111:"Log download failed",115:"Log upload rejected",116:"Log upload credential expired"}Non-zero represents an error
»»»»statusUpload statusenum_string{"drone_log_zip":"Drone log packing","drone_log_zip_success":"Drone log packing succeeded","drone_log_zip_failed":"Drone log packing failed","file_pull":"Pulling file","file_pull_success":"File pull succeeded","file_pull_failed":"File pull failed","file_zip":"Compressing file","file_zip_success":"File compression succeeded","file_zip_failed":"File compression failed","file_uploading":"Uploading file","ok":"Upload succeeded","failed":"Upload failed","timeout":"Upload timed out"}File upload status
»statusUpload statusenum_stringSame as »»»»statusOverall status of this upload

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",
"total_step": 1,
"upload_rate": 0
},
"size": 89205156
}
]
},
"status": "ok"
}
},
"tid": "4ecd7315-a8fd-4c89-adcb-22633456553f",
"timestamp": 1708603244736,
"method": "fileupload_progress"
}

Service

Get the list of files that can be uploaded by the device​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: fileupload_list

Data:

ColumnNameTypeconstraintDescription
module_listFile ownership filter listarray{"size": -, "item_type": text}List of modules for log collection, values {"0":"Drone","3":"Nest"}; all modules are returned when empty

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:

ColumnNameTypeconstraintDescription
filesarray{"size": 2, "item_type": struct}Log file list
»device_snDevice serial number (SN)textDevice serial number
»resultReturn codeintNon-zero represents an error
»moduleDevice typetext{"0":"Drone","3":"Nest"}Module the log belongs to
»listFile index listarray{"size": -, "item_type": struct}Log file detail list
»»boot_indexFile indexintDevice boot index
»»start_timeLog start timeint{"unit_name":"milliseconds / ms"}Log start timestamp
»»end_timeLog end timeint{"unit_name":"milliseconds / ms"}Log end timestamp
»»sizeLog file sizeintbyte
»»name_pathLog name pathtextDisplay path of the log file
»»pathLog file identifiertextFile identifier that must be passed back unchanged when starting the upload

Example:

{
"bid": "64fd5d4b-1e7d-4325-b984-4e3035cfddb9",
"data": {
"files": [
{
"device_sn": "NM1923221021",
"list": [
{
"boot_index": 0,
"end_time": 1659427398806,
"name_path": "Nest 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_time": 1659427398806,
"name_path": "Nest 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 receiving the command issued by the server, the device will directly return the execution result status.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: fileupload_start

Data:

ColumnNameTypeconstraintDescription
bucketObject Storage Bucket NametextObject storage bucket name
regionData Center LocationtextStorage bucket region
credentialsCredential InformationstructTemporary access credentials
»access_key_idAccess Key IDtextTemporary Access Key ID
»access_key_secretSecret Access KeytextTemporary Access Key Secret
»expireAccess Key Expiration Timeint{"step":"1","unit_name":"seconds / s"}Credential expiration time
»security_tokenSession TokentextSecurity token
endpointPublic Access DomaintextObject storage service endpoint
providerCloud Provider Enumerationenum_string{"s3":"S3-compatible storage","aws":"Amazon Web Services","amazon":"Amazon Web Services","minio":"Minio","ali":"Alibaba Cloud","oss":"Alibaba Cloud OSS","cos":"Tencent Cloud COS","qcloud":"Tencent Cloud","obs":"Huawei Cloud OBS","huawei":"Huawei Cloud"}Storage service provider
paramsstructLog upload parameters
»filesarray{"size": -, "item_type": struct}List of log files to upload
»»object_keyFile Key in Object Storage BuckettextFile key in the storage bucket
»»moduleLog Moduletext{"0":"Drone","3":"Nest"}Module the log belongs to
»»listLog Listarray{"size": -, "item_type": struct}Log file detail list
»»»name_pathLog Name PathtextTaken from name_path in the file list query result
»»»pathLog File IdentifiertextTaken from path in the file list query result, must be passed back unchanged

Example:

{
"timestamp": 1708655170850,
"data": {
"bucket": "autel-store",
"credentials": {
"access_key_id": "access_key_id",
"access_key_secret": "access_key_secret",
"expire": 360000,
"security_token": "security_token"
},
"endpoint": "https://storage.example.com",
"provider": "minio",
"params": {
"files": [
{
"object_key": "e7dd5966-5eff-43b8-8d6e-c9cc8c0da97b.tar",
"module": "3",
"list": [
{
"boot_index": 0,
"end_time": "0",
"size": "10867666",
"start_time": "0",
"name_path": "Nest 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:

ColumnNameTypeconstraintDescription
resultReturn codeint0 for success, non-zero indicates 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​

The device will directly return the execution result status after receiving the command sent from the server.

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: fileupload_update

Data:

ColumnNameTypeconstraintDescription
statusUpload statusenum_string{"cancel":"Cancel"}Log upload status
module_listLog module listarray{"size": -, "item_type": text}List of modules being uploaded, values {"0":"Drone","3":"Nest"}

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:

ColumnNameTypeconstraintDescription
resultReturn codeint0 for success, non-zero indicates error

Example:

{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"gateway": "",
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1655781392412,
"method": "fileupload_update"
}