Command Delivery Overview
Introduction
A product model defines commands that can be delivered to the devices. Applications can call platform APIs to deliver commands to the devices to effectively manage these devices.
The IoT platform supports synchronous and asynchronous command delivery.
Mechanism |
Description |
Application |
Devices Using LwM2M over CoAP |
Devices Using MQTT |
---|---|---|---|---|
Synchronous command delivery |
An application calls the synchronous command delivery API to deliver a command to a specified device for device control. The platform sends the command to the device and returns the command execution result in an HTTP request to the application. If the device does not respond, the platform returns a timeout message to the application. |
Applicable to commands that must be executed in real time, for example, turning on a street lamp or closing a gas meter switch. Applications should determine the appropriate time to deliver a command. |
Not applicable |
Applicable |
Asynchronous command delivery |
An application calls the asynchronous command delivery API to deliver a command to a specified device for device control. The platform sends the command to the device and asynchronously pushes the command execution result to the application. Asynchronous command delivery is classified into immediate delivery and delayed delivery.
|
|
Applicable |
Not applicable |
For details, see Synchronous Command Delivery and Asynchronous Command Delivery.
Scenarios
- Synchronous delivery applies to scenarios that require real-time command delivery.
- Data needs to be forwarded to other Huawei Cloud services for storage and processing based on data forwarding rules.
Constraints
- Maximum size of a single message: 256 KB.
- Product models are required.
- Devices need to respond to the synchronous command within 20 seconds.
- A maximum of 20 asynchronous commands can be cached at a time.
- The cache duration is configurable and cannot exceed 48 hours.
APIs
- APIs for the platform and applications
- APIs for MQTT devices
- APIs for devices using LwM2M over CoAP
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot