IoTIoT

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: Feb 24, 2022 GMT+08:00

Delivering Commands

Interface Function

This interface is used by the IoT platform to deliver commands to devices.

Parameters

Parameter

Mandatory or Optional

Type

Description

msgType

Mandatory

String

This parameter has a fixed value of cloudReq, which indicates that the IoT platform delivers a command.

serviceId

Mandatory

String

Service ID.

cmd

Mandatory

String

Command name. For details, see the profile file.

paras

Mandatory

ObjectNode

Command parameters. Detailed fields are defined in the profile file.

mid

Mandatory

Int

2-byte unsigned command ID. It is allocated by the IoT platform and ranges from 1 to 65535. This parameter must be returned when the device is required to send a command response to the IoT platform.

Example

MQTT 
A device can receive commands only after subscribing to the topic /huawei/v1/devices/{deviceId}/command/{codecMode}.
The following interface is used for northbound command delivery:
https://server:port/iocm/app/signaltrans/v1.1.0/devices/{deviceId}/services/{serviceId}/sendCommand?appId={appId} 
Payload received by the MQTT client:
{ 
"msgType": "{msgType}", 
"serviceId": "{serviceId}", 
"mid": 2016, 
"cmd": "{cmd}", 
"paras": { 
"value": 4 
} 
}

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel