getGroupInfo(params: Object)

Requires:
DeviceKit≥2.3.1@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
import { device } from '@ray-js/ray';

const { getGroupInfo } = device;

// Promise usage
try {
  const res = await getGroupInfo({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Get group information

Parameters

PropertyTypeRequiredDescription
groupIdstringYesGroup ID
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescriptionDeviceKit Since
groupIdstringgroupId The group ID.v3.3.0
productIdstringproductId The product ID.v3.3.0
namestringname The name of the group.v3.3.0
timenumbertime The time when the group was created.v3.3.0
iconUrlstringiconUrl The URL of the icon.v3.3.0
typenumbertype The type of group. Wifi = 0, Mesh = 1, Zigbee = 2, SIGMesh = 3, Beacon = 4,v3.3.0
isSharebooleanWhether this is a shared group; true indicates the current user is the recipient of the sharev3.3.0
Group datapoint status; keys are dpId and values are the corresponding status valuesv3.3.0
Group standard function set codes; keys are dpCode and values are the corresponding status valuesv3.3.0
deviceNumnumberdeviceNum The number of devices,v3.3.0
localKeystringlocalKey The local key.v3.3.0
pvnumberThe protocol version.v3.3.0
The product information.v3.3.0
The custom DP name.v3.3.0
The device list.v3.3.0
localIdstringThe local short address of groups.v3.3.0
pccstringThe subclass.v3.3.0
meshIdstringThe mesh ID or gateway ID.v3.3.0
groupKeystringAdd the beacon beaconKey.v3.3.0
The schema array.v3.3.0
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

device.getGroupInfo({
  groupId: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});