Overview
Organize RainMaker nodes into groups, manage membership, and share access.
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
| Goal | Guide |
|---|---|
| List or find groups | Get Groups |
| Create, update, and delete groups and subgroups; add or remove nodes | Manage Groups |
| Share, transfer, sharing requests | Share Groups |
| Custom metadata | Group Metadata |
Best Practices
- Fetch groups with
withNodeListwhen building room dashboards - Use subgroups for large homes — parent = floor, child = room
- Handle sharing requests in UI — sent and received lists
- Provision into a group when you know the target group at onboarding time
Related Resource
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()
- ESPRMUser —

