Remote Configuration
Describes the topics and Alink data formats for device-initiated configuration requests and IoT Platform configuration pushes.
Step-by-step usage instructions are in the Remote Configuration user guide.
Device configuration requests
Uplink
- Request topic:
/sys/${productKey}/${deviceName}/thing/config/get - Response topic:
/sys/${productKey}/${deviceName}/thing/config/get_reply
Alink request data format
{
"id": 123,
"version": "1.0",
"sys":{
"ack":0
},
"params": {
"configScope": "product",
"getType": "file"
},
"method": "thing.config.get"
}
Alink response data format
{
"id": "123",
"version": "1.0",
"code": 200,
"data": {
"configId": "123dagdah",
"configSize": 1234565,
"sign": "123214adfadgadg",
"signMethod": "Sha256",
"url": "https://iotx-config.oss-cn-shanghai.aliyuncs.com/nopoll_0.4.4.tar.gz?Expires=1502955804&OSSAccessKeyId=XXXXXXXXXXXXXXXXXXXX&Signature=XfgJu7P6DWWejstKJgXJEH0qAKU%3D&security-token=CAISuQJ1q6Ft5B2yfSjIpK6MGsyN1Jx5jo6mVnfBglIPTvlvt5D50Tz2IHtIf3NpAusdsv03nWxT7v4flqFyTINVAEvYZJOPKGrGR0DzDbDasumZsJbo4f%2FMQBqEaXPS2MvVfJ%2BzLrf0ceusbFbpjzJ6xaCAGxypQ12iN%2B%2Fr6%2F5gdc9FcQSkL0B8ZrFsKxBltdUROFbIKP%2BpKWSKuGfLC1dysQcO1wEP4K%2BkkMqH8Uic3h%2Boy%2BgJt8H2PpHhd9NhXuV2WMzn2%2FdtJOiTknxR7ARasaBqhelc4zqA%2FPPlWgAKvkXba7aIoo01fV4jN5JXQfAU8KLO8tRjofHWmojNzBJAAPpYSSy3Rvr7m5efQrrybY1lLO6iZy%2BVio2VSZDxshI5Z3McKARWct06MWV9ABA2TTXXOi40BOxuq%2B3JGoABXC54TOlo7%2F1wTLTsCUqzzeIiXVOK8CfNOkfTucMGHkeYeCdFkm%2FkADhXAnrnGf5a4FbmKMQph2cKsr8y8UfWLC6IzvJsClXTnbJBMeuWIqo5zIynS1pm7gf%2F9N3hVc6%2BEeIk0xfl2tycsUpbL2FoaGk6BAF8hWSWYUXsv59d5Uk%3D",
"getType": "file"
}
}
Parameters
| Parameter | Type | Description |
| id | String | The message ID. A unique numeric string per device in the range 0 to 4294967295. |
| version | String | The protocol version. Set to 1.0. |
|
sys |
Object |
Parameters for extended features. It contains fields for different features. Note If you use a device-side software development kit (SDK) for development and do not set extended features, this parameter is not included. The related features use default configurations. |
|
ack |
Integer |
An extended feature field under sys. It specifies whether to return a response.
Important For information about how to configure this feature, see Thing Specification Language model usage examples. If this feature is not configured, this parameter is not included. The cloud returns a response by default. |
| configScope | String | The configuration scope. Only product-level is supported. Set to product. |
| getType | String | The configuration type. Only file is supported. Set to file. |
| method | String | The request method. Set to thing.config.get. |
| configId | String | The ID of the configuration file. |
| configSize | Long | The configuration file size, in bytes. |
| sign | String | The signature. |
| signMethod | String | The signing method. Only Sha256 is supported. |
| url | String | The OSS URL of the configuration file. |
| code | Integer | The result code. 200 indicates success. Other codes are listed in Device-side general codes. |
Error codes
| Error code | Message | Description |
| 6713 | thing config function is not available | Remote Configuration is not enabled for the product. In the IoT Platform console and enable it. |
| 6710 | no data | No configuration data exists. |
Configuration push
Downlink
- Request topic:
/sys/${productKey}/${deviceName}/thing/config/push - Response topic:
/sys/${productKey}/${deviceName}/thing/config/push_reply
After a device subscribes to this topic, IoT Platform asynchronously pushes configuration information when you perform a batch push in the console.
Alink request data format
{
"id": "123",
"version": "1.0",
"params": {
"configId": "123dagdah",
"configSize": 1234565,
"sign": "123214adfadgadg",
"signMethod": "Sha256",
"url": "https://iotx-config.oss-cn-shanghai.aliyuncs.com/nopoll_0.4.4.tar.gz?Expires=1502955804&OSSAccessKeyId=XXXXXXXXXXXXXXXXXXXX&Signature=XfgJu7P6DWWejstKJgXJEH0qAKU%3D&security-token=CAISuQJ1q6Ft5B2yfSjIpK6MGsyN1Jx5jo6mVnfBglIPTvlvt5D50Tz2IHtIf3NpAusdsv03nWxT7v4flqFyTINVAEvYZJOPKGrGR0DzDbDasumZsJbo4f%2FMQBqEaXPS2MvVfJ%2BzLrf0ceusbFbpjzJ6xaCAGxypQ12iN%2B%2Fr6%2F5gdc9FcQSkL0B8ZrFsKxBltdUROFbIKP%2BpKWSKuGfLC1dysQcO1wEP4K%2BkkMqH8Uic3h%2Boy%2BgJt8H2PpHhd9NhXuV2WMzn2%2FdtJOiTknxR7ARasaBqhelc4zqA%2FPPlWgAKvkXba7aIoo01fV4jN5JXQfAU8KLO8tRjofHWmojNzBJAAPpYSSy3Rvr7m5efQrrybY1lLO6iZy%2BVio2VSZDxshI5Z3McKARWct06MWV9ABA2TTXXOi40BOxuq%2B3JGoABXC54TOlo7%2F1wTLTsCUqzzeIiXVOK8CfNOkfTucMGHkeYeCdFkm%2FkADhXAnrnGf5a4FbmKMQph2cKsr8y8UfWLC6IzvJsClXTnbJBMeuWIqo5zIynS1pm7gf%2F9N3hVc6%2BEeIk0xfl2tycsUpbL2FoaGk6BAF8hWSWYUXsv59d5Uk%3D",
"getType": "file"
},
"method": "thing.config.push"
}
Alink response data format
{
"id": "123",
"code": 200,
"data": {}
}
Parameters
| Parameter | Type | Description |
| id | String |
The message ID. A unique numeric string per device in the range 0 to 4294967295. |
| version | String | The protocol version. Set to 1.0. |
| configScope | String | The configuration scope. Only product-level is supported. Set to product. |
| getType | String | The configuration type. Only file is supported. Set to file. |
| configId | String | The ID of the configuration. |
| configSize | Long | The configuration size, in bytes. |
| sign | String | The signature. |
| signMethod | String | The signing method. Only sha256 is supported. |
| url | String | The OSS URL of the configuration file. |
| method | String | The request method. Set to thing.config.push. |
| code | Integer | The result code. Possible values are listed in Device-side general codes. |
Use the data forwarding feature of the rules engine to forward device responses to other topics and Alibaba Cloud services. Response topics and formats are covered in Data forwarding for device responses to downlink instructions.