Reporting Attributes, Measurement Points, and Events to EnOS™ (Non-DTLS)¶
Devices connected to EnOS through CoAP can report attribute values, measurement points, and events to EnOS. The process is shown below.
The data transmitted by the low-power devices connected via CoAP are often binary. These data can be passed through to EnOS and then converted to the EnOS-defined JSON format by using the parsing script.
When a device is connected to EnOS via CoAP, the topic and parameter specifications are consistent with those of MQTT. For more information about the request data formats, response data formats, and parameter descriptions for upstream messages, see Report Device Events (Passthrough) and Report Device Events (Non-Passthrough).
The data reported by the device is in the following format:
POST /topic/sys/${ProductKey}/${DeviceKey}/thing/model/up_raw
Payload: ${Payload}
Parameter |
Description |
---|---|
ProductKey |
The product key used for authentication. |
DeviceKey |
The device key used for authentication. |
Payload |
The data that is reported to EnOS. |
The response EnOS sends to the device includes the payload requested as well as the CoAP return code. The format of the response is as follows:
Code: CoAP return code
Payload: {Payload}