Back
ESP32 Google Home Automation
Smart Home Automation

ESP32 Google Home Automation
with Google Assistant & ESP RainMaker

A complete IoT-based smart home automation project using ESP32, Google Assistant and ESP RainMaker. Control appliances from anywhere using voice, mobile app or physical wall switches with real-time synchronization.

ESP32 Controller
RainMaker Cloud
Google Assistant
OTA Updates

Project Overview

This project demonstrates a smart home automation system built using the ESP32 development board and ESP RainMaker cloud platform.

Users can control four electrical appliances using Google Assistant voice commands, the ESP RainMaker mobile application, or physical wall switches.

The project supports OTA firmware updates, Bluetooth Wi-Fi provisioning, device scheduling, timezone synchronization, EEPROM memory restoration after power failure, Wi-Fi reset and factory reset.

Core Hardware Modules

ESP32 Dev Module Main controller with Wi-Fi, Bluetooth, OTA updates and ESP RainMaker support.
4 Channel Relay Module Controls Lights, Fans, Sockets and Home Appliances.
Wall Switches Manual control with real-time synchronization to Google Assistant and RainMaker.
EEPROM Memory Stores relay states to restore appliance status after power interruption.

Project Resources

ESP32 Firmware Complete ESP RainMaker firmware with Google Assistant integration, EEPROM, OTA, Schedules, Wi-Fi provisioning and manual switch control.
Circuit Diagram Complete wiring guide including ESP32, Relay Module, Wall Switches, Wi-Fi LED and Reset Button.

Project Features

✅ Google Assistant Voice Control
✅ ESP RainMaker Mobile App
✅ Manual Wall Switch Control
✅ OTA Firmware Updates
✅ EEPROM State Memory
✅ Bluetooth Wi-Fi Provisioning
✅ Device Scheduling
✅ Factory Reset & Wi-Fi Reset
✅ Real-Time Cloud Synchronization
✅ Power Failure Recovery

Pin Configuration

Component ESP32 GPIO
Relay 1 GPIO23
Relay 2 GPIO19
Relay 3 GPIO18
Relay 4 GPIO5
Switch 1 GPIO13
Switch 2 GPIO12
Switch 3 GPIO14
Switch 4 GPIO27
WiFi Status LED GPIO2
Reset Button GPIO0

Required Libraries

EEPROM
ESP RainMaker
AceButton
WiFiProv
WiFi
RMaker

Project Gallery

Hardware Wiring

System Workflow

Google Assistant

ESP RainMaker

ESP32

Relay Module

Home Appliances

Getting Started

  1. Install ESP32 Board Package
  2. Install ESP RainMaker Libraries
  3. Upload Code
  4. Open ESP RainMaker App
  5. Provision via Bluetooth
  6. Add to Google Home
  7. Enjoy Smart Automation

Project Source Codes

1. ESP32 RainMaker Firmware

Controls four relays using Google Assistant, ESP RainMaker, physical switches, OTA firmware updates, EEPROM state memory, scheduling, Bluetooth provisioning, Wi-Fi reset and factory reset.

Download ESP32 Code
View Source Code


/*********************************************************
 ESP32 Google Home Automation
 Google Assistant
 ESP RainMaker
 EEPROM Memory
 OTA Updates
 Manual Switches
 Bluetooth Provisioning

 Complete source code available
 in the download button above.

**********************************************************/

#include <EEPROM.h>
#include "RMaker.h"
#include "WiFi.h"
#include "WiFiProv.h"
#include <AceButton.h>

// Remaining source code omitted
// Download complete project

Technologies Used

ESP32 ESP RainMaker Google Assistant Arduino IDE Bluetooth Provisioning OTA Updates EEPROM AceButton Wi-Fi Embedded C++

Frequently Asked Questions

Does it support Google Assistant?

Yes. All appliances can be controlled using Google Assistant voice commands after linking ESP RainMaker with Google Home.

Can I control appliances manually?

Yes. Physical wall switches work normally, and the app updates the appliance status in real time.

What happens after a power failure?

EEPROM stores the previous relay states, so all appliances return to their last state after power is restored.

Does it support OTA firmware updates?

Yes. New firmware can be uploaded wirelessly without connecting the ESP32 to a computer.

How many appliances can this project control?

This version controls four appliances independently using relays, but it can be expanded by modifying the firmware.