Device groups
IoT Platform provides a device grouping feature that lets you classify devices across different products. You can group devices based on specific rules or characteristics, such as function or geographic location. This feature enables unified management and control, which improves management efficiency and device utilization. This topic describes the scenarios for using device groups and explains how to create and manage groups and the devices they contain.
Scenarios
You can group devices based on different dimensions, such as:
Function
Group devices based on their features. For example, you can group all camera devices into one group and all sensor devices into another.
Location
Group devices based on their geographic location. For example, you can group devices located in the same region or building to facilitate the management and monitoring of that area.
Purpose
Group devices based on their business purpose. For example, you can group all security devices into one group and all production devices into another.
Business process
Group devices based on their role in a business process. For example, you can group all input devices into one group and all output devices into another.
After you group devices, you can use the groups in various IoT Platform services:
Querying devices managed by groups: You can query device information for different groups in the IoT Platform console or by calling a cloud API. For more information, see View group information and Related API operations in this topic.
Data services: You can use data from the device group table and the device group relationship table.
SQL Analysis: Use the data as a query object for SQL analysis tasks to further use and analyze device data.
Offline data integration (DataWorks+MaxCompute): You can use DataWorks to integrate data into MaxCompute to build a data warehouse and improve the efficiency of data applications.
Monitoring and Operations and Maintenance (O&M): You can select devices for O&M operations by group.
over-the-air (OTA) update: When you create a batch OTA update task, you can choose to upgrade by device group.
Device tasks: When you create tasks for device property settings, service invocations, batch message sending, and custom tasks, you can select task objects by device group.
Limits
Device groups are categorized as static or dynamic. The usage and limits are as follows.
Static groups
You first create a group, and then manually add or remove devices from it.
Static groups support subgroups and can be nested up to three levels: Parent group > Level-1 subgroup > Level-2 subgroup.
Each Alibaba Cloud account can have a maximum of 1,000 groups, including all parent groups and subgroups.
A parent group can have a maximum of 100 level-1 subgroups.
A subgroup can belong to only one parent group.
The nested relationship of a group cannot be modified after it is created. To change the relationship, you must delete the group and then recreate it.
You cannot directly delete a group that contains subgroups. You must delete all subgroups before you can delete the parent group.
Fuzzy search by group name is supported in group and subgroup lists.
Dynamic groups
When you create a dynamic group, you configure conditional rules to dynamically match and add qualifying devices to the group. You cannot manually add or remove devices from a dynamic group.
Currently, only Enterprise Edition instances and new public instances in the China (Shanghai) region support dynamic groups.
Dynamic groups are parent groups by default and do not support subgroups.
Each Alibaba Cloud account can have a maximum of 10 dynamic groups.
When you first create a dynamic group and configure its rules, the rules can match a maximum of 100,000 devices. After the group is created, there is no limit on the number of devices that can be added incrementally.
After a dynamic group is created, its dynamic rules cannot be modified.
Create a static group
Log on to the IoT Platform console.
On the Overview page, find the instance that you want to manage and click the instance ID or instance name.
In the navigation pane on the left, choose . The Groups page appears.
Click Create Group. In the dialog box that appears, set the parameters and click OK.
Parameter
Description
Group Type
Select Default. This parameter is displayed only for Enterprise instances in the China (Shanghai) region.
Parent Group
Select a parent group.
Click Group. The group that you create is a parent group.
Click a specific group under Group: Create a subgroup under the selected group.
Group Name
Specify a name for the group. The group name can contain Chinese characters, English letters, Japanese characters, digits, and underscores (_). The name must be 4 to 30 characters long, and each Chinese or Japanese character counts as two characters.
ImportantThe group name must be unique within your Alibaba Cloud account and cannot be modified after it is created.
Group Description
Enter a description for the group.
After you create a group, you can manage devices and subgroups on the Group Details page. For more information, see Managing devices in a group and Managing static group subgroups.
Create Dynamic Group
In the navigation pane on the left for your instance, select to open the Group page.
On the Groups page, click Create Group. In the dialog box that appears, complete the dynamic group configuration.
Choose Dynamic in Group Type.
Under Dynamic Rule, enter the query conditions for devices.
You can click Preview dynamic rules, enter the query conditions under Dynamic Group Condition in the right panel, and then click OK.
The method for setting query conditions for a group is the same as in the advanced search feature for a device. For more information, see Advanced search.
ImportantTo search for devices using Thing Specification Language (TSL) model data, you must first configure an index for the TSL model properties. After one minute, you can create a dynamic group based on these properties to retrieve devices.
A dynamic group can use a maximum of 100 TSL model properties.
When you search for devices using device OTA module data, if the dynamic group is used for dynamic over-the-air (OTA) updates, ota_module.name and ota_module.version must be used together. For more information about OTA updates, see OTA Upgrade Overview.

Input Group Name and Group Description, click OK.
The group name must be 4 to 30 characters in length and can contain Chinese characters, letters, digits, and underscores (_). A Chinese character is counted as two characters.
ImportantThe group name must be unique within your Alibaba Cloud account and cannot be modified after it is created.
After a dynamic group is created, it takes up to one minute to take effect. After the group takes effect, the initialization of existing devices can take up to 20 minutes. The dynamic group contains only devices that meet the specified conditions. You can view the list of devices on the Group Details page.
View and manage groups
View group information
On the page for your instance, click View in the Actions column for the target group.
On the device group details page, you can view and manage group information, devices in the group, and subgroups.
On the Group Information tab, you can view the group level, total number of devices, number of online devices, number of activated devices, and group ID.
On the Group Information tab, you can add tags to the group to use as custom identifiers for flexible management. For more information, see Group Tags.
Click the Device List tab, where you can view the devices in a group and add devices to a static group. For more information, see Manage devices in a group in this topic.
Click the Subgroup List tab. You can view the subgroups of the group and add new subgroups to it. For more information, see Manage static subgroups in this topic.
NoteThis operation is supported only for static groups.
Delete a group
Before you can delete a static group, you must first delete all subgroups within it.
On the page for your instance, click Delete in the Actions column for the target group.
Click Confirm.
Manage devices in a group
Add devices
After you create a static group, you must manually add devices to it.
In the group list on the page, click View in the Actions column for the group.
On the group details page, click the Device List tab.
Click Add Device To Group, select the check boxes next to the devices that you want to add in the Add Device To Group panel on the right, and click OK.
You can search for devices by product name or device name. You can also enable Advanced Search in the upper-right corner of the list and download the search results as a CSV file. For more information, see Advanced Search.
You can click All to view a list of all devices, or click Selected to view a list of selected devices.
ImportantYou can add a maximum of 1,000 devices at a time.
A single group can contain a maximum of 100,000 devices.
A device can be added to a maximum of 10 groups.
View devices
On the Device List tab, you can view all devices under All Products, or select a product to view all devices under that product.
You can enter at least five characters of a device name prefix to perform a fuzzy search. For example, if you enter Dtest, devices with names such as Dtest1, Dtest2, and Dtest3 may be returned.
Click View in the Actions column for the target device to open the device details page, where you can view and manage information such as the device's remarks, tags, Thing Specification Language model data, and files. For more information, see View device information.
Remove devices
If you no longer need to manage a device within a group, you can remove it from the group.
Removing a device from a group does not delete it from IoT Platform.
On the Device List tab, find the device that you want to remove, and click Remove From Group in the Actions column.
Click Confirm.
Manage static subgroups
Use subgroups for more granular device management. For example, under a "Smart Home" group, you can create "Smart Kitchen" and "Smart Bedroom" subgroups to manage kitchen and bedroom devices separately.
In the group list on the page, click View in the Actions column for the target group.
On the group details page, click the Subgroup List tab.
Click Create Group, select a Parent Group, enter a name and description for the subgroup, and then click Confirm.
Optional: After you create a level-1 subgroup, you can follow the steps above to add a level-2 subgroup.
After you create a subgroup, you can manage the subgroup, its devices, and its level-2 subgroups. For more information, see View and manage groups and Manage devices in a group.
Related API operations
API | Description |
Creates a static group. | |
Creates a dynamic group. | |
Deletes a static group. | |
Deletes a dynamic group. | |
Updates the group description and group type. | |
Queries the details of a group, such as the group name, group ID, and the total number, number of online, and number of activated devices in the group. | |
Queries a paginated list of groups. | |
Queries the list of devices in a dynamic group. | |
Adds devices to a static group. | |
Removes specified devices from a group. | |
Adds or updates group tags. | |
Queries a list of group tags. | |
Queries the list of groups to which a specified device belongs. | |
Queries the information of a parent group based on a subgroup ID. | |
Queries the list of devices in a group. | |
Queries device groups by tags. |