Configurations
Welcome to the post deployment section, the last stage in the deployment of Private RainMaker. 🚀 This section should be reviewed only when deployment of RainMaker Services have been successfully completed.
As there are differences in the deployment of Private RainMaker between China and the global region. Two tabs are displayed to distinct global and China region. Please select the relevant tab based on the region of your deployment.
- Global Region
- China Region
Configure SES to Send Email
When a new user is created, RainMaker sends an email notification to the end-users, which contains a verification code. By default Amazon Cognito is used to send these email notifications. However, Amazon Cognito's default email service limits the number of emails sent to 50 per day. This includes all types of emails, such as verification codes sent during user sign-up or password recovery. Therefore, Amazon SES needs to be configured for sending the email notifications to the user instead of relaying on Amazon Cognito. By using SES, it can also support message customizations.
This feature is not supported for OAuth-only RainMaker yet.
Follow these steps to configure SES to send emails:
- Log in to the RainMaker dashboard with Superadmin credentials.
- Go to the
Deployment Settings
tab. - Click
Email Configurations
.
- Enter the email subject.
- Choose an email address for sending emails.
- Enter your name for
From Username
. - Enter email body in
Template
. - Click
Set Email Template
. - You will get a success message as shown below:
Configure the Email Template for Verification Messages
When the user signs up, the RainMaker platform sends them an email containing a verification code. This verification code must be used to confirm accounts when logging in using the mobile Apps. You can customize the email template from the RainMaker dashboard, but admin privileges are required to make changes to the template.
Follow these steps to configure email template for verification messages:
- Log in to the RainMaker dashboard using your Admin account credentials.
- Click
Deployment Settings
. - Click the
Email Configurations
tab.
- Keep the template type as
Welcome Email Notification
.- You can change the
Subject
of the Email. - You can change the
Template
, as per your requirement. This template can be simple text or a valid HTML. - Please note that you will need to have the string
{####}
in the template. This is a placeholder string, which is filled by the AWS service with the verification code.
- You can change the
- After your changes are done, click
Set Email Template
.
With this setup, the verification email sent to new users will use the customized template.
Configure Cognito Domain
Cognito domain is required for implementing sign-in using third party identity providers (e.g., Google, Apple) and for linking your Alexa or Google Voice Assistants account with your RainMaker account.
The Cognito domain is used to form the URL of sign-in and sign-up webpages, that are used for third party identity providers and voice assistant integrations.
This is not relevant for OAuth-only RainMaker.
Follow these steps to configure the Cognito domain name:
- Log in to RainMaker dashboard with Superadmin credentials.
- Go to
Deployment Settings
tab. - Go to
Identity Configurations
tab. - Enter the value for the custom domain name as shown below:
Cognito domain names can only contain lower-case letters, numbers, and hyphens.
- Click
Save
and refresh the page to view the full URL if it is not generated automatically.
Configure Cognito Callback URL (Optional)
The callback URLs are needed while using the third party authenticating services and linking your account in Alexa/Google Voice Assistants with your account in RainMaker. After successful sign-in, users are redirected to one of the URLs specified in callback URLs.
Follow these steps to configure the Callback URLs are given below:
- Log in to RainMaker dashboard with Superadmin credentials.
- Go to
Deployment Settings
tab. - Go to
Cognito Configurations
tab. - Enter your callback URLs as shown below. Multiple callback URLs can be specified by entering a comma after each URL.
Configure MFA (Optional)
Admin users can set up multi-factor authentication (MFA) for higher security. This will send a verification code to the admin's phone number at each login.
Increase the SNS sending limit if not done already before going further.
This is not supported for OAuth-only RainMaker yet.
Follow these steps to configure MFA:
-
Log in to RainMaker dashboard with your admin account.
Go toDeployment Settings
>MFA Configuration
. -
To add or update phone number on which you wish to receive the verification code, enter the number along with the country code and click
Update
.tipYou may skip step 2 and 3 if you have already added the phone number.
-
Verify the phone number by entering the verification code sent to the updated phone number.
-
Your phone number is now updated. You can enable MFA using the toggle.
tipYou can also disable MFA any time using the same toggle.
-
MFA settings updated successfully.
tipThe settings will reflect from the next login onwards.
If enabled, an MFA prompt will appear after the initial password authentication:
Configure the Location-based Triggers for Weather API Configurations
This process enables location-based weather triggers for automation through the integration of the OpenWeather API with RainMaker.
By configuring the API key and setting up polling intervals, devices or systems can automatically respond to weather conditions such as temperature or humidity. This enhances automation by allowing actions like turning on or off devices based on real-time weather data, providing greater customization and efficiency. It adds intelligent, dynamic responses to weather changes, improving convenience and energy management in smart environments.
Follow these steps to configure location-based weather triggers for Weather API Configurations:
- Create Open-Weather account
- Begin the process by signing up for an account at https://home.openweathermap.org/users/sign_up.
- After signing up, check your email for a verification message and follow the instructions to confirm your email address.
- Once your email is verified, you will receive an email containing the API key, which will become active within the next couple of hours.
- Steps for configuring weather-based automation in RainMaker
-
In Postman, log in to RainMaker using Superadmin credentials.
-
Access and configure the deployment settings for location triggers by clicking on the following Swagger link:
https://swaggerapis.rainmaker.espressif.com/?urls.primaryName=RainMaker%20Superadmin%20APIs#/Deployment%20Setting/cofigureServiceConfiguration
-
Under the
Request body
, chooseLocation Trigger Configurations
from the dropdown list to see the sample JSON request. -
In Postman, create a new API request.
PUT - {{url}}/v1/admin/deployment_settings/config/location_trigger
Follow Get Base Url steps to fetch the
{{url}}
.
-
Key | Value |
---|---|
service | location_trigger |
Key | Value |
---|---|
Authorization | {{access_key}} |
Select node_id
, choose JSON
from the dropdown list. Add the following JSON to the body, and click Send
.
{
"weather_trigger_api_key": "<add_your_key>",
"weather_trigger_polling_interval": 30,
"weather_trigger_host_url": "https://api.openweathermap.org/data/2.5/weather?units=metric"
}
Refer to the screenshot below for an example of the required input.
-
Test the triggers
-
To get a sample request, visit link:
https://swaggerapis.rainmaker.espressif.com/#/Automation%20Trigger%20and%20Actions/addAutomationTriggerActionUnder the
Request body
, chooseAdd Weather-based Automation Trigger
from the dropdown list. -
In Postman, create a new API request.
POST - {{url}}/v1/user/node_automation
Header -
Key | Value |
---|---|
Authorization | {{access_key}} |
Change the node_id
value according to the node on which you want to apply automation trigger.
Please get in touch with the ESP RainMaker support team (esp-rainmaker-support@espressif.com) to deploy or set up China specified deployment requirement.
Configure the DNS Names
This feature is optional for Global RainMaker, but mandatory for China.
When the RainMaker backend and the frontend stacks are deployed successfully, you can access the API end points and the Dashboard using the URLs generated. Alternatively, you can configure to use the domain names which are specific to your organization, by configuring the Route 53 service.
Follow these steps to configure the Route 53 service:
- Create a hosted Zone in Route 53
- The first step is to create a hosted zone which will be associated with your domain registrar.
- The detailed steps for creating a hasted zone are in the below link:
- Map the hosted zone to the DNS registrar
- You might be using the services from some other service provider ( e.g. GoDaddy) for domain name mapping for your organization.
- In this case, you will need to map the hosted zone created in Route 53 to the DNS provider which your organization is currently using. The detailed steps for this configuration are as mentioned in the link below:
- If you are using GoDaddy as your DNS provider you can refer to the below link:
-
Map the API Gateway endpoint with the DNS name
- Once the mapping between the hosted zone and your current DNS provider is done, you will need to configure the API Gateway endpoint to Route 53 hosted zone.
tipFollow Get Base Url steps to fetch the API Gateway endpoint.
- The details about mapping the API Gateway endpoint with the DNS name are in the link below:
Take notePlease note, choose the API endpoint type as
Edge
.After the configuration is done, the API Gateway and Custom domain names configuration will be as shown:
The Route 53 configuration for API Gateway will be as shown:
-
Configure the Domain name mapping for the RainMaker dashboard
-
When the RainMaker frontend stack is deployed, the required UI components are deployed and a CloudFront distribution is created.
-
This sets up the Content Delivery Network for caching the UI and provides SSL connectivity for the UI dashboard.
-
You can create your organization specific domain name for this, so that the admin users will be able to access the Dashboard using the domain name.
-
To check your CloudFront distribution, search for the
CloudFront
service from the AWS console. -
The steps to configure Route 53 DNS mapping for CloudFront distribution are as shown in the link below:
After the CloudFront distribution is configured with the DNS mapping, the CloudFront screen will be as shown:
The following is the Route 53 screen you'll see when setting up a CloudFront distribution:
-