ESP RainMaker Home Automation project

ESP RainMaker Home Automation with Google, Alexa, IR & Manual Switch

Make ESP RainMaker Home Automation with Google Assistant, Alexa, IR, & manual switch. Also, add Timer & monitor Sensors. (Circuit + Code).

In this IoT project, I have explained how to make an ESP RainMaker home automation system. With this ESP32 project, you can control 8 home appliances with Google Assistant, Alexa, IR remote, and manual switches. You can also control the relays and monitor sensor readings on Google Home and Amazon Alexa App from anywhere in the world.

And you don’t need any Google Nest or Amazon Echo Dot devices for this voice control home automation project.

ESP RainMaker Home Automation

You can control the relays with IR remote and manual switches without WiFi. If the Wi-Fi is available, the ESP32 will automatically connect with the Wi-Fi.

You can also add a timer to control the relays automatically with the pre-defined time.

ESP RainMaker Home Automation

For this project, I have used all the FREE tools. So if you follow all steps, you can easily make this Smart Home System with Google Assistant and Alexa to control the appliances with voice commands.

Required Components for the ESP32 RainMaker project

Required Components for ESP32 project
  • ESP32 DevKIT V1 Amazon
  • 4-channel or 8-channel 5V SPDT Relay Module Amazon
  • TSOP1838 IR receiver (with metallic casing)
  • DHT11 temperature sensor
  • LDR
  • 10k resistor
  • Manual Switches or Pushbuttons Amazon
  • Amazon Echo Dot (optional) Amazon
  • Google Nest Mini (optional)

Circuits of the ESP32 IoT Project with ESP RainMaker

Circuit of ESP32 Home Automation projects

The circuit is very simple, I have used D23, D22, D21, D19, D18, D5, D25 & D26 GPIO to control the 8-channel relay module.

And the GPIO D13, D12, D14, D27, D33, D32, D15 & D4 are connected with switches to control the relay module manually.

The output pin of the IR receiver is connected with GPIO D35.

And the output pin of the DHT11 sensor is connected with the RX2 (GPIO16) pin, and the LDR is connected with GPIO D34 of the ESP32.

I have used the INPUT_PULLUP function in Arduino IDE instead of using the pull-up resistors with each switch.

As per the source code, when the control pins of the relay module receive the LOW signal the relay will turn on and the relay will turn off for the HIGH signal in the control pin.

I have used a 5V 5Amp mobile charger to supply the circuit.

Tutorial video on ESP RainMaker Home Automation project

In the tutorial video, I have covered the following steps in detail.

  • Control 8 relays with Google Assistant, Alexa, and switches.
  • How to add the timer in the ESP RainMaker app.
  • Get the HEX codes of IR remote buttons.
  • Programming the ESP32 for RainMaker with Arduino IDE
  • Add devices in the ESP RainMaker app.
  • Connect ESP RainMaker with Amazon Alexa App.
  • Connect ESP RainMaker with Google Home App.

Program ESP32 with Arduino IDE

In the Tutorial video, I explained all the steps to program the ESP32 using Arduino IDE.

  • Update the Preferences –> Additional boards Manager URLs:,
ESP32 board (Version: 2.0.3)
  • Then install the ESP32 board (Version: 2.0.3) from the Board manager or Click Here to download the ESP32 board.
  • Download the required libraries from the following links:
  • In Arduino IDE, select Board as ‘ESP32 DEV Module‘, and the Partition scheme as ‘RainMaker‘.

Source Codes for ESP RainMaker IoT Project

Click on the following buttons to download the source codes for this ESP32 project.

First, you have to upload the Code for Getting HEX codes to ESP32 and connect the IR receiver with GPIO D35.

After that, open the serial monitor, and select the Baud Rate at 115200.

Now, you have to press all the remote buttons (one by one) which you want to use to control the relays.

Now, save all the HEX codes. You have to update the main code with these HEX codes. You need 8 HEX codes to control 8 relays.

In the main sketch, update the HEX code of the IR Remote buttons (as shown in the tutorial video).

//Update the HEX code of IR Remote buttons 0x<HEX CODE>
#define IR_Button_1   0x80BF49B6
#define IR_Button_2   0x80BFC936
#define IR_Button_3   0x80BF33CC
#define IR_Button_4   0x80BF718E
#define IR_Button_5   0x80BFF10E
#define IR_Button_6   0x80BF13EC
#define IR_Button_7   0x80BF51AE
#define IR_Button_8   0x80BFD12E
#define IR_All_Off    0x80BF3BC4

And if you want you can also change the device names. Google and Alexa will identify the devices with these names.

// define the Device Names
char deviceName_1[] = "Switch1";
char deviceName_2[] = "Switch2";
char deviceName_3[] = "Switch3";
char deviceName_4[] = "Switch4";
char deviceName_5[] = "Switch5";
char deviceName_6[] = "Switch6";
char deviceName_7[] = "Switch7";
char deviceName_8[] = "Switch8";

After uploading the code to ESP32, please refer to the following article to add the devices with the ESP RainMaker app.

Now, please refer to the following articles to connect the ESP RainMaker with Amazon Alexa and Google Home App.

After doing all these steps, now you control the appliances with Google Assistant and Alexa.

PCB for this ESP32 Home Automation system

To make the circuit compact, I have designed a PCB for this ESP32 IoT project.

If you want, you can also use this PCB to make the circuit compact and give the project a professional look. This PCB can be used for any ESP32 Home Automation project.

About PCBWay and their services

You can order any custom design PCBs from PCBWay at very reasonable prices.

This image has an empty alt attribute; its file name is PCBWay-750x161-Banner.jpg

PCBWay not only produces FR-4 and Aluminum boards but also advanced PCBs like Rogers, HDI, Flexible and Rigid-Flex boards, at very affordable prices.
For the online instant quote page please visit –

You can also explore different PCB projects from their Open-source community

For more details please visit the following articles.
Why PCBway
PCB Capabilities
High-Quality PCB

Steps to order PCB from PCBWay

To order the PCB first visit

Step 2 to order from PCBWay

Then enter the following details:

  1. PCB Size (Length & Width) in mm & PCB quantity
  2. Select masking color for the PCB
  3. Select country and shipping method
  4. Click on the “Save to Cart” button
Step-3 to order from PCBWay

Now click on the “Add Gerber Files” to upload the PCB Gerber file.

Then click on the “Submit Order Now” to place the order.

After that, they will review the Gerber file and accordingly confirm the order.

I have used their services for my different home automation projects, I always received the PCB on time and the quality is very good in this price range.

Control Relays & Monitor sensor readings on ESP RainMaker

Control Relays & Monitor sensor readings

With this ESP RainMaker home automation project, you can also monitor the real-time sensor readings like Temperature, Humidity, and LDR on the ESP RainMaker app.

Control relays with the Google Assistant & Alexa

Control Relays with Google Home
Control Relays with Google Home

You can control appliances with Google Assistant from anywhere in the world through the internet.

If the ESP32 is connected with WiFi, then you can also control and monitor the real-time feedback in the Google Home app.

Control Relays with Alexa
Control Relays with Alexa

You can ask Alexa to control appliances from anywhere in the world through the internet.

And you can also control and monitor the real-time feedback and sensor readings on the Amazon Alexa app.

Control relays with the IR Remote & Switches

Control relays with IR
Control relays with IR Remote

You can use any IR remote to control the appliances.

If the Wi-Fi is not connected, still you can control relays with the IR remote.

ESP RainMaker Home Automation
Control relays with switches

You can also control the appliances from manual switches or push buttons.

If the ESP32 is connected to Wi-Fi then it will send real-time feedback to the IoT server (ESP RainMaker).

I hope you like this Smart house IoT project idea with the Espressif ESP32.

Click Here for more such ESP32 projects.

Please do share your feedback on this IoT project. Thank you for your time.