Devices
IoT Studio provides device management services for your projects, including viewing device lists, adding devices, editing basic information, associating or disassociating devices from IoT Platform, and deleting devices.
Prerequisites
A product has been created in the current project, or a product from IoT Platform has been associated with the project. For more information, see Products.
Background information
You can simplify project management by associating products or devices from IoT Platform with your IoT Studio projects, or by creating them directly within IoT Studio. Products and devices created in IoT Studio are automatically synchronized with IoT Platform.
Limitations
-
A global project only supports adding devices. You cannot manually associate existing devices from IoT Platform.
-
You can associate a device with a project only if the device's product is also associated with the project.
-
A device can be associated with a maximum of 10 projects.
View device information
-
If you have not yet created or associated any devices, you need to do so first. For more information, see the following sections.
-
To view information for devices that you have already created in the current project or synchronized from an associated product, follow these steps.
-
On the Project Management page, click global project or find your target project in the common project list and click its card.
-
On the project page, click Devices in the navigation pane on the left.
-
Above the device list, you can view device statistics for all products in the current project. You can also select a specific product from the drop-down list in the upper-left corner of the device list to view its device statistics.
-
Total Devices: The total number of devices in the project, or the number of devices under a specific product.
-
Activated Devices: The number of activated devices in the project, or the number of activated devices under a specific product.
-
Currently Online: The number of online devices in the project, or the number of online devices under a specific product.
NoteA device is considered activated after it connects to IoT Platform for the first time. An activated device is not necessarily online; it can be offline or in another state. An online device is a device that is currently connected.
-
-
If you have created devices or associated devices from a product in the Device Management service of the IoT Platform console, the Device List tab displays these devices.
-
You can search for a specific device by its device name, nickname, or tag. Fuzzy search is supported.
-
In the Operations column for a device, click View to open the device details page. The details page includes information such as Device information, Topic list, TSL model data, device shadow, File management, and Groups. For more information, see View device information.
-
Create a device
-
On the Devices page, click Add Device.
-
In the Add Device dialog box, enter the device information and click Confirm.
Device information includes Product (select an existing product, such as test1119), DeviceName (for example, Device1; if left empty, Alibaba Cloud assigns a globally unique identifier as its DeviceName), and Nickname (for example, Test device).
After the device is created, the View device certificate dialog box appears automatically. You can view and copy the device certificate information.
Once created, the device's status is inactive. To develop and activate your device, connect it to IoT Platform by following the Device Connection Guide.
For more information about creating devices, see Create a device.
Associate a device with a common project
If you have a device in the Device Management service of IoT Platform, you can import it into a common project, which allows applications developed in that project to access the device.
-
On the Devices page, click Associate IoT Platform Device in the upper-left corner.
-
In the Associate Device panel, select the devices you want to associate.
The device library contains all devices from IoT Platform. You can find the target device by selecting a specific product or searching by its DeviceName or nickname.
Note-
Devices that are not associated with a product are grayed out and cannot be selected.
-
Devices that are already associated are marked with a gray check mark and cannot be selected.
-
The device list contains all devices from IoT Platform. If a device is already associated with 10 projects, it cannot be associated with another project.
After you select the target devices, click OK to complete the association.
-
-
Click OK.
The associated devices now appear in the device list on the project's Devices page.
Edit device information
-
In the device list, find the target device and click View in the Operations column to go to the Device Details page.
-
On the Device Details page, click Edit next to the Nickname or in the Tag information section to modify the device's nickname or tags. For more information, see Device tags.
You can only edit information for devices that are under development. If a device has been released, all its information is frozen and cannot be modified.
Disassociate a device from a project
A device can be associated with up to 10 projects. If a device is no longer required for a project, you can disassociate it.
-
Disassociating a product and disassociating a device from a project are independent operations; one does not affect the other.
-
The global project does not support disassociating devices.
You can choose one of the following methods to disassociate a device based on your requirements:
By device
-
In the device list, find the target device and click Disassociate in the Operations column.
You can find the device by selecting a specific product or searching by its DeviceName, nickname, or tag.
-
In the pop-up, click Unbind to unbind the device from the project. In the confirmation dialog box that appears, confirm the message "Unbinding a product and a device are independent operations and do not affect each other", and then click Unbind.
In bulk
-
In the device list, select the checkboxes for the devices you want to disassociate.
You can find the devices by selecting a specific product or searching by DeviceName, nickname, or tag.
-
Below the device list, click Disassociate.
-
In the confirmation pop-up, click OK.
By product
-
Above the device list, use the product drop-down list to select the target product.
-
Below the device list, click Disassociate All Devices in This Product.
In the confirmation dialog box that appears, review the information and click OK to disassociate all devices under that product from the project.
-
In the final confirmation pop-up, click OK to complete the process.
Delete a device
-
Deleting a device also deletes its data on IoT Platform. This can cause data errors in applications in other projects that use the device. Proceed with caution.
-
A deleted device cannot be recovered. Proceed with caution.
You can find the device to delete by selecting a specific product or searching by its DeviceName, nickname, or tag.
-
Delete a single device: In the Operations column for the device, click Delete, and then click Confirm.
-
Delete devices in bulk: Select the checkboxes for multiple devices, click Delete below the device list, and then click Confirm.
Disable or enable a device
This feature is available only in a global project. To disable or enable devices in a common project, you must use the IoT Platform console. For more information, see Disable and enable a device.
-
Disable: Prevents a device from connecting to IoT Platform.
After a device is disabled, its associated information is retained in IoT Platform. However, the device cannot connect to IoT Platform, and you cannot perform any operations on it.
-
Enable: Allows a previously disabled device to reconnect to IoT Platform.
Follow these steps to disable or enable a device:
-
In the device list, select the checkboxes for one or more devices.
You can find the devices by selecting a specific product or searching by DeviceName, nickname, or tag.
-
Below the device list, click Disable or Enable.
-
Click Confirm.