Basic Configurations
ESP RainMaker Home is a hybrid application that connects with the ESP RainMaker cloud which might be privately deployed in your AWS account. The out-of-the-box app needs to be configured to use with your privately deployed instance of ESP RainMaker.
Assumption is that you have already cloned the open source GitHub repo of ESP RainMaker Home App. Go to your cloned repo and its home directory. Edit the rainmaker.config.ts file.
Cloud Configuration
Change the baseUrl config parameter in the config section below, pointing to your cloud backend endpoint.
| Key | Type | Description |
|---|---|---|
| baseUrl | 字符串 | 与每个 API 端点相对应。获取端点请参考获取 RainMaker API URL。 |
3rd Party Login
Further you will have to change the authentication URL and other parameters like clientId and redirect URL as per your deployment.
| Key | 类型 | 描述 |
|---|---|---|
| clientId | 字符串 | 用于识别用户池中的应用。详细内容请参阅在哪里可以找到第三方集成和手机应用的 Client ID 和回调 URL。 |
| authUrl | 字符串 | 第三方登录的 OAuth 网址。详细内容请参阅在哪里可以找到认证 URL。 |
| redirectUri | 字符串 | 自定义 URI 方案,第三方登录完成后将用户重定向至应用。请把此值复制到 rainmaker.config.ts 文件中,具体步骤请参阅设置重定向 URI。 |
Edit rainmaker.config.ts file in the root folder:
export const SDKConfig = {
baseUrl: "<private_rainmaker_deployment_endpoint>",
version: "v1",
authUrl: "https://3pauth.rainmaker.espressif.com",
clientId: "1h7ujqjs8140n17v0ahb4n51m2",
redirectUrl: "rainmaker://com.espressif.novahome/success",
customStorageAdapter: asyncStorageAdapter,
localDiscoveryAdapter: EspLocalDiscoveryAdapter,
localControlAdapter: ESPLocalControlAdapter,
provisionAdapter: provisionAdapter,
notificationAdapter: ESPNotificationAdapter,
oauthAdapter: espOauthAdapter,
appUtilityAdapter: ESPAppUtilityAdapter,
};
export const CDFConfig = {
autoSync: true, // Enable automatic data synchronization
};
External Links
These consist of links that open your project related documentation within the app browser.
| Key | Type | Description |
|---|---|---|
| WEBSITE_LINK | 字符串 | 文档链接 |
| PRIVACY_POLICY_LINK | 字符串 | 隐私政策链接 |
| TERMS_OF_USE_LINK | 字符串 | 使用条款链接 |
Please provide valid URLs for each document type in the constants.ts file:
export const WEBSITE_LINK = "https://rainmaker.espressif.com";
export const TERMS_OF_USE_LINK =
"https://rainmaker.espressif.com/docs/terms-of-use.html";
export const PRIVACY_POLICY_LINK =
"https://rainmaker.espressif.com/docs/privacy-policy.html";
iOS Specific Configurations
Apple Developer Settings
在苹果开发者控制台创建应用 ID
-
打开苹果开发者网站。
-
点击左侧菜单中的
Identifiers,点击+图标,添加新的标识符。
-
从列表中选择
App IDs,然后点击Continue。
-
从类型中选择
App。
-
为你的应用添加
Bundle ID和Description字段,请保证Bundle ID与你在 RainMaker iOS 应 用中所使用的 ID 保持一致。
-
向下滚动页面,选择
Push Notifications和Sign In with Apple功能,并点击Continue。
-
检查更改并确认配置。
-
请记录下你的 Team ID
App ID Prefix值和Bundle ID值,然后点击Register保存更改。
In case of iOS apps, creating app groups allows you to create a container as a shared storage space. This is a necessary step for notification service usage.
App Group
App Group 功能支持由一个团队开发的多个应用程序共同维护共享容器(存储空间)。在这种情况下,该容器由应用程序和扩展通知服务共享。共享容器用于存储节点的详细信息,这些信息用于通知服务中的自定义通知功能。更多信息请参阅什么是 iOS 的 App Group。
配置 App Group
- 进入苹果开发者控制台,打开标识符:https://developer.apple.com/account/resources/identifiers/list。
- 点击
+图标,添加新的标识符。 - 从列表中选择
App Groups并点击Continue。

- 为你的 App Group 添加
Description和Identifier字段,点击Continue。

- 检查改动并点击
Register保存更改。

在 Xcode 中配置 App Group
- 打开 Xcode 项目,在你的主应用目标中,打开
Signing & Capabilities。 - 在
App Groups性能下勾选你之前配置的 App Group。
