跳到主要内容

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.

npmGitHub

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

  1. Getting Started — install, configure ESPRMBase, set adapters
  2. Adapters — implement storage (required) and optional provisioning, discovery, notifications
  3. User Management — sign in
  4. Device Management — provision and control devices
  5. Group Management — organize devices into groups

Choose an integration style

ApproachBest for
Direct SDKFull control, custom UI and state
CDFBuilt-in state management and reactive updates

Explore by feature area

AreaGuide
Users, auth, sessionsUser Management
Provisioning, control, OTA, automationDevice Management
Groups, sharing, metadataGroup Management
Platform bridges (BLE, storage, push)Adapters

Advanced Concepts

Main classes

ClassRole
ESPRMBaseSDK init and global config
ESPRMAuthAuthentication
ESPRMUserUser-scoped operations
ESPRMNodeNode/node operations
ESPRMGroupGroup operations

SDK architecture

App Integration: Direct SDK vs CDF

React Native reference adapters: esp-rainmaker-home/adaptors.

Best Practices

  1. Configure once at startup — call ESPRMBase.configure() before auth or device APIs
  2. Provide storage adapter always — sessions and cache depend on it
  3. Add adapters only for features you ship — provisioning, local control, OAuth, etc.
  4. Follow module overviews — each area has a task-oriented guide for common workflows
  5. Use TypeDoc for API references — for better understanding of an API details.

On this page