Platform Delivering a Message
Function
This API is used by an application to deliver a message in custom format to a device when the application cannot deliver data in the format defined in the product model.
For differences between command delivery and message delivery, see Message Communications Overview.
It is not suitable to report data in JSON format for devices with low configuration and limited resources or with limits on bandwidth usage. In this case, devices can transparently transmit the original binary data to the platform, but a codec is required to convert binary data to JSON format. For details about how to develop codecs, see Developing a Codec.
Topic
Downstream: $oc/devices/{device_id}/sys/messages/down
Parameters
Parameter |
Mandatory or Optional |
Type |
Description |
---|---|---|---|
object_device_id |
Optional |
String |
Indicates the device to which the message is sent. If this parameter is not carried, the device specified in the topic is considered to be the intended device. |
name |
Optional |
String |
Indicates the message name. |
id |
Optional |
String |
Uniquely identifies a message. |
content |
Mandatory |
String |
Indicates the message content. |
Example
Topic: $oc/devices/{device_id}/sys/messages/down Data format: { "object_device_id": "{object_device_id}", "name": "name", "id": "id", "content": "hello" }
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