Updated on 2024-11-06 GMT+08:00

Overview

After a device is connected to IoTDA, the platform can send data to the device in the following ways.

Type

Description

Application

Device Shadow

Synchronous or Asynchronous

Cached by the Platform

Supported Protocol (Device)

Product Model

Message delivery

The platform directly delivers messages to devices and does not rely on product models. It is a one-way notification to devices. If a device is offline, the platform can cache messages (up to 24 hours) and send the data to the device after it goes online.

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 example, sending data to devices for which no product model is defined.

Not supported

Asynchronous

Supported

MQTT

Not required

Property delivery

This mode is used to set or query device properties. After receiving the properties, the device needs to return the property execution result to the platform in a timely manner. If the device does not return a response, the platform considers that the property delivery times out.

It is used by the platform to proactively obtain or modify the device property value. For example, an app obtains the geographical location of a device at intervals.

Supported

Synchronous

Not supported

MQTT and LwM2M over CoAP

Required

Command delivery

The platform delivers a device control command to a device and the device needs to respond. The response can carry parameters indicating operation success or failure.

  • When the platform delivers a synchronous command, the device needs to return the command execution result within 20 seconds. Otherwise, the command delivery is considered failed.
  • Asynchronous command delivery can cache messages. If a device is offline, data is sent after the device goes online. The maximum cache duration is 48 hours.

It is used for the command that needs to be confirmed immediately. For example, turning on the fan and controlling the street lamp switch.

Not supported

Synchronous

Not supported

MQTT

Required

Asynchronous

Supported

LwM2M/CoAP

It is not suitable to deliver data in JSON format for devices with low configuration and limited resources or with limits on bandwidth usage. In this case, use codecs to convert the JSON format data into binary data on applications.

APIs for Devices Using LwM2M over CoAP