All Products
Search
Document Center

IoT Platform:Create a device

Last Updated:Oct 22, 2023

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 a device.

Prerequisites

A product is created. For more information, see Create a product.

Procedure

  1. Log on to the IoT Platform console.

  2. On the Overview page, click All environment. On the All environment tab, find the instance that you want to manage and click the instance ID or instance name.

  3. In the left-side navigation pane, choose Devices > Devices.

  4. On the Devices page, click Add Device.

  5. In the Add Device dialog box, configure the parameters and click OK.

    物联网平台设备

    Parameter

    Description

    Product

    The product within which you want to create the device. The device to be created inherits the features and properties of the selected product.

    Important

    If the product is associated with other platforms, make sure that your account has a sufficient quota of activation codes to create devices.

    DeviceName

    The DeviceName of the device. The DeviceName must be unique within the product. The DeviceName must be 4 to 32 characters in length, and can contain letters, digits, hyphens (-), underscores (_), at signs (@), periods (.), and colons (:).

    Note

    You can leave this parameter empty. If you do not configure this parameter, IoT Platform generates a GUID as the DeviceName.

    Alias

    The alias of the device. The alias must be 4 to 64 characters in length, and can contain letters, digits, and underscores (_).

Results

After the device is created, the The devices have been added. dialog box appears. In this dialog box, you can view and copy the device certificate information. 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.

Parameter

Description

ProductKey

The ProductKey of the product to which the device belongs. The ProductKey is the GUID that is issued by IoT Platform to the product.

DeviceName

The 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.

DeviceSecret

The 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.

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 use a device SDK to connect the device to IoT Platform. For more information, see Use a device SDK to connect a device to IoT Platform.设备未激活

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

Related API operations

RegisterDevice: registers a device within a product.