Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Home Automation & Smart Devices

Voice-Controlled Home Automation: Google Assistant + ESP32

Voice-Controlled Home Automation: Google Assistant + ESP32

April 1, 2026 /Posted by / 0

Voice-controlled home automation is no longer a luxury reserved for those who can afford premium smart home ecosystems. With an ESP32 microcontroller and Google Assistant, you can build a voice-controlled smart home system that lets you say “Hey Google, turn on the bedroom light” — and it actually works, reliably, for a fraction of the cost of commercial solutions available in India.

In this guide, we cover three different methods to connect your ESP32 to Google Assistant, from the simplest (Sinric Pro) to the most powerful (Home Assistant with Nabu Casa).

Table of Contents

  • How Voice-Controlled Home Automation Works
  • Components You Need
  • Method 1: Sinric Pro (Easiest)
  • Method 2: Blynk IoT + IFTTT
  • Method 3: Home Assistant + Nabu Casa (Most Powerful)
  • Setting Up Multiple Devices
  • Indian-Specific Considerations
  • Frequently Asked Questions
  • Conclusion

How Voice-Controlled Home Automation Works

When you say “Hey Google, turn on the fan”, here is the chain of events:

  1. Google processes your voice: Your phone or Nest speaker sends the audio to Google’s servers, which interpret the command
  2. Google contacts the smart home service: Google Home sends an ON command to the linked smart home platform (Sinric Pro, Home Assistant, etc.)
  3. The platform relays to your ESP32: The platform sends the command over the internet to your ESP32 via MQTT or WebSocket
  4. ESP32 activates the relay: The ESP32 receives the command and switches the relay ON, turning on the fan

The entire process takes about 1–2 seconds from voice command to appliance response.

Components You Need

🛒 Recommended: ESP32 Development Board (38 Pin) — The ESP32 is ideal for voice-controlled automation because it has built-in WiFi and Bluetooth, plus enough GPIO pins to control multiple appliances.
🛒 Recommended: 4 Channel 5V Relay Module — Control up to 4 appliances with voice commands. Each channel handles 230V AC loads independently.

Additional requirements:

  • A Google Home speaker or Android phone with Google Assistant
  • A stable WiFi connection at home
  • A Google account
  • Arduino IDE installed on your computer
  • Jumper wires for connections

Method 1: Sinric Pro (Easiest)

Sinric Pro is a free cloud service designed specifically for connecting DIY IoT devices to Google Home and Alexa. It is the simplest way to add voice control to your ESP32 projects.

Step 1: Create a Sinric Pro Account

  1. Go to sinric.pro and create a free account
  2. Add a new device — select “Switch” as the device type
  3. Note down your App Key, App Secret, and Device ID

Step 2: Install Libraries in Arduino IDE

Install these libraries via the Arduino Library Manager:

  • SinricPro (by Boris Jaeger)
  • ArduinoJson (by Benoit Blanchon)
  • WebSockets (by Markus Sattler)

Step 3: Upload the Code

#include <WiFi.h>
#include <SinricPro.h>
#include <SinricProSwitch.h>

#define WIFI_SSID     "Your_WiFi"
#define WIFI_PASSWORD  "Your_Password"
#define APP_KEY       "your-sinric-app-key"
#define APP_SECRET    "your-sinric-app-secret"
#define DEVICE_ID_1   "your-device-id-1"
#define DEVICE_ID_2   "your-device-id-2"
#define DEVICE_ID_3   "your-device-id-3"
#define DEVICE_ID_4   "your-device-id-4"

#define RELAY1 26
#define RELAY2 27
#define RELAY3 14
#define RELAY4 12

// Callback when Google/Alexa sends command
bool onPowerState1(const String &deviceId, bool &state) {
  digitalWrite(RELAY1, state ? LOW : HIGH);
  return true;
}
bool onPowerState2(const String &deviceId, bool &state) {
  digitalWrite(RELAY2, state ? LOW : HIGH);
  return true;
}
bool onPowerState3(const String &deviceId, bool &state) {
  digitalWrite(RELAY3, state ? LOW : HIGH);
  return true;
}
bool onPowerState4(const String &deviceId, bool &state) {
  digitalWrite(RELAY4, state ? LOW : HIGH);
  return true;
}

void setup() {
  Serial.begin(115200);
  
  pinMode(RELAY1, OUTPUT);
  pinMode(RELAY2, OUTPUT);
  pinMode(RELAY3, OUTPUT);
  pinMode(RELAY4, OUTPUT);
  
  digitalWrite(RELAY1, HIGH);
  digitalWrite(RELAY2, HIGH);
  digitalWrite(RELAY3, HIGH);
  digitalWrite(RELAY4, HIGH);
  
  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }
  Serial.println("WiFi connected");
  
  SinricProSwitch &switch1 = SinricPro[DEVICE_ID_1];
  switch1.onPowerState(onPowerState1);
  
  SinricProSwitch &switch2 = SinricPro[DEVICE_ID_2];
  switch2.onPowerState(onPowerState2);
  
  SinricProSwitch &switch3 = SinricPro[DEVICE_ID_3];
  switch3.onPowerState(onPowerState3);
  
  SinricProSwitch &switch4 = SinricPro[DEVICE_ID_4];
  switch4.onPowerState(onPowerState4);
  
  SinricPro.begin(APP_KEY, APP_SECRET);
}

void loop() {
  SinricPro.handle();
}

Step 4: Link Sinric Pro to Google Home

  1. Open the Google Home app on your phone
  2. Tap the “+” icon → Set up device → Works with Google
  3. Search for “Sinric Pro” and sign in with your Sinric account
  4. Your devices will appear in Google Home automatically

Now you can say:

  • “Hey Google, turn on the bedroom light”
  • “Hey Google, turn off the fan”
  • “Hey Google, turn on all lights”

Method 2: Blynk IoT + IFTTT

Blynk IoT provides a mobile app dashboard for controlling your ESP32, and when combined with IFTTT (If This Then That), you can add Google Assistant voice control.

How It Works

  1. Create a Blynk project with virtual pins mapped to your relays
  2. Create IFTTT applets: “If Google Assistant (turn on light), Then Blynk (set V1 to 1)”
  3. When you speak the command, IFTTT triggers Blynk, which sends the command to your ESP32

This method is more complex than Sinric Pro but gives you the excellent Blynk mobile dashboard in addition to voice control.

Method 3: Home Assistant + Nabu Casa (Most Powerful)

For the ultimate voice-controlled smart home, combine Home Assistant with Nabu Casa cloud service:

  1. Install Home Assistant on a Raspberry Pi, old laptop, or mini PC
  2. Connect ESP32 devices via MQTT (Mosquitto broker) or ESPHome
  3. Subscribe to Nabu Casa (₹500/month) for Google Home and Alexa integration
  4. Configure rooms and devices in Home Assistant

Home Assistant offers unmatched automation capabilities:

  • Complex automation rules (e.g., “Turn on porch light at sunset only on weekdays”)
  • Device groups and scenes (“Movie mode” dims lights and turns on the TV)
  • Presence detection (auto-off when everyone leaves)
  • Energy monitoring and usage analytics
  • Integration with 2,000+ smart home brands
🛒 Recommended: 2 Channel 30A Relay Module — Heavy-duty relay module for controlling high-power appliances like geysers and water heaters via voice commands.

Setting Up Multiple Devices

A typical Indian home might have 8–12 switches you want to automate. Here is a practical approach:

Room Devices ESP32 Channels
Bedroom Light, Fan, AC 1 ESP32 + 3 relays
Living Room Light, Fan, TV outlet 1 ESP32 + 3 relays
Kitchen Light, Exhaust fan 1 ESP32 + 2 relays
Bathroom Light, Geyser 1 ESP32 + 2 relays

That is 4 ESP32 boards and 10 relays, controlling your entire home for approximately ₹3,000–₹4,000 in components. Name each device clearly in Google Home (e.g., “bedroom light”, “kitchen exhaust”) for intuitive voice control.

Indian-Specific Considerations

  • 230V AC compatibility: Always use relays rated for 250V AC, 10A minimum. Indian mains voltage can spike to 250V during low-demand hours.
  • Power cuts: After a power cut, the ESP32 takes 3–5 seconds to boot and reconnect to WiFi. Google Assistant commands will not work during this brief window.
  • WiFi routers: Many Indian ISPs provide basic routers that struggle with multiple IoT devices. If you plan to have more than 8–10 ESP32 devices, consider upgrading to a router that supports more concurrent connections.
  • Monsoon: If installing ESP32 switches in semi-outdoor locations (balcony, garage), use IP65-rated enclosures to protect against humidity.
  • Language: Google Assistant in India supports Hindi voice commands. You can say “Hey Google, bedroom ka light on karo” if you set your device names in Hindi.
🛒 Recommended: 5V 8-Channel Relay Module — For larger installations, this 8-channel module lets one ESP32 control 8 appliances. Ideal for centralised control of an entire room or floor.

Frequently Asked Questions

Can I use Google Home Mini for voice control?

Yes. Any Google Home device or Android phone with Google Assistant works. The Google Home Mini (available in India for around ₹2,500–₹4,000) is the most popular choice for placing in each room.

Does voice control work without internet?

No. Google Assistant requires an internet connection to process voice commands. If your internet is down, you can still control the switches via the ESP32’s local web interface or physical buttons.

Can I control a ceiling fan speed with voice?

With a relay, you can only turn the fan ON or OFF. For speed control, you would need a TRIAC dimmer module and configure the device as a “fan” in Sinric Pro or Home Assistant, which supports speed levels.

Is Sinric Pro free?

Sinric Pro offers a free tier with up to 3 devices. For more devices, paid plans start at around $3/month. For a full house automation, Home Assistant with MQTT is the most cost-effective long-term solution.

Can I use Alexa instead of Google Assistant?

Yes. Both Sinric Pro and Home Assistant support Amazon Alexa. The ESP32 code remains the same — only the voice assistant app configuration differs.

Conclusion

Adding voice control to your DIY home automation system transforms the experience from “cool tech project” to “genuinely useful daily convenience.” Being able to say “Hey Google, turn off all lights” as you drift off to sleep, or “Hey Google, turn on the geyser” while still in bed on a cold morning — these small conveniences add up to a significantly better quality of life.

We recommend starting with Sinric Pro for simplicity and migrating to Home Assistant as your system grows. Either way, the ESP32 is your ideal hardware platform — powerful, affordable, and incredibly well-supported by the maker community.

Get started with voice-controlled home automation today. Browse ESP32 development boards, relay modules, and all the components you need at Zbotic.in — India’s largest electronics component store.

Tags: ESP32, Google Assistant, smart home, voice control
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Bluetooth Module HC-05: Serial...
blog bluetooth module hc 05 serial communication with arduino 612479
blog e bike speed controller kt controller setup and programming 612484
E-Bike Speed Controller: KT Co...

Related posts

Svg%3E
Read more

MQTT for Home Automation: ESP32 + Mosquitto + Home Assistant

April 1, 2026 0
MQTT is the backbone protocol of professional home automation systems. If you are building a smart home with multiple ESP32... Continue reading
Svg%3E
Read more

Curtain and Blind Automation: Stepper Motor Controller

April 1, 2026 0
Curtain automation is one of the most satisfying smart home upgrades you can build. Imagine your curtains opening automatically at... Continue reading
Svg%3E
Read more

Smart Doorbell with Camera: ESP32-CAM Video Intercom

April 1, 2026 0
A smart doorbell with a camera lets you see who is at your door from your phone, even when you... Continue reading
Svg%3E
Read more

Blynk IoT Platform: Control Arduino and ESP32 from Mobile

April 1, 2026 0
The Blynk IoT platform is the fastest way to control your Arduino and ESP32 projects from your mobile phone. Instead... Continue reading
Svg%3E
Read more

PIR Sensor Automatic Light: Save Electricity with Motion Detection

April 1, 2026 0
PIR sensor automatic lights are the simplest and most effective way to save electricity in Indian homes. By automatically turning... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now