Overview
Connect RainMaker devices to your app, control them in real time, and manage their lifecycle—from first provisioning through automation, sharing, and firmware updates.
The userInstance used throughout this section refers to an ESPRMUser instance obtained after User Sign in.
What This Module Does ?
Device Management covers everything after sign-in and before group organization: discovering and onboarding hardware, listing and controlling nodes, real-time sync, automations, OTA, sharing, and metadata.
Use this section when your app needs to onboard devices, show and control the user's hardware, react to state changes, push firmware, share access, or query historical data.
Use other sections instead for authentication, groups, or SDK setup — see Getting Started, User Management, and Group Management.
Expected outcome: You can provision devices into the user's account, read and write parameters on nodes, and use the guides below for each capability.
Common Workflows
Control an existing device
Shortest path from signed-in user to changing a parameter:
const { nodes } = await userInstance.getUserNodes();
const node = nodes[0];
const nodeConfig = node.nodeConfig ?? (await node.getNodeConfig());
const light = nodeConfig.devices.find((d) => d.type === "esp.device.light");
const powerParam = light.params.find((p) => p.name === "Power");
await powerParam.setValue(true);
To add a new device, start with Provisioning.
Provisioning
| Goal | Guide |
|---|---|
| Full onboarding flow (discover → connect → provision) | Provisioning |
| Secure user–node mapping (default in SDK v2.3.0+) | Challenge-Response Provisioning |
| Filter BLE devices by customer ID (white-label apps) | BLE Device Search |
| Low-level provisioning APIs | ESPDevice Reference |
Claiming
| Goal | Guide |
|---|---|
| Register unclaimed devices with the cloud first | Assisted Claiming |
Node Management
| Goal | Guide |
|---|---|
| List, inspect, or remove nodes | Node Management |
Control
| Goal | Guide |
|---|---|
| Update device parameters (lights, switches, sensors) | Device Control |
| Update service parameters (schedules, timezone, etc.) | Service Control |
| Update several nodes or parameters at once | Batch Operations |
| Prefer local network over cloud for faster control | Transport Order |
Time Series
| Goal | Guide |
|---|---|
| Query historical config parameter data | Time Series Data |
| Query time series outside node config | Custom Parameter Time Series |
Automations
| Goal | Guide |
|---|---|
| Create automations (triggers, daylight, weather) | Automation |
| Update, enable, or delete automations | Automation Management |
Updates
| Goal | Guide |
|---|---|
| Unified update manager with channel priority (SDK v2.2.2+) | Subscription Channels |
| Listen for local discovery and node updates | Events and Subscriptions |
Sharing, OTA & Utils
| Goal | Guide |
|---|---|
| Share or transfer nodes with other users | Node Sharing |
| Push firmware updates | OTA Updates |
| Set node timezone | Timezone Management |
| Attach tags or custom metadata | Node Metadata & Tags |
Advanced Concepts
Node hierarchy
Every provisioned device is a node (ESPRMNode). Each node contains devices (controllable things) and services (system capabilities), each with parameters:
ESPRMNode
├── ESPRMNodeConfig
│ ├── ESPRMDevice[] → controllable things (light, switch, sensor)
│ │ └── ESPRMDeviceParam[] → readable/writable values (Power, Brightness)
│ └── ESPRMService[] → system capabilities (Schedule, Time, OTA)
│ └── ESPRMServiceParam[] → service-level values (timezone, schedules)
See the interactive tree in Node Management.
Provisioning vs claiming vs control
- Claiming — registers the device with RainMaker cloud and installs certificates
- Provisioning — maps the device to the user and configures Wi-Fi
- Control — reads/writes parameters on an already-provisioned node
Transport selection
By default, parameter updates use the cloud. For local network communication, configure Transport Order and local discovery.
Best Practices
- Start with provisioning, then control — complete onboarding before building control UI
- Use
getPrimaryParam()when a device has one main control — see Device Control - Prefer batch updates when changing multiple parameters or nodes — see Batch Operations
- Subscribe to updates early — register listeners before actions that expect callbacks
- Use ESPDevice docs only for onboarding — see ESPDevice Reference for low-level provisioning APIs
Related Resource
- API Reference: