Updated on 2022-02-24 GMT+08:00

Product Models

Description

A product model (also called profile file) describes the capabilities and features of a device. Developers build an abstract model of a device by defining a profile file on the IoT platform so that the IoT platform can understand the services, properties, and commands supported by the device, such as color and switch.

A profile file consists of product information, service capabilities, and maintenance capabilities. The quintuple of the product information uniquely defines a device type. After defining a product model, you can select the imported product during device registration.

Figure 1 Profile file structure
You can import a product model in either of the following ways:
  • Import from the Product Center. Define a product model in the Developer Center and release it to the Product Center.
    NOTE:

    If binary code stream is selected as the data format during the definition of a profile file in the Developer Center, you must also develop a codec plug-in online.

  • Import from your local PC. Develop a product model offline and import it by uploading the product package.
    NOTE:

    The product model imported from your local PC does not contain the codec plug-in. If devices report binary code streams, contact the IoT platform operations administrator to upload the codec plug-in.

  • Manually create a product model. A manually created product does not contain a profile file. This operation applies to the scenario in which LWM2M is used for device access. The IoT platform automatically generates a product model (profile file) based on the ObjectID and ResourceID carried by the device.

Prerequisites

  • In the case of import from the Product Center, the product model has been defined and released to the Product Center.
  • In the case of import from your local PC, the profile file has been created.

Procedure

  1. Choose Product Models, and click Add.
  2. Import the product model from the Product Center or local PC.

    • Import from the Product Center.
      1. Choose Import from Product Center to open the Product Center page.
      2. Search for a product by product name, device type, or manufacturer name. In the search result, click the name of the product to be imported.
      3. Check whether the product is a public product.
        • For a public product, you can click Import to import the product model from the Product Center to the IoT platform.
        • For a private product, you must enter the verification code obtained from the Product Center. If the verification is successful, you can view the product details and import the product model to the IoT platform.
    • Import from your local PC.
      1. Choose Import from Local.
      2. In the dialog box displayed, enter the product name and upload the resource file.
      3. Click Confirm and wait until the import is complete.
      NOTE:

      The product ID and product key are used for device registration. Click Save to Local to save the product key. The product key is not displayed on the product model details page. Keep it secure.

  3. View the import result on the Product Models page.

    • Import failure: You can view the cause of the import failure in the Failure Cause area. This helps with fault locating.
    • Import success: You can click Details to view product model details.

      NOTE:

      You can delete a disused product from the product list by clicking Delete. After deletion, the devices of this product cannot be used. The functions of the devices under the product are restored only after the product is imported to the Product Center again.