Get Started with ESP RainMaker Home App
This guide walks you through creating an ESP RainMaker Home app project using the RainMaker Home App CLI. The CLI initializes an Expo-based app with RainMaker SDK configuration, so you can build and run the app on Android and iOS.
The tutorial covers:
Prerequisite: Set up your Expo environment before starting. Follow Set up your environment to install the tools needed for your target platform (Android device/emulator or iOS device/simulator).
Initialize Project
- Run the CLI to create a new project with interactive prompts for app identity, SDK URLs, and optional features (third-party auth, agents, CDF autosync).
Run and Develop
- Use the generated project to run the app on your device or simulator.
Introduction
The RainMaker Home App CLI scaffolds an ESP RainMaker Home app from a template, configures app identity and RainMaker API settings, and runs a prebuild step so the project is ready to run. The app can be used to provision and control ESP RainMaker devices.
Set up Expo environment
Before using the CLI, set up your development environment as described in the Expo documentation. Choose one of:
- Android: device with Expo Go, device with development build, or Android emulator.
- iOS: device with Expo Go, device with development build, or iOS Simulator (macOS only).
Install any required tools (Node.js, Watchman, Android Studio or Xcode, etc.) for your chosen option.
Initialize a new project
From a directory where you want to create the project, run:
npx @espressif/rainmaker-home-app-cli init
The CLI will:
- Ask for project name and template source (default template or custom).
- Clone or copy the RainMaker Home app template.
- Prompt for app identity and SDK configuration:
- App name, Application ID (e.g. com.example.smarthome), app slug, schema, version.
- Base URL (e.g. https://api.rainmaker.espressif.com) and API version.
- Optionally configure third-party auth (Google, Sign in with Apple), agents (deep link host/path), and CDF autosync.
- Create a
**.env** file in the project root with all settings. - Run
npm run prebuildin the generated project. - Run
npm run installin the generated project.
You can press Enter to accept defaults for any prompt. When done, the CLI reports success and the project is ready to use.
Example:
$ npx @espressif/rainmaker-home-app-cli init
? App Name / Project Name: MySmartHome
? Application ID: com.example.smarthome
? Base URL: https://api.rainmaker.espressif.com
? API Version: v1
...
✓ Project "MySmartHome" initialized successfully!
Project structure
After init, you get a structure like:
<project-name>/
└── ESP RainMaker Home/
├── .env # Configuration (app identity, SDK, auth, etc.)
├── android/ # Android project
├── ios/ # iOS project
├── app/ # Source code
└── package.json
All settings from the prompts are stored in **.env** in the project root. You can edit this file later to change API URL, auth, or feature flags.
Run the app
From the generated project folder (e.g. ESP RainMaker Home/):
- Android:
npx expo run:androidornpm run android - iOS:
npx expo run:iosornpm run ios
Ensure your device or emulator is set up as following:
| Target | Expo setup guide |
|---|---|
| Android Device | Guide |
| Android Emulator | Guide |
| iOS device | Guide |
| iOS Simulator | Guide |