A product indicates a set of devices that have the same features. After you create a product, you must create devices for the product and obtain the device certificates. You can create one or more devices at a time.This topic describes how to create multiple devices at a time.

Procedure

  1. Log on to the IoT Platform console.
  2. On the Overview page, select an environment, find the instance that you want to manage, and click the instance ID or instance name.
    Important This step is required only if Enterprise Edition instances are available. If the Enterprise Edition instances are unavailable in the region that you selected, skip this step. For information about supported regions and instances, see Overview.
    Overview
  3. In the left-side navigation pane, choose Devices > Devices.
  4. On the Devices page, click Batch Add.
  5. Select a product. Each new device derives the features and properties of the product.
    Important If a product is associated with other platforms, make sure that your account has a sufficient quota of activated devices.
    Create multiple devices at a time
  6. Select a method to specify DeviceNames.
    • Auto Generate: You do not need to specify DeviceNames for devices. After you specify the number of devices, IoT Platform generates a DeviceName for each device. Each DeviceName consists of random letters and digits.
    • Batch Upload: You must specify a DeviceName for each device. Click Download.csv Template to download a template, specify DeviceNames and aliases in the template, and then upload the template to the IoT Platform console. Example of batch upload
      Important
      • The first row cannot be modified. You must enter information from Cell A2.
      • Each DeviceName must be 4 to 32 characters in length and can contain letters, digits, hyphens (-), underscores (_), at signs (@), periods (.),and colons (:).Each DeviceName must be unique within the product.
      • The Nickname parameter specifies an alias. This parameter is optional.The name must be 4 to 64 characters in length, and can contain letters, digits, and underscores (_).
      • Each template file can contain up to 10,000 device records. The maximum size of a template file is 2 MB.
  7. Click OK.
    If a template file contains one or more invalid DeviceNames or aliases, an error occurs. You can click Download Invalid Device Name List to download the file that contains invalid DeviceNames or aliases. Modify the invalid DeviceNames or aliases in the file based on the naming rules and then reupload the file.
  8. After the devices are created, click Download Device Certificate to download the certificates of the devices. You can burn the certificates on the devices.

    A device certificate consists of a ProductKey, a DeviceName, and a DeviceSecret. A device certificate is the credential that a device uses to communicate with IoT Platform. We recommend that you keep your device certificates confidential.

    ParameterDescription
    ProductKeyThe ProductKey of the product to which the device belongs. The ProductKey is the GUID that is issued by IoT Platform to the product.
    DeviceNameThe DeviceName of the device, which is the unique identifier of the device within the product. A combination of the DeviceName and ProductKey is used as the device identifier. IoT Platform authenticates the device and communicates with the device based on the device identifier.
    DeviceSecretThe DeviceSecret of the device, which is issued by IoT Platform for device authentication and encryption. The DeviceSecret must be used in combination with the DeviceName.

Result

The devices are created. You can view the information about the devices and download the certificates of the devices on the Batch Management tab of the Devices page.
  • To view the details of the devices, find the batch of the devices and click Details in the Actions column. The details include the number of devices that are created in the batch and the list of the devices. The device certificates and status are displayed in the device list.

    If specific devices failed to be created in the batch, the error codes and failure causes are displayed in the device list. The following table describes the error codes.

    Error codeError messageDescription
    460duplicated deviceNameDuplicate DeviceNames exist.
    invalid deviceNameThe DeviceName is invalid.
    6251device existThe device already exists.
    6760insufficient activation codeThe activation code is invalid.
    64003device creation is failedFailed to create the device.
    6293device has been distributedThe device is distributed.
  • To download the certificates of the devices, click DownloadCSV.

What to do next

You can view the device information. For more information, see View device information.

After you create a device, the device is in the Inactive state. To activate the device, you must develop a device SDK to connect the device to IoT Platform. For more information, see Download device SDKs. Inactive

For information about how to connect a device to IoT Platform, see the following articles:

Related API operations

BatchRegisterDevice: registers multiple devices at a time.