Overview
The @espressif/rainmaker-base-sdk is a TypeScript package which serve as SDK for building mobile and cross-platform apps that connect to ESP RainMaker ecosystem—provision and control devices, manage users, and organize devices into groups.
What This SDK Does ?
This SDK is the foundation for RainMaker app integration: authenticate users, onboard and control devices, subscribe to updates, and organize devices into groups.
Use it when you build a custom app with direct SDK access and your own state management.
Consider CDF when you want built-in state sync and higher-level abstractions instead of wiring everything yourself.
Expected outcome: After Getting Started and Adapters, you call typed APIs on ESPRMBase, ESPRMUser, ESPRMNode, and ESPRMGroup against your RainMaker deployment.
Common Workflows
Start integrating
- Getting Started — install, configure
ESPRMBase, set adapters - Adapters — implement storage (required) and optional provisioning, discovery, notifications
- User Management — sign in
- Device Management — provision and control devices
- Group Management — organize devices into groups
Choose an integration style
| Approach | Best for |
|---|---|
| Direct SDK | Full control, custom UI and state |
| CDF | Built-in state management and reactive updates |
Explore by feature area
| Area | Guide |
|---|---|
| Users, auth, sessions | User Management |
| Provisioning, control, OTA, automation | Device Management |
| Groups, sharing, metadata | Group Management |
| Platform bridges (BLE, storage, push) | Adapters |
Advanced Concepts
Main classes
| Class | Role |
|---|---|
ESPRMBase | SDK init and global config |
ESPRMAuth | Authentication |
ESPRMUser | User-scoped operations |
ESPRMNode | Node/node operations |
ESPRMGroup | Group operations |
SDK architecture
App Integration: Direct SDK vs CDF
React Native reference adapters: esp-rainmaker-home/adaptors.
Best Practices
- Configure once at startup — call
ESPRMBase.configure()before auth or device APIs - Provide storage adapter always — sessions and cache depend on it
- Add adapters only for features you ship — provisioning, local control, OAuth, etc.
- Follow module overviews — each area has a task-oriented guide for common workflows
- Use TypeDoc for API references — for better understanding of an API details.
