stick_control

DJI Services · drc · stick_control

Request Params

vendor
string
必填
固定 dji
device_id
string
必填
目标设备 ID
command_type
string
必填
固定 stick_control
idempotency_key
string
必填
幂等键;重复请求返回同一命令
timeout_seconds
integer
超时秒数,范围 0~300
payload.roll
integer
必填
横滚通道 364-1684 1024为中值(无动作),数值增大表示向右倾斜,减小表示向左倾斜
payload.pitch
integer
必填
俯仰通道 364-1684 1024为中值(无动作),数值增大表示向前俯冲,减小表示向后抬头。
payload.throttle
integer
必填
升降通道 364-1684 1024为悬停状态,数值增大表示升高,减小表示降低。
payload.yaw
integer
必填
偏航通道 364-1684 1024为中值(无动作),数值增大表示顺时针旋转,减小表示逆时针旋转。

Create Response

command_id
string(uuid)
平台命令受理标识,全平台唯一 UUID
status
string
受理状态:ACCEPTED
accepted_at
string(datetime)
命令受理时间(UTC)

Query Response

command_id
string(uuid)
平台命令受理标识,全平台唯一 UUID
status
string
执行状态:ACCEPTED / DELIVERED / SUCCEEDED / FAILED / TIMED_OUT / UNMATCHED_RESPONSE
vendor
string
厂商标识,固定为 dji
device_id
string
目标设备 ID
command_type
string
method 名称
response_code
string
设备侧执行码
response_message
string
设备侧执行信息
vendor_response
object
原始厂商回包(透传)

DJI Services Reply Mapping

设备通过 services_reply 返回命令结果,平台使用 tid 关联到 command_id 并更新命令状态。接入方不需要直接处理 MQTT 回包。
Open Platform 字段DJI services_reply 来源
response_code优先使用 data.code;不存在时回退到 data.result
response_messagedata.message / data.msg / data.description
vendor_responseDJI 回包摘要,保留 resultcodemessageoutput 等原始扩展字段
data.result = 0 表示设备侧执行成功;非 0 表示设备侧执行失败,平台会将命令推进为失败终态。
curl -X POST "/api/v1/open/downlink/commands" \
  -H "Content-Type: application/json" \
  -H "X-Api-Id: YOUR_API_ID" \
  -H "X-Api-Timestamp: YOUR_UNIX_SECONDS" \
  -H "X-Api-Nonce: YOUR_NONCE" \
  -H "X-Api-Signature: YOUR_SIGNATURE" \
  -d '{"vendor":"dji","device_id":"drone-001","command_type":"stick_control","payload":{"roll":0,"pitch":0,"throttle":0,"yaw":0},"idempotency_key":"req-stick_control-001","timeout_seconds":30}'

curl "/api/v1/open/downlink/commands/b9df1013-0207-fb5c-ca63-f352d5b10df8"
{
  "command_id": "b9df1013-0207-fb5c-ca63-f352d5b10df8",
  "status": "ACCEPTED",
  "accepted_at": "2026-04-22T12:00:00Z"
}