Remote Configuration

Last Updated on : 2022-10-17 07:53:16

This topic describes how to configure parameters remotely for TuyaLink-based devices.

Concepts

Remote configuration: Allows you to create a JSON configuration file on the Tuya IoT Development Platform. You implement the corresponding protocol on a device through integration. With remote configuration enabled, the device can request the configuration file remotely and parse and process data accordingly. You can use this feature to set the system parameters.

Procedure

  1. Create a TuyaLink-based product. For more information, see Product Creation.

  2. Choose Product Configuration > Remote Configuration > Settings.

    Remote Configuration
  3. Create the JSON configuration file, such as system parameters and initial values.

    Remote Configuration
  4. Add and verify integration. On the device side, add the following MQTT topics required to implement the remote configuration.

    • Device sends messages

      A device requests the latest configuration file.

      topic: tylink/${deviceId}/ext/config/get

      {
          "msgId":"45lkj355123****",
          "time":1626197189638,
          "data":{
              "bizType":"PRODUCT_FILE"
          }
      }
      
    • Device receives messages

      A device requests the latest configuration file from the cloud. The cloud returns the URL to the latest configuration file.

      topic: tylink/${deviceId}/ext/config/get_response

      {
          "msgId":"45lkj355123****",
          "time":1626197189638,
          "data":{
              "bizType":"PRODUCT_FILE",
              "pid":"5k8h97qska6p****",
              "fileName": "n2atcfaa_000004d6n7_0.0.8.json",
              "url":"https://tuya-temp-fileupload-1254153901.cos.ap-shanghai.myqcloud.com/iot-platform-tmp/bay1617694935324431vh5n/1631015173bbb14756aa2.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDopcCYgw0qRoyV5qfKjvg2pPkqESnb5zI%26q-sign-time%3D1631015173%3B1631018773%26q-key-time%3D1631015173%3B1631018773%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D4670e7d3cf500f9210a0f2d5bc9e98d6e429****",
              "size": 5165,
              "sha256": "54081B1FD727F2F6533178B7FC18B144177A0E33201D1685BBF0B2E38AB9****",
              "version": "0.0.8", 
              "md5": "74ea6d75f6487049b61a2aa24da2****"  
          }
      }
      

      For more information, see Tuya MQTT Standard Protocol.

Next step

See Product Configuration for multi-language management and device binding.