---
name: "getGroupInfo"
mode: "kit"
versionRequirements:
  - { name: "DeviceKit", version: "2.3.1" }
  - { name: "@ray-js/ray", version: "0.6.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## getGroupInfo

> [VERSION] DeviceKit >= 2.3.1 | @ray-js/ray >= 0.6.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Get group information

### Parameters

| Property | Type | Required | Default | Since | Description |
| --- | --- | --- | --- | --- | --- |
| `groupId` | `string` | Yes | - | `2.3.1` | Group ID |
| `complete` | `() => void` | No | - | - | Completion callback (executed on both success and failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | - | Callback on successful API call |
| `fail` | `(params: Object) => void` ↓see below | No | - | - | Failure callback |

#### success callback parameters

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `groupId` | `string` | `3.3.0` | groupId The group ID. |
| `productId` | `string` | `3.3.0` | productId The product ID. |
| `name` | `string` | `3.3.0` | name The name of the group. |
| `time` | `number` | `3.3.0` | time The time when the group was created. |
| `iconUrl` | `string` | `3.3.0` | iconUrl The URL of the icon. |
| `type` | `number` | `3.3.0` | type The type of group. Wifi = 0, Mesh = 1, Zigbee = 2, SIGMesh = 3, Beacon = 4, |
| `isShare` | `boolean` | `3.3.0` | isShare |
| `dps` | `Record<string, any>` | `3.3.0` | dps |
| `dpCodes` | `Record<string, any>` | `3.3.0` | dpCodes |
| `deviceNum` | `number` | `3.3.0` | deviceNum The number of devices, |
| `localKey` | `string` | `3.3.0` | localKey The local key. |
| `pv` | `number` | `3.3.0` | The protocol version. |
| `productInfo` | `Record<string, any>` | `3.3.0` | The product information. |
| `dpName` | `Record<string, any>` | `3.3.0` | The custom DP name. |
| `deviceList` | `GroupControlDeviceInfo[]` | `3.3.0` | The device list. |
| `localId` | `string` | `3.3.0` | The local short address of groups. |
| `pcc` | `string` | `3.3.0` | The subclass. |
| `meshId` | `string` | `3.3.0` | The mesh ID or gateway ID. |
| `groupKey` | `string` | `3.3.0` | Add the beacon beaconKey. |
| `schema` | `Record<string, any>[]` | `3.3.0` | The schema array. |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Error extension code |
| `errorMsg` | `string` | Error extension message |


### Referenced Types

##### `interface` GroupControlDeviceInfo

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `roomName` | `string` | `7.2.1` | Device room name |
| `schema` | `Record<string, any>[]` | `3.3.0` | Contains product info, schema, and function definitions |
| `dps` | `Record<string, Record<string, any>>` | `3.3.0` | dps Device DP states; use the corresponding dpid to obtain specific state values for business logic |
| `attribute` | `number` | `3.3.0` | attribute Product attribute definition. The corresponding configuration can be found on the backend-ng platform; managed via bitwise operations. |
| `baseAttribute` | `number` | `7.2.1` | baseAttribute Basic product attribute definitions |
| `capability` | `number` | `3.3.0` | capability Product capability value. On the backend-ng platform you can query the corresponding selections; overall business logic is partitioned based on this data. Device types can also be adjusted based on this attribute; managed using bitwise operations. |
| `dpName` | `Record<string, string>` | `3.3.0` | dpName Custom dp name, typically used in the panel |
| `ability` | `number` | `3.3.0` | ability Currently seldom used; used to distinguish special device types |
| `icon` | `string` | `3.3.0` | icon Device icon URL |
| `devId` | `string` | `3.3.0` | devId Device unique ID |
| `verSw` | `string` | `3.3.0` | verSw Device firmware version |
| `isShare` | `boolean` | `3.3.0` | isShare Whether this is a shared device; true means a shared device |
| `bv` | `string` | `3.3.0` | bv Device baseline version |
| `uuid` | `string` | `3.3.0` | uuid Unique firmware identifier |
| `panelConfig` | `Record<string, Record<string, any>>` | `3.3.0` | panelConfig Configuration items in the product panel; typically visible on the IoT platform |
| `activeTime` | `number` | `3.3.0` | activeTime Device activation time, timestamp |
| `devAttribute` | `number` | `3.3.0` | devAttribute Device business capability extensions, operated via bit flags |
| `pcc` | `string` | `3.3.0` | pcc Classification identifier for Thing in-house Bluetooth mesh products |
| `nodeId` | `string` | `3.3.0` | nodeId Short address of the sub-device |
| `parentId` | `string` | `3.3.0` | parentId ID of the parent node. Present for sub-devices or Bluetooth mesh devices; used internally to locate the related gateway or parent model for business handling |
| `category` | `string` | `3.3.0` | category Product category |
| `standSchemaModel` | `Record<string, any>` | `3.3.0` | standSchemaModel Standard product function set definition model |
| `productId` | `string` | `3.3.0` | productId Product ID associated with the device |
| `productVer` | `string` | `7.2.1` | productVer Associated product version |
| `bizAttribute` | `number` | `3.3.0` | bizAttribute Business attribute capability |
| `meshId` | `string` | `3.3.0` | meshId Thing self-developed Bluetooth mesh ID |
| `sigmeshId` | `string` | `3.3.0` | sigmeshId Bluetooth mesh ID corresponding to the device’s industry attribute |
| `meta` | `Record<string, Record<string, any>>` | `3.3.0` | meta Custom configuration meta attributes for the device, used to store business data |
| `isLocalOnline` | `boolean` | `3.3.0` | isLocalOnline Whether the device is online on the local LAN |
| `isOnline` | `boolean` | `3.3.0` | isOnline Overall online status; if any path is online, the device is online (composite status) |
| `isCloudOnline` | `boolean` | `4.21.0` | isCloudOnline Device cloud online status |
| `name` | `string` | `3.3.0` | name Device name |
| `groupId` | `string` | `3.3.0` | groupId |
| `dpCodes` | `Record<string, Record<string, any>>` | `3.3.0` | dpCodes Standard function set codes |
| `originJson` | `Record<string, Record<string, any>>` | `3.3.0` | Raw JSON; when business extensions can’t be updated in time, use this for retrieval and handling |
| `devTimezoneId` | `string` | `7.2.1` | Time zone information |
| `dpsTime` | `Record<string, Record<string, any>>` | `3.3.0` | Execution time of the device’s DP |
| `secCategory` | `string` | `4.13.1` | secCategory Secondary category |
| `latitude` | `string` | `7.2.1` | Device latitude |
| `longitude` | `string` | `7.2.1` | Device longitude |
| `ip` | `string` | `7.2.1` | Device IP address |
| `isVirtualDevice` | `boolean` | `7.2.1` | Whether it is a virtual device |
| `isZigbeeInstallCode` | `boolean` | `7.2.1` | Upload zigbeeInstallCode to the cloud to mark gateways with installation-code capability |
| `protocolAttribute` | `number` | `7.2.1` | Flag for sub-device activation capability |
| `connectionStatus` | `number` | `7.2.1` | Connection status, nearby status |
| `mac` | `string` | `7.2.1` | Some devices require MAC-based unique identification, e.g., mesh |
| `bluetoothCapability` | `string` | `7.2.1` | Bluetooth device capability value, reported by the device |
| `isTripartiteMatter` | `boolean` | `7.2.1` | Whether it is a third-party Matter device |
| `isGW` | `boolean` | `7.2.1` | Whether it is a gateway device |
| `isSupportGroup` | `boolean` | `7.2.1` | Whether it supports groups |
| `isZigBeeSubDev` | `boolean` | `7.2.1` | Whether it is a Zigbee sub-device |
| `cadv` | `string` | `7.2.1` | cadv version number |
| `isSupportOTA` | `boolean` | `7.2.1` | Whether the device supports OTA |
| `iconUrl` | `string` | `7.2.1` | Device icon |
| `hasWifi` | `boolean` | `7.2.1` | Whether the device has a Wi‑Fi module |
| `switchDp` | `number` | `7.2.1` | Quick control dp |
| `switchDps` | `number[]` | `7.2.1` | Quick control dp |
| `wifiEnableState` | `number` | `7.2.1` | Status of the device’s Wi‑Fi module: 1: unavailable, 2: available |
| `configMetas` | `Record<string, Record<string, any>>` | `7.2.1` | Device product configuration |
| `isMatter` | `boolean` | `7.2.1` | Whether it is a Matter device |
| `isSupportLink` | `boolean` | `7.2.1` | Whether the device supports dual control |
| `isSupportAppleHomeKit` | `boolean` | `7.2.1` | Whether it supports adding the device to Apple Home |
| `attributeString` | `string` | `7.2.1` | attribute formatted binary string Product attribute definition. The corresponding configuration can be found on the backend-ng platform; managed via bitwise operations. |
| `extModuleType` | `number` | `7.2.1` | Type of the device’s extension module 0: No extension module 1: Extension module present; the device is ble+x 2: Extension module is a Wi‑Fi module; the device is ble+Wi‑Fi |
| `isRelayOpen` | `boolean` | `7.2.1` | Whether the mesh device’s relay feature is enabled |
| `isProxyOpen` | `boolean` | `7.2.1` | Whether the mesh device’s proxy feature is enabled |
| `isSupportProxyAndRelay` | `boolean` | `7.2.1` | Whether the mesh device supports proxy and relay features |
| `yuNetState` | `number` | `7.2.1` | Device Dayu channel user enable status: 0 - disabled, 1 - enabled |


### Examples

#### Basic usage

```tsx
import { device } from '@ray-js/ray'

const { getGroupInfo } = device;

getGroupInfo({
  groupId: 'example',
  success: (result) => {
    console.log('getGroupInfo success', result);
  },
  fail: (error) => {
    console.log('getGroupInfo fail', error.errorMsg);
  },
});
```
