# Group of Equipment

For some scenarios where a device needs to be operated in bulk, this can be done by a device group.

# 1. Restrictions on groups of devices

  • By default, a maximum of 50 devices can be added to a device group.
  • An expansion group may be used if the conditions for the use of a high-capacity equipment group are met.
  • Devices within the same device group must be of the same device type (model_type), such as Campus Phone, but not necessarily the same device model (model_id).
  • Device groups must be created through a background API, and after creation the name of the device group cannot be modified.When a user authorizes and receives a call, all the devices group names are seen and cannot be customized for the user.

# 2. Manage the Equipment Group

Developers can add or delete devices groups through the following background interfaces.

The developer needs to maintain the group_id of all the device groups created, which is used for subsequent queries and authorizations.WeChat only checks, and does not maintain a list of all group_ids created under Weixin Mini Program.

NOTE:

In addition to adding devices when a device group is created, generally adding or removing devices should only occur in scenarios such as adding devices, replacing devices with damage, and removing devices. Developers are asked to keep devices within a device group relatively stable and to avoid overly frequently modifying the composition of the device group.

WeChat will monitor group operations and, if necessary, ask the Weixin Mini Program manager for manual confirmation.In this case, the device group operation takes effect upon confirmation by the administrator.

# 3. Applicable scenarios

Currently available for device volume licensing scenarios.

# 4. Guidelines for problem solving

# 4.1 Why did the device add a device group before, but it can't be found in the device group?

  • removeIotGroupDevicemay have been invoked by other logic to remove the device from the device group;
  • May be used elsewhereaddIotGroupDevice(force_add = true)Forcing the transfer of a device to another device group also causes the device to be removed from the previous group.

# 4.2 After the user has authorized the device group, it is still prompted to check the unauthorized device (errCode = 9).

There are several possible ways to use devices from the Device Group if they are prompted to be unauthorized

  • User does not authorize the device group, or has authorized the user to empty or unauthorize
    • You can use the authorization status query interface to determine whether the user and the device / device group directly have an authorization relationship
  • The user authorized the device group, but there is no such device within the device group.

# 4.3 Two users A and B have authorized device group X, but A can get through to device X1 in the device group, but B can't.

This is generally due to the fact that there is a direct authorization between user A and the device (not through the device group). Suppose that device X1 exists in device group X.

  • User A authorizes both device group X and directly authorizes device X1. At this point, even if device X1 is removed from device group X, user A can still call the device.
  • User B only authorizes device group X. At this point, after device X1 is removed from device group X, user B cannot call the device.