Skip to main content

Overview

Organize RainMaker nodes into groups, manage membership, and share access.

note

The userInstance refers to ESPRMUser from User Sign in.

What This Module Does?​

Groups (ESPRMGroup) let you bundle nodes into homes and rooms, create and update groups, add or remove nodes, and share access with other users.

Use this when your app organizes devices beyond a flat node list (rooms, homes, shared access for family members).

Use Device Management for provisioning and per-node control. You can add a node to a group during provisioning via optional groupId.

Expected outcome: Groups appear in getGroups(), nodes can be managed per group, and sharing requests can be sent or accepted.

Common Workflows​

List Groups​

const response = await userInstance.getGroups({
resultCount: 10,
withNodeList: true,
withSubGroups: true,
});

See Get Groups.

Create a Group and Add Nodes​

const group = await userInstance.createGroup({
name: "Living Room Devices",
nodeIds: ["node_id_1", "node_id_2"],
description: "All devices in the living room",
});

See Manage Groups.

Share a Group​

await userInstance.shareGroups({
username: "family@example.com",
groupIds: [group.id],
});

See Share Groups.

Update Group Metadata​

await group.updateMetadata({ room: "living_room", floor: 1 });

See Group Metadata.

Developer Journey​

GoalGuide
List or find groupsGet Groups
Create, update, and delete groups and subgroups; add or remove nodesManage Groups
Share, transfer, sharing requestsShare Groups
Custom metadataGroup Metadata

Best Practices​

  1. Fetch groups with withNodeList when building room dashboards
  2. Use subgroups for large homes — parent = floor, child = room
  3. Handle sharing requests in UI — sent and received lists
  4. Provision into a group when you know the target group at onboarding time

For complete API details including method signatures, parameters, return types, interfaces, and type definitions, refer to:

  • API Reference:
    • ESPRMUser — getGroups(), createGroup(), shareGroups(), sharing requests
    • ESPRMGroup — addNodes(), updateGroupInfo(), share(), updateMetadata()

On this page