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 Garage Door Opener with Telegram and ESP8266

Smart Garage Door Opener with Telegram and ESP8266

March 11, 2026 /Posted byJayesh Jain / 0

A smart garage door opener with Telegram and ESP8266 gives you complete control over your garage from anywhere in the world using a simple Telegram bot. This project is particularly valuable in Indian residential complexes and villas where manual gate operation is inconvenient — imagine opening your garage from your car without stepping out in the rain or heat. The entire build costs under ₹600 and integrates with any existing garage door mechanism.

Table of Contents

  • How the System Works
  • Required Components
  • Wiring and Circuit
  • Setting Up the Telegram Bot
  • Complete Arduino Code
  • Security Features
  • Advanced: Adding a Camera and Status Sensor
  • Frequently Asked Questions

How the System Works

The system is elegantly simple. An ESP8266 (NodeMCU) connects to your home WiFi. A Telegram bot receives commands from your phone and triggers a relay that momentarily closes the garage door’s control circuit — exactly mimicking a button press on the physical wall switch. A magnetic reed switch monitors the door’s open/closed state and sends status updates.

The Telegram interface is ideal for Indian users because WhatsApp doesn’t support bot interactions the same way, and Telegram is free, fast, and works over even slow 2G/3G connections — useful when you’re at a gate with poor signal.

Required Components

  • NodeMCU ESP8266 (any version: v1, v2, or v3)
  • 5V single-channel relay module
  • Magnetic reed switch / door sensor
  • 5V power supply (or USB mobile charger)
  • 2-core insulated wire (for relay to garage door connection)
  • Jumper wires and project box

Total cost: ₹400–₹600. Commercial smart garage openers cost ₹4,000–₹15,000 in India.

Recommended: DC5-80V ESP8266 WiFi Relay Module (1 Channel) — An all-in-one ESP8266 + relay module perfect for this project. The integrated design simplifies wiring and fits into a compact enclosure for your garage installation.

Wiring and Circuit

NodeMCU ESP8266 Connections:

Relay Module:
D1 (GPIO5)  → IN (relay signal)
3.3V or 5V  → VCC
GND         → GND

Relay NO/COM terminals → Garage door button wires
(Connect in PARALLEL with existing wall button)

Reed Switch (Door Sensor):
D2 (GPIO4)  → Reed switch terminal
GND         → Other reed switch terminal
// Enable internal pull-up in code

Power:
VIN (5V)    → USB 5V charger
GND         → GND

Garage Door Integration:
- Identify the two wires going to your wall-mounted
  push button (usually in garage/car porch wall)
- Connect relay COM and NO in parallel with those two wires
- When relay closes, it acts as a button press
Recommended: DC5V/8-80V ESP8266 WiFi Relay Module 2 Channel — Control two garage doors or add a separate gate motor control with this dual-relay ESP8266 module.

Setting Up the Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Type /newbot and follow the prompts to name your bot
  3. Copy the API token (looks like: 123456789:ABCdefGHIjklMNOpqrSTUvwxYZ)
  4. Find your Telegram Chat ID by messaging @userinfobot
  5. Note both values — you’ll need them in the code

You can also create a Telegram group and add your family members to share garage access. The bot will respond to everyone in the group.

Complete Arduino Code

#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <UniversalTelegramBot.h>
#include <ArduinoJson.h>

// WiFi credentials
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASS";

// Telegram Bot
#define BOT_TOKEN "YOUR_BOT_TOKEN"
#define CHAT_ID "YOUR_CHAT_ID" // Your personal chat ID

#define RELAY_PIN D1
#define DOOR_SENSOR D2

X509List cert(TELEGRAM_CERTIFICATE_ROOT);
WiFiClientSecure client;
UniversalTelegramBot bot(BOT_TOKEN, client);

bool doorOpen = false;
unsigned long lastTimeBotRan = 0;
const int botRequestDelay = 1000;

void triggerGarage() {
  digitalWrite(RELAY_PIN, LOW); // Activate relay
  delay(500);
  digitalWrite(RELAY_PIN, HIGH); // Deactivate relay
}

void handleMessages(int numNewMessages) {
  for (int i = 0; i  botRequestDelay) {
    int numNewMessages = bot.getUpdates(bot.last_message_received + 1);
    while (numNewMessages) {
      handleMessages(numNewMessages);
      numNewMessages = bot.getUpdates(bot.last_message_received + 1);
    }
    lastTimeBotRan = millis();
    
    // Monitor door state changes
    bool currentState = digitalRead(DOOR_SENSOR) == LOW;
    if (currentState != doorOpen) {
      doorOpen = currentState;
      bot.sendMessage(CHAT_ID, 
        "Garage door " + String(doorOpen ? "OPENED" : "CLOSED"), "");
    }
  }
}

Security Features

Security is paramount for a garage opener. Implement these measures:

Whitelist Chat IDs

Store authorised Chat IDs in an array. Only these users can trigger the garage. Add family members by noting their Telegram Chat IDs.

String authorisedUsers[] = {
  "123456789", // You
  "987654321", // Spouse
  "555555555"  // Security guard
};

Auto-Close Timer

If the garage door has been open for more than 30 minutes, automatically trigger it to close and send an alert. This prevents accidentally leaving the garage open overnight — a common security concern in Indian neighbourhoods.

Usage Log

Log every open/close event with timestamp to EEPROM or an online spreadsheet via Google Sheets API. Useful for security audits.

Night Mode Alert

Send an urgent alert if the garage opens between 11 PM and 6 AM — potential security breach indication.

Recommended: 5V Modbus RTU 4 Channel Relay Module — Expand your smart home with 4-channel control: garage door, main gate, pedestrian gate, and garden lights — all from a single controller module.

Advanced: Adding a Camera and Status Sensor

Enhance your garage opener with visual monitoring:

ESP32-CAM Integration

Add an ESP32-CAM module pointed at the garage entrance. When the garage opens, it automatically captures and sends a photo to your Telegram chat — you can visually verify who opened the garage.

Motion Sensor Alert

Add a PIR motion sensor inside the garage. If motion is detected when the garage is supposed to be empty, send an immediate Telegram alert — could indicate an intruder or a pet trapped inside.

Vehicle Detection

Use an ultrasonic sensor (HC-SR04) to detect whether a car is present in the garage. Combined with the door sensor, this tells you definitively whether the car is home — useful for family coordination in Indian joint households.

Recommended: 8 Channel SSR Module (OMRON) — For large bungalows with multiple gates and garage doors, this solid-state relay module provides silent, reliable switching for all entry points.

Frequently Asked Questions

Does this work with all types of garage doors in India?

Yes, as long as your garage motor has a wall-mounted push button, you can parallel-connect the relay. This covers rolling shutter motors (most common in India), sectional doors, and sliding gate motors. The relay mimics a button press regardless of the motor type.

What if my internet goes down?

When WiFi or internet is unavailable, Telegram control won’t work. Always maintain a physical backup: the original wall button. You could also add a GSM module (SIM800L) for SMS-based control when internet is down — useful in areas with unreliable broadband.

Is Telegram secure enough for controlling my garage?

Telegram uses strong encryption. The Chat ID whitelist ensures only authorised users can send commands. For additional security, add a PIN verification step in the bot conversation before accepting commands.

How far can the relay be from the garage motor controller?

The relay output can drive wires up to 30–50 metres. Use standard 2-core speaker wire or insulated alarm wire. The relay switches at low voltage (the motor’s control circuit), not at mains voltage, so long cable runs are safe and practical.

Can I share access with my building security guard?

Yes. Add the guard’s Telegram Chat ID to your whitelist. You can also create a separate Telegram bot token for the guard with limited commands (open only, no admin functions). Revoke access instantly by removing their ID from the whitelist.

Shop Home Automation at Zbotic →

Tags: esp8266, home automation, nodemcu, smart garage door, smart home India, Telegram Bot
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
PCB Panelization: V-Cut and Ta...
blog pcb panelization v cut and tab routing for batch boards 598074
blog samd21 cortex m0 arduino zero advanced projects guide 598086
SAMD21 Cortex-M0 Arduino Zero:...

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