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

Smart Curtain Motor with ESP32 and Home Assistant India

Smart Curtain Motor with ESP32 and Home Assistant India

March 11, 2026 /Posted byJayesh Jain / 0

A smart curtain motor with ESP32 and Home Assistant is one of the most satisfying home automation projects you can build in India. Imagine your curtains automatically opening at sunrise and closing when the afternoon sun heats up your room — all controlled via your smartphone or a voice command to Google Assistant. This project is especially popular in Indian homes where heavy curtains are used year-round for privacy and sun protection.

Table of Contents

  • Project Overview and Components
  • Choosing the Right Motor for Indian Curtains
  • Wiring the ESP32 to Motor Driver
  • ESPHome Configuration
  • Home Assistant Integration
  • Automation Ideas for Indian Homes
  • Physical Installation Tips
  • Frequently Asked Questions

Project Overview and Components

This smart curtain motor project uses an ESP32 microcontroller running ESPHome firmware, connected to a stepper or DC gear motor that drives your curtain rail. The total cost is typically between ₹800–₹1,500 in India — a fraction of commercial smart curtain motors like Zemismart or Yooda which cost ₹3,000–₹8,000.

Required Components

  • ESP32 development board (38-pin or 30-pin)
  • 28BYJ-48 stepper motor + ULN2003 driver (or DC gear motor + L298N)
  • Hall effect sensor or optical endstop (for position detection)
  • 5V power supply (sufficient for ESP32 + motor)
  • 3D printed or aluminium curtain rail adapter
  • Jumper wires and a small enclosure
Recommended: DC5-80V ESP8266 WiFi Relay Module — Use as an auxiliary control switch alongside your ESP32 for manual override capability in your smart curtain system.

Choosing the Right Motor for Indian Curtains

The choice of motor depends on your curtain weight and rail length. Indian homes typically use heavy cotton or blackout curtains weighing 500g–2kg per panel.

28BYJ-48 Stepper Motor (Recommended for Light Curtains)

This ₹80–₹120 stepper motor is ideal for lightweight curtains up to 1kg. Its built-in gear reduction provides good torque and precise position control. The ULN2003 driver module makes interfacing with ESP32 simple.

  • Torque: 34.3 mN·m
  • Steps: 2048 per revolution (in half-step mode)
  • Operating voltage: 5V
  • Best for: Single-panel curtains, lightweight fabric

DC Gear Motor with L298N (Recommended for Heavy Curtains)

For heavy Indian curtains, a 12V DC gear motor (RPM: 10–60) with L298N motor driver provides more torque. Add a limit switch or hall sensor to detect open/close positions.

  • Torque: Up to 5–10 kg·cm depending on model
  • Speed control via PWM
  • Best for: Heavy blackout curtains, double-panel setups

Wiring the ESP32 to Motor Driver

For the 28BYJ-48 stepper with ULN2003:

ESP32 Pin  →  ULN2003
GPIO 12   →  IN1
GPIO 14   →  IN2
GPIO 27   →  IN3
GPIO 26   →  IN4
5V        →  VCC
GND       →  GND

Endstop (Open):
GPIO 34   →  Left limit switch (NO)
GPIO 35   →  Right limit switch (NO)
GND       →  Switch common
Recommended: ESP32 LoRa with OLED Display — The OLED display shows current curtain position percentage, great for monitoring without opening the Home Assistant app.

ESPHome Configuration

ESPHome has a built-in cover component that integrates seamlessly with Home Assistant. Here is a configuration for stepper-based curtains:

esphome:
  name: curtain-motor

esp32:
  board: esp32dev

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:
logger:
ota:

stepper:
  - platform: uln2003
    id: my_stepper
    pin_a: GPIO12
    pin_b: GPIO14
    pin_c: GPIO27
    pin_d: GPIO26
    max_speed: 250 steps/s
    sleep_when_done: true

cover:
  - platform: endstop
    name: "Living Room Curtain"
    open_endstop: GPIO34
    close_endstop: GPIO35
    open_action:
      - stepper.set_target:
          id: my_stepper
          target: 0
    close_action:
      - stepper.set_target:
          id: my_stepper
          target: 2048
    stop_action:
      - stepper.set_target:
          id: my_stepper
          target: !lambda return id(my_stepper).current_position;

Home Assistant Integration

Once ESPHome is flashed and connected to WiFi, Home Assistant discovers the curtain device automatically via mDNS. The curtain appears as a cover entity with full open/close/stop/position controls.

Lovelace Card for Curtains

type: cover
entity: cover.living_room_curtain
name: Living Room Curtains
show_buttons_control: true
show_position_control: true
show_tilt_position_control: false

You can also use the popular Mushroom Cover Card from HACS for a more visually appealing control with curtain icons that animate as the curtain moves.

Automation Ideas for Indian Homes

The real value of a smart curtain motor comes through automations. Here are India-specific ideas:

Sunrise/Sunset Automation

Automatically open curtains 30 minutes after sunrise and close them at sunset. In Indian cities, sunrise varies from 5:30 AM to 7:00 AM seasonally — Home Assistant uses your GPS coordinates for accurate local sunrise times.

alias: Morning Curtains
trigger:
  - platform: sun
    event: sunrise
    offset: "+00:30:00"
action:
  - service: cover.open_cover
    target:
      entity_id: cover.living_room_curtain

Temperature-Based Automation

Close curtains automatically when indoor temperature exceeds 32°C (common in Indian summers). Combine with an AM2302/DHT22 sensor to protect the room from afternoon heat.

Privacy Mode

Close all curtains when you activate “Guest Mode” or “Movie Mode” via a single dashboard button. Indian joint families particularly appreciate privacy automations.

Power Outage Awareness

Use a UPS/inverter monitor integration to ensure curtains retract to a safe position during power cuts — important since stepper motors lose their position memory when power is removed.

Recommended: Uno WiFi R3 with ESP8266 — An alternative brain for your curtain motor project if you prefer Arduino IDE over ESPHome, with built-in WiFi for Home Assistant MQTT integration.

Physical Installation Tips

Installation is the trickiest part. Indian curtain rails vary widely — from simple plastic tracks to aluminium double-track systems.

Curtain Track Adapter

3D print or purchase a pulley adapter that attaches to your existing curtain track. The motor drives the pulley via a cord or direct gear meshing with the track.

Mounting the Motor Assembly

  • Mount the motor at the wall end of the curtain track
  • Use M3 screws and a custom bracket (easily 3D printable)
  • Ensure the motor housing doesn’t touch the wall to avoid vibration noise
  • Run 5V power cable along the curtain pelmet or wall edge

Position Calibration

After installation, calibrate the fully open and closed positions via Home Assistant’s developer tools. Store these as step counts in EEPROM so the motor remembers its position after power cuts.

Recommended: Waveshare 8-Channel Relay Module for Pi Pico — Control multiple curtain motors across different rooms from a single Raspberry Pi Pico-based controller integrated with Home Assistant.

Frequently Asked Questions

Can I use this system with track curtains (the type common in Indian flats)?

Yes. The most common Indian flat curtain tracks (plastic C-track or I-track) can be motorised with a cord-driven system. The motor pulls a looped cord attached to the curtain carrier. This approach requires no modification to your existing track.

What happens when power goes out?

For stepper motors, the curtain stays in its last position (motor holds when powered off). For DC motors, add a manual override cord so family members can open/close curtains without electronics. Always include a physical button for safety.

How much does this project cost in India?

A complete DIY smart curtain motor costs ₹700–₹1,500 per curtain depending on motor choice. This compares favourably to commercial smart curtain motors (₹3,000–₹8,000) while offering superior Home Assistant integration.

Is ESPHome mandatory or can I use Tasmota?

Both work, but ESPHome is strongly recommended for motor/cover control as it has native stepper motor and endstop support. Tasmota’s stepper support is limited and requires custom Berry scripting for position tracking.

Can I control curtains with Google Assistant or Alexa?

Yes. Once in Home Assistant, curtains can be exposed to Google Home or Alexa via the official Home Assistant cloud integration (Nabu Casa) or local voice assistants. Voice commands like “Hey Google, open the bedroom curtains” work seamlessly.

Shop Home Automation at Zbotic →

Tags: curtain automation, ESP32, ESPHome, home assistant, smart curtain motor, smart home India
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
Best Coding Platforms for Elec...
blog best coding platforms for electronics students india 2026 597982
blog voc gas sensor sgp30 air quality monitoring with esp32 597989
VOC Gas Sensor SGP30: Air Qual...

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