After you define a Thing Specification Language (TSL) model for a product, the devices of the product can report properties and events to IoT Platform. IoT Platform can send commands to devices to set device properties and invoke services.

A TSL model defines the properties, events, and services of devices. For more information about the data formats for TSL models, see Format of a TSL model.

You can report device data in one of the following formats: Alink JSON and custom. We recommend that you use the Alink JSON format.

  • Alink JSON: the standard data format used by IoT Connectivity Alliance (ICA). A device generates data in the standard format that is defined by IoT Platform, and reports the data to IoT Platform. For more information about the format, see the samples in this topic.
  • Custom: If the custom mode is used, a device sends raw data such as a binary data stream to IoT Platform. IoT Platform runs the script that you have submitted to convert the raw data into the standard format. For more information, see Data parsing scripts. IoT Platform generates data in the Alink JSON format. IoT Platform converts the data into binary data and sends the binary data to devices.TSL model-based pass-through

Report device properties

Upstream data format Request and response topics Request and response data
Custom
  • Request topic: /sys/{productKey}/{deviceName}/thing/model/up_raw
  • Response topic: /sys/{productKey}/{deviceName}/thing/model/up_raw_reply
Raw data that is reported by a device is sent to the request topic.
Note
  • Raw data that is passed through by using MQTT is in the hexadecimal format.
  • The reported data that is passed through must include the method parameter that specifies the request method. Set the value to thing.event.property.post.

Example:

0x00002233441232013fa00000

Sample response:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Alink JSON
  • Request topic: /sys/{productKey}/{deviceName}/thing/event/property/post
  • Response topic: /sys/{productKey}/{deviceName}/thing/event/property/post_reply
Sample request in the Alink JSON format:
{
  "id": "123",
  "version": "1.0",
  "sys":{
      "ack":0
  },
  "params": {
    "Power": {
      "value": "on",
      "time": 1524448722000
    },
    "WF": {
      "value": 23.6,
      "time": 1524448722000
    }
  },
  "method": "thing.event.property.post"
}

Sample response in the Alink JSON format:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Table 1. Request parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
version String The version number of the protocol. Set the value to 1.0.
sys Object The parameter for extended features. The value contains the fields for each feature.
Note If no extended features are configured when you use a device SDK to develop device features, this parameter is unavailable. The extended features use the default configurations.
ack Integer The extended feature field in the sys parameter. This field specifies whether IoT Platform needs to return response data for the registration request. Valid values:
  • 1: indicates that IoT Platform needs to return response data.
  • 0: indicates that IoT Platform does not need to return response data.
Note

If this feature is not configured, this parameter is unavailable. By default, IoT Platform returns response data for a registration request.

method String The request method. Set the value to thing.event.property.post.
params Object The request parameters. In the preceding example, the device reports the Power and WF properties. You can specify the value and time parameters for each property.

If the property to be reported is one of a custom module, enter the property identifier in the format of Module identifier:Property identifier, such as test:Power.

time Long The UTC timestamp that indicates when the property was reported. Unit: milliseconds. This parameter is optional. You can specify a timestamp based on your business requirements. If a device sends messages at a high frequency, we recommend that you specify a timestamp for each message to identify the order in which the messages are sent.
value Object The property value to be reported.
Table 2. Response parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
code Integer The status code that indicates the result. For more information, see Common codes on devices.
Note IoT Platform verifies all the properties that are reported by devices. IoT Platform compares the format of each reported property with the predefined format in the TSL model to verify the validity of the property. If a property is invalid, IoT Platform discards it and returns an error code.
data Object The data that is returned when the request is successful. The value is empty.
Table 3. Error codes
Error code Error message Description
460 request parameter error The error code returned because the request parameters are invalid.
6106 map size must less than 200 The error code returned because the number of reported properties exceeds 200.
6313 tsl service not available

The error code returned because the TSL verification service is unavailable.

IoT Platform verifies properties that are reported by a device based on the defined TSL model.

Only valid properties are retained after the verification. The verification is successful even if all properties are discarded.

If the TSL verification service is unavailable, the error code 6313 is returned.

IoT Platform can forward the properties that are reported by devices to your server or other Alibaba Cloud services by using the server-side subscription or data forwarding feature. For more information about the specific topics and data formats, see Report device properties.

Set device properties

You can call the SetDeviceProperty or SetDevicesProperty operation to send commands that set device properties.

Downstream data format Request and response topics
Custom
  • Request topic: /sys/{productKey}/{deviceName}/thing/model/down_raw
  • Response topic: /sys/{productKey}/{deviceName}/thing/model/down_raw_reply
Alink JSON
  • Request topic: /sys/{productKey}/{deviceName}/thing/service/property/set
  • Response topic: /sys/{productKey}/{deviceName}/thing/service/property/set_reply

Sample request in the Alink JSON format:

{
  "id": "123",
  "version": "1.0",
  "params": {
    "temperature": "30.5"
  },
  "method": "thing.service.property.set"
}
Table 4. Request parameters
Parameter Type Description
id String

The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.

version String The version number of the protocol. Set the value to 1.0.
params Object The properties to set. In the preceding example, { "temperature": "30.5" } indicates that the temperature property is set to 30.5.

If the property to be set is one of a custom module, enter the property identifier in the format of Module identifier:Property identifier, such as { "test:temperature": "30.5" }.

method String The request method. Set the value to thing.service.property.set.

Sample response in the Alink JSON format:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Table 5. Response parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
code Integer The status code that indicates the result. For more information, see Common codes on devices.
data Object The data that is returned when the request is successful. The value is empty.

IoT Platform can forward the property setting results to your server or other Alibaba Cloud services by using the server-side subscription or data forwarding feature. For more information about the specific topics and data formats, see Submit responses to downstream requests.

Report device events

Upstream data format Request and response topics Request and response data
Custom
  • Request topic: /sys/{productKey}/{deviceName}/thing/model/up_raw
  • Response topic: /sys/{productKey}/{deviceName}/thing/model/up_raw_reply
Raw data that is reported by a device is sent to the request topic.
Note The reported data that is passed through must include the method parameter that specifies the request method. For more information, see the description in the following table.

Example:

0xff0000007b00

Sample response:

{
    "id":"123",
    "code":200,
    "data":{}
}
Alink JSON
  • Default module
    • Request topic: /sys/{productKey}/{deviceName}/thing/event/{tsl.event.identifier}/post
    • Response topic: /sys/{productKey}/{deviceName}/thing/event/{tsl.event.identifier}/post_reply
  • Custom module
    • Request topic: /sys/{productKey}/{deviceName}/thing/event/{tsl.functionBlockId}:{tsl.event.identifier}/post
    • Response topic: /sys/{productKey}/{deviceName}/thing/event/{tsl.functionBlockId}:{tsl.event.identifier}/post_reply
Sample request in the Alink JSON format:
{
  "id": "123",
  "version": "1.0",
  "sys":{
      "ack":0
  },
  "params": {
    "value": {
      "Power": "on",
      "WF": "2"
    },
    "time": 1524448722000
  },
  "method": "thing.event.{tsl.event.identifier}.post"
}

Sample response in the Alink JSON format:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Table 6. Request parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
version String The version number of the protocol. Set the value to 1.0.
sys Object The parameter for extended features. The value contains the fields for each feature.
Note If no extended features are configured when you use a device SDK to develop device features, this parameter is unavailable. The extended features use the default configurations.
ack Integer The extended feature field in the sys parameter. This field specifies whether IoT Platform needs to return response data for the registration request. Valid values:
  • 1: indicates that IoT Platform needs to return response data.
  • 0: indicates that IoT Platform does not need to return response data.
Note

If this feature is not configured, this parameter is unavailable. By default, IoT Platform returns response data for a registration request.

method String The request method.
  • Default module

    Set the value to thing.event.{tsl.event.identifier}.

  • Custom module

    Set the value to thing.event.{tsl.functionBlockId}:{tsl.event.identifier}.post.

Note In the preceding values, {tsl.event.identifier} indicates the event identifier that is defined in the TSL model, and {tsl.functionBlockId} indicates the identifier of the custom module. For more information, see Add a TSL feature.
params Object The parameters of the event.
value Object The values of the parameters. Example:
{
   "Power": "on",
   "WF": "2"
}
time Long The UTC timestamp that indicates when the event was generated. Unit: milliseconds.

This parameter is optional. You can specify a timestamp based on your business requirements. If a device sends messages at a high frequency, we recommend that you specify a timestamp for each message to identify the order in which the messages are sent.

Table 7. Response parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
code Integer The status code that indicates the result. For more information, see Common codes on devices.
Note IoT Platform verifies all the events that are reported by devices. IoT Platform compares the format of each reported event with the predefined format in the TSL model to verify the validity of the event. If an event is invalid, IoT Platform discards it and returns an error code.
data Object The data that is returned when the request is successful. The value is empty.

Sample event in the Alink JSON format:

The following example shows the alarm event that is defined in the TSL model of a product:

{
  "schema": "https://iot-tsl.oss-cn-shanghai.aliyuncs.com/schema.json",
  "link": "/sys/${productKey}/airCondition/thing/",
  "profile": {
    "productKey": "${productKey}: Replace it your product key",
    "deviceName": "airCondition: Replace it with your device name"
  },
  "events": [
    {
      "identifier": "alarm",
      "name": "alarm",
      "desc": "Fan alert",
      "type": "alert",
      "required": true,
      "outputData": [
        {
          "identifier": "errorCode",
          "name": "Error code",
          "dataType": {
            "type": "text",
            "specs": {
              "length": "255"
            }
          }
        }
      ],
      "method": "thing.event.alarm.post"
    }
  ]
}

Sample request in the Alink JSON format when a device reports the event:

{
  "id": "123",
  "version": "1.0",
  "params": {
    "value": {
      "errorCode": "error"
    },
    "time": 1524448722000
  },
  "method": "thing.event.alarm.post"
}

IoT Platform can forward the events that are reported by devices to your server or other Alibaba Cloud services by using the server-side subscription or data forwarding feature. For more information about the specific topics and data formats, see Report device events.

Invoke device services in an asynchronous manner

IoT Platform allows you to invoke services in a synchronous or asynchronous manner. When you define a service, you must specify the invocation method for the service. For more information, see Service invocation process in Alink.
  • Synchronous method: You can call the InvokeThingService or InvokeThingsService operation to invoke services. IoT Platform uses the Revert-RPC (RRPC) method to push requests to devices. If the service invocation method is synchronous, IoT Platform subscribes to the RRPC topic. For more information about how to implement RRPC, see What is RRPC?
  • Asynchronous method: You can call the InvokeThingService or InvokeThingsService operation to invoke services. IoT Platform pushes requests to devices in an asynchronous manner, and the devices return results also in an asynchronous manner. If the service invocation method is asynchronous, IoT Platform subscribes to the asynchronous response topic.

    IoT Platform can forward the asynchronous invocation results to your server or other Alibaba Cloud services by using the server-side subscription or data forwarding feature. For more information about the specific topics and data formats, see Submit responses to downstream requests.

Downstream data format Request and response topics
Custom
  • Request topic: /sys/{productKey}/{deviceName}/thing/model/down_raw
  • Response topic: /sys/{productKey}/{deviceName}/thing/model/down_raw_reply
Alink JSON
  • Default module
    • Request topic: /sys/{productKey}/{deviceName}/thing/service/{tsl.service.identifier}
    • Response topic: /sys/{productKey}/{deviceName}/thing/service/{tsl.service.identifier}_reply
  • Custom module
    • Request topic: /sys/{productKey}/{deviceName}/thing/service/{tsl.functionBlockId}:{tsl.service.identifier}
    • Response topic: /sys/{productKey}/{deviceName}/thing/service/{tsl.functionBlockId}:{tsl.service.identifier}_reply

Sample request in the Alink JSON format:

{
  "id": "123",
  "version": "1.0",
  "params": {
    "Power": "on",
    "WF": "2"
  },
  "method": "thing.service.{tsl.service.identifier}"
}
Table 8. Request parameters
Parameter Type Description
id String

The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.

version String The version number of the protocol. Set the value to 1.0.
params Object The parameters that are used to invoke the service. You must specify the identifier and value of the service. Example:
{
   "Power": "on",
   "WF": "2"
}
method String The request method.
  • Default module

    Set the value to thing.service.{tsl.service.identifier}.

  • Custom module

    Set the value to thing.service.{tsl.functionBlockId}:{tsl.service.identifier}.

Note In the preceding values, {tsl.service.identifier} indicates the service identifier that is defined in the TSL model, and {tsl.functionBlockId} indicates the identifier of the custom module. For more information, see Add a TSL feature.

Sample response in the Alink JSON format:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Table 9. Response parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
code Integer The status code that indicates the result. For more information, see Common codes on devices.
data Object The response data.

The value of the data parameter is determined by the TSL model of the product. If the service does not return a response, the value of the data parameter is empty. If the service returns a response, the returned data follows the service definition in the TSL model.

Sample service in the Alink JSON format:

The following example shows the SetWeight service that is defined in the TSL model of a product:

{
  "schema": "https://iotx-tsl.oss-ap-southeast-1.aliyuncs.com/schema.json",
  "profile": {
    "productKey": "testProduct01"
  },
  "services": [
    {
      "outputData": [
        {
          "identifier": "OldWeight",
          "dataType": {
            "specs": {
              "unit": "kg",
              "min": "0",
              "max": "200",
              "step": "1"
            },
            "type": "double"
          },
          "name": "OldWeight"
        },
        {
          "identifier": "CollectTime",
          "dataType": {
            "specs": {
              "length": "2048"
            },
            "type": "text"
          },
          "name": "CollectTime"
        }
      ],
      "identifier": "SetWeight",
      "inputData": [
        {
          "identifier": "NewWeight",
          "dataType": {
            "specs": {
              "unit": "kg",
              "min": "0",
              "max": "200",
              "step": "1"
            },
            "type": "double"
          },
          "name": "NewWeight"
        }
      ],
      "method": "thing.service.SetWeight",
      "name": "Set weight",
      "required": false,
      "callType": "async"
    }
  ]
}

Sample request in the Alink JSON format when IoT Platform invokes the service:

{
  "method": "thing.service.SetWeight",
  "id": "105917531",
  "params": {
    "NewWeight": 100.8
  },
  "version": "1.0"
}

Sample response in the Alink JSON format:

{
  "id": "105917531",
  "code": 200,
  "data": {
    "CollectTime": "1536228947682",
    "OldWeight": 100.101
  }
}

Report multiple properties and events at a time from a gateway

A gateway can report multiple properties and events at a time. A gateway can report its own properties and events and the properties and events of sub-devices that are attached to the gateway.

Note
  • A gateway can report a maximum of 200 properties and 20 events at a time.
  • A gateway can report the data of a maximum of 20 sub-devices at a time.
Upstream data format Request and response topics Request and response data
Custom
  • Request topic: /sys/{productKey}/{deviceName}/thing/model/up_raw
  • Response topic: /sys/{productKey}/{deviceName}/thing/model/up_raw_reply
Raw data that is reported by a device is sent to the request topic.
Note The reported data that is passed through must include the method parameter that specifies the request method. Set the value to thing.event.property.pack.post.

Example:

0xff0000007b00

Sample response:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Alink JSON
  • Request topic: /sys/{productKey}/{deviceName}/thing/event/property/pack/post
  • Response topic: /sys/{productKey}/{deviceName}/thing/event/property/pack/post_reply
Sample request in the Alink JSON format:
{
  "id": "123",
  "version": "1.0",
  "sys":{
      "ack":0
  },
  "params": {
    "properties": {
      "Power": {
        "value": "on",
        "time": 1524448722000
      },
      "WF": {
        "value": { },
        "time": 1524448722000
      }
    },
    "events": {
      "alarmEvent1": {
        "value": {
          "param1": "on",
          "param2": "2"
        },
        "time": 1524448722000
      },
      "alertEvent2": {
        "value": {
          "param1": "on",
          "param2": "2"
        },
        "time": 1524448722000
      }
    },
    "subDevices": [
      {
        "identity": {
          "productKey": "",
          "deviceName": ""
        },
        "properties": {
          "Power": {
            "value": "on",
            "time": 1524448722000
          },
          "WF": {
            "value": { },
            "time": 1524448722000
          }
        },
        "events": {
          "alarmEvent1": {
            "value": {
              "param1": "on",
              "param2": "2"
            },
            "time": 1524448722000
          },
          "alertEvent2": {
            "value": {
              "param1": "on",
              "param2": "2"
            },
            "time": 1524448722000
          }
        }
      }
    ]
  },
  "method": "thing.event.property.pack.post"
}

Sample response in the Alink JSON format:

{
  "id": "123",
  "code": 200,
  "data": {}
}
Table 10. Request parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
version String The version number of the protocol. Set the value to 1.0.
sys Object The parameter for extended features. The value contains the fields for each feature.
Note If no extended features are configured when you use a device SDK to develop device features, this parameter is unavailable. The extended features use the default configurations.
ack Integer The extended feature field in the sys parameter. This field specifies whether IoT Platform needs to return response data for the registration request. Valid values:
  • 1: indicates that IoT Platform needs to return response data.
  • 0: indicates that IoT Platform does not need to return response data.
Note

If this feature is not configured, this parameter is unavailable. By default, IoT Platform returns response data for a registration request.

params Object The request parameters.
properties Object The properties to be reported. You can specify the identifier, value, and time parameters for each property.

The time parameter is optional. You can specify a timestamp based on your business requirements. If a device sends messages at a high frequency, we recommend that you specify a timestamp for each message to identify the order in which the messages are sent.

If the property to be reported is one of a custom module, enter the property identifier in the format of Module identifier:Property identifier, such as test:Power.

events Object The events to be reported. You can specify the identifier, value, and time parameters for each event.

The time parameter is optional. You can specify a timestamp based on your business requirements. If a device sends messages at a high frequency, we recommend that you specify a timestamp for each message to identify the order in which the messages are sent.

If the event to be reported is one of a custom module, enter the event identifier in the format of Module identifier:Event identifier, such as test:alarmEvent1.

subDevices Object The sub-device information.
productKey String The key of the product to which the sub-device belongs.
deviceName String The name of the sub-device.
method String The request method. Set the value to thing.event.property.pack.post.
Table 11. Response parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
code Integer The status code that indicates the result. A value of 200 indicates a successful request.
Note IoT Platform checks whether devices, topological relationships, reported properties, and reported events follow the definition of the TSL model for a product. If one of the preceding items cannot pass the verification, devices fail to report data.
data Object The data that is returned when the request is successful. The value is empty.

Report the historical data of a TSL model

The following topics are used when a device sends requests to IoT Platform and IoT Platform sends responses to the device:

  • Request topic: /sys/{productKey}/{deviceName}/thing/event/property/history/post
  • Response topic: /sys/{productKey}/{deviceName}/thing/event/property/history/post_reply

Sample request in the Alink JSON format:

{
  "id": 123, 
  "version": "1.0",
  "sys":{
      "ack":0
  }, 
  "method": "thing.event.property.history.post", 
  "params": [
    {
      "identity": {
        "productKey": "", 
        "deviceName": ""
      }, 
      "properties": [
        {
          "Power": {
            "value": "on", 
            "time": 1524448722000
          }, 
          "WF": {
            "value": "3", 
            "time": 1524448722000
          }
        }, 
        {
          "Power": {
            "value": "on", 
            "time": 1524448722000
          }, 
          "WF": {
            "value": "3", 
            "time": 1524448722000
          }
        }
      ], 
      "events": [
        {
          "alarmEvent": {
            "value": {
              "Power": "on", 
              "WF": "2"
            }, 
            "time": 1524448722000
          }, 
          "alertEvent": {
            "value": {
              "Power": "off", 
              "WF": "3"
            }, 
            "time": 1524448722000
          }
        }
      ]
    }, 
    {
      "identity": {
        "productKey": "", 
        "deviceName": ""
      }, 
      "properties": [
        {
          "Power": {
            "value": "on", 
            "time": 1524448722000
          }, 
          "WF": {
            "value": "3", 
            "time": 1524448722000
          }
        }
      ], 
      "events": [
        {
          "alarmEvent": {
            "value": {
              "Power": "on", 
              "WF": "2"
            }, 
            "time": 1524448722000
          }, 
          "alertEvent": {
            "value": {
              "Power": "off", 
              "WF": "3"
            }, 
            "time": 1524448722000
          }
        }
      ]
    }
  ]
}
Table 12. Request parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
version String The version number of the protocol. Set the value to 1.0.
sys Object The parameter for extended features. The value contains the fields for each feature.
Note If no extended features are configured when you use a device SDK to develop device features, this parameter is unavailable. The extended features use the default configurations.
ack Integer The extended feature field in the sys parameter. This field specifies whether IoT Platform needs to return response data for the registration request. Valid values:
  • 1: indicates that IoT Platform needs to return response data.
  • 0: indicates that IoT Platform does not need to return response data.
Note

If this feature is not configured, this parameter is unavailable. By default, IoT Platform returns response data for a registration request.

method String The request method. Set the value to thing.event.property.history.post.
params Object The request parameters.
identity String The certificate information of the device to which the historical data belongs. You must specify the productKey and deviceName parameters.
Note A directly connected device can report only the historical data of its own TSL model. A gateway can report the historical data of the TSL model for sub-devices that are attached to the gateway. If a gateway reports the historical data of a sub-device, the identity parameter includes the sub-device information.
properties Object The properties to be reported. You can specify the identifier, value, and time parameters for each property.

If the property to be reported is one of a custom module, enter the property identifier in the format of Module identifier:Property identifier, such as test:Power.

events Object The events to be reported. You can specify the identifier, value, and time parameters for each event.

If the event to be reported is one of a custom module, enter the event identifier in the format of Module identifier:Event identifier, such as test:alarmEvent1.

Sample response in the Alink JSON format:

{
    "id":"123",
    "code":200,
    "data":{}
}

IoT Platform can forward the historical TSL model data that is reported by devices to your server or other Alibaba Cloud services by using the server-side subscription or data forwarding feature. For more information about the specific topics and data formats, see Format of historical data for a TSL model.

Report multiple properties and events at a time from a device

The following topics are used when a device sends requests to IoT Platform and IoT Platform sends responses to the device:

  • Request topic: /sys/{productKey}/{deviceName}/thing/event/property/batch/post
  • Response topic: /sys/{productKey}/{deviceName}/thing/event/property/batch/post_reply

Sample request in the Alink JSON format:

{
  "id": 123, 
  "version": "1.0",
  "sys":{
      "ack":0
  }, 
  "method": "thing.event.property.batch.post", 
  "params": {
    "properties": {
          "Power": [{
                "value": "on", 
                "time": 1524448722000
            },
                {
                "value": "off", 
                "time": 1524448722001
            }
          ], 
          "WF": [{
                "value": 3, 
                "time": 1524448722000
                },
            {
                "value": 4, 
                "time": 1524448722009
            }
          ]
      }, 
      "events": {
          "alarmEvent": [{
              "value": {
                "Power": "on", 
                "WF": "2"
              }, 
              "time": 1524448722000
          },
          {
              "value": {
                "Power": "on", 
                "WF": "2"
              }, 
              "time": 1524448722000
          }
         ]
     }
}
Table 13. Request parameters
Parameter Type Description
id String The ID of the message. Valid values: 0 to 4294967295. Each message ID must be unique for the device.
version String The version number of the protocol. Set the value to 1.0.
sys Object The parameter for extended features. The value contains the fields for each feature.
Note If no extended features are configured when you use a device SDK to develop device features, this parameter is unavailable. The extended features use the default configurations.
ack Integer The extended feature field in the sys parameter. This field specifies whether IoT Platform needs to return response data for the registration request. Valid values:
  • 1: indicates that IoT Platform needs to return response data.
  • 0: indicates that IoT Platform does not need to return response data.
Note

If this feature is not configured, this parameter is unavailable. By default, IoT Platform returns response data for a registration request.

method String The request method. Set the value to thing.event.property.batch.post.
params Object The request parameters.
properties Object The properties to be reported. You can specify the identifier, value, and time parameters for each property.

If the property to be reported is one of a custom module, enter the property identifier in the format of Module identifier:Property identifier, such as test:Power.

events Object The events to be reported. You can specify the identifier, value, and time parameters for each event.

If the event to be reported is one of a custom module, enter the event identifier in the format of Module identifier:Event identifier, such as test:alarmEvent1.

Sample response in the Alink JSON format:

{
    "id":"123",
    "code":200,
    "data":{}
}

IoT Platform can forward the TSL model data that is reported by devices to your server or other Alibaba Cloud services by using the server-side subscription or data forwarding feature. Properties and events are forwarded in two separate messages. For more information about the specific topics and data formats, see Submit device properties and Submit device events.