Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›IoT & Wireless
  4. ›Wi-Fi Smart Switches and Relays

How-to · Intermediate · 3 min read

Wi-Fi Smart Switches and Relays

Sonoff, Tasmota, ESPHome and ESP8266 Relay Boards

By Geekobot Learning Team · Updated 29 Oct 2026

On this page
Short answerTypes of smart relayFirmware optionsWiring safelySetting up with Home AssistantTry itCommon mistakesFAQsParts and next steps
Short answer

Smart switches are Wi-Fi relays that turn lights and appliances on and off. Many use an ESP8266 or ESP32 that can run open firmware such as Tasmota or ESPHome for local control through MQTT or Home Assistant. Choose by relay rating and channels, flash firmware before installation, and have mains wiring done by a qualified electrician.

Key specs at a glance

Chip
ESP8266 or ESP32 with a Wi-Fi relay
Relay rating
Typically 10 A at 250 V AC; check the device label
Channels
1, 2 or 4 outputs
Firmware
Original app, Tasmota or ESPHome
Integration
MQTT, HTTP and Home Assistant
Safety
Mains wiring is dangerous; use enclosed, certified parts
!Safety: Mains voltage can kill

This part is often wired to 230 V mains. Do all wiring with the plug pulled out, keep mains wires inside a closed box with strain relief, add a fuse, and never touch the board while it is plugged in. If you are new to mains wiring, have an electrician check it before you switch on.

01

Types of smart relay

Pick the form that suits your installation.

TypeHow it is usedNotes
Inline switch (Sonoff Basic / Mini)Behind a wall switch or in a junction boxSmall, needs correct neutral and live wiring
ESP8266 relay board (1/2/4 channel)DIY panels and low-voltage loadsBare board; mount in an enclosure
Smart plugPlugs into a wall socketSimplest and safest for appliances
Hub (Home Assistant Green)Local controller for all devicesSee the MQTT and Home Assistant guide
Inline switch (Sonoff Basic / Mini)
How it is used:
Behind a wall switch or in a junction box
Notes:
Small, needs correct neutral and live wiring
ESP8266 relay board (1/2/4 channel)
How it is used:
DIY panels and low-voltage loads
Notes:
Bare board; mount in an enclosure
Smart plug
How it is used:
Plugs into a wall socket
Notes:
Simplest and safest for appliances
Hub (Home Assistant Green)
How it is used:
Local controller for all devices
Notes:
See the MQTT and Home Assistant guide
02

Firmware options

Open firmware keeps your devices local, so they work without the cloud. Tasmota has a web interface, templates for hundreds of devices and MQTT. ESPHome compiles firmware from a short YAML file and connects natively to Home Assistant. To flash, connect a USB serial adapter to the programming pads with the board powered from 3.3 V (never while connected to mains), hold the boot pin low and upload. Some devices support over-the-air flashing in DIY mode.

03

Wiring safely

  • ✓Disconnect mains at the breaker before touching any wiring.
  • ✓Use devices with an enclosure and the right certification for your region.
  • ✓Match the relay rating to the load, and derate for motors and inductive loads.
  • ✓Keep low-voltage and mains wiring separated and use strain relief.
  • ✓If you are not trained in mains wiring, hire an electrician. See relay modules and SSR vs relay.
04

Setting up with Home Assistant

  1. 1
    Flash Tasmota or ESPHome and connect the device to Wi-Fi.
  2. 2
    Configure the MQTT broker address or use the Home Assistant API.
  3. 3
    Name the device and the topic.
  4. 4
    Add it in Home Assistant and test from a phone.
  5. 5
    Set a fixed IP or DHCP reservation so the device is always found.
  6. 6
    Add a physical switch input so it works even when Wi-Fi is down.
05

Try it: Fuse sizing calculator

Change the values and the diagram and results update as you type.

06

Common mistakes to avoid

  • !Flashing the board while it is connected to mains.
  • !Exceeding the relay current rating.
  • !Leaving mains wiring exposed.
  • !Using weak Wi-Fi signal so the device drops off.
  • !Skipping a backup of the configuration.
07

Frequently asked questions

Is Tasmota legal and safe?

Yes. It is open-source firmware. Flashing your own device voids some warranties.

Tasmota or ESPHome?

Tasmota is quick with a web UI. ESPHome suits Home Assistant users who want YAML configuration.

Can the relay drive a motor?

Only within its rating, and motors need extra margin because of start-up current.

Do I need a hub?

Not for Wi-Fi devices, but a hub such as Home Assistant gives automations and dashboards.

Why does the device keep going offline?

Weak Wi-Fi or a poor power supply. Check signal strength and supply.

Parts for this guide

  • LC-Relay-ESP12-1R-MV ESP8266 1-Channel Wi-Fi Relay Module
    ₹779View
  • ESP8266 ESP-12F 4-Channel Relay Module DC7-28V/5V 30A
    ₹1,099View
  • ESP8266 ESP-12F Wi-Fi Relay Module w/ AC-DC Power Supply
    ₹709View
  • Home Assistant Green Smart Home Hub
    ₹23,149View
Shop Smart Home Switches, Relays & Energy Meters

Calculators

Fuse sizing calculatorAc power factor calculator

Terms in this guide

TasmotaOpen-source firmware for ESP8266 and ESP32 smart devices that adds a web interface, MQTT and local control instead of a cloud app.MQTTMessage Queuing Telemetry Transport: a lightweight publish/subscribe messaging protocol where devices send and receive messages on named topics through a broker.RelayAn electrically operated switch: a coil moves contacts that switch a separate circuit.SSRSolid-state relay: an electronic switch with no moving parts, controlled like a relay.Normally closedA switch or relay contact that conducts until it is pressed or energised (NC), the opposite of normally open (NO).

Keep learning

Concept explainerIntermediateMQTT and Home Assistant for ESP32MQTT is a lightweight messaging system: devices publish messages to named topics on a broker, and anything subscribed to that topic receives them.3 min read · IoT & WirelessComponent guideBeginnerRelay ModulesA relay module is an electrically controlled switch that lets a microcontroller turn a separate circuit on or off, such as a 12 V pump or a mains lamp.4 min read · Switches, Relays & InputComparisonIntermediateSolid-State Relay vs Mechanical RelayA mechanical relay closes metal contacts with a coil, so it switches AC or DC with almost no voltage drop or leakage, but it clicks and wears out.3 min read · Switches, Relays & InputComponent guideBeginnerESP8266 NodeMCUThe ESP8266 is a 3.3 V Wi-Fi microcontroller, and NodeMCU is the most common board built around it.3 min read · Boards & MicrocontrollersComponent guideBeginnerESP32 GuideThe ESP32 is a low-cost 3.3 V microcontroller from Espressif with built-in Wi-Fi and Bluetooth, used for IoT devices, smart-home controllers and web dashboards.5 min read · Boards & MicrocontrollersComponent guideAdvancedPZEM-004T AC Energy Meter Module with ESP32The PZEM-004T is a mains energy meter module that measures AC voltage, current, power, energy, frequency and power factor.3 min read · IoT & Wireless

Sources

  • Tasmota documentation
  • ESPHome documentation
  • Relay manufacturer data sheets

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerTypes of smart relayFirmware optionsWiring safelySetting up with Home AssistantTry itCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide4 items · ₹25,736

LC-Relay-ESP12-1R-MV ESP8266 1-Channel Wi-Fi Relay Module · ESP8266 ESP-12F 4-Channel Relay Module DC7-28V/5V 30A · ESP8266 ESP-12F Wi-Fi Relay Module w/ AC-DC Power Supply · Home Assistant Green Smart Home Hub

Ask the Community

Ask a question