Home About Us Solutions Smart Home Products Blog
Knowledge Base Energy Calculator
Contact Call +91 92164 26512
Local-first smart home controller

4 Switches + 1 Smooth Fan Regulator

A professional ESP32-based automation module for homes, offices, and small commercial spaces: four relay-controlled appliances, one TRIAC ceiling fan regulator, local web control, mobile app support, MQTT, OTA updates, and an easy path to voice integration.

ESP32 AsyncWebServer MQTT Flutter App OTA Ready
Automation control panel and dashboard
Room Controller Online
Light 1ON
Light 2OFF
SocketON
ApplianceOFF
Ceiling FanLevel 3
4 Relay Outputs

Lights, sockets, or appliance loads through isolated relay channels.

1 Fan Regulator

TRIAC phase-angle control with zero-cross synchronization.

100% Local First

Works through local WiFi, web dashboard, physical buttons, and MQTT.

OTA Maintainable

Remote firmware updates and persistent configuration storage.

System Blueprint

Designed for Local Control Today and Cloud Migration Tomorrow

The recommended base is custom ESP32 firmware using Arduino or ESP-IDF, AsyncWebServer, WebSocket, MQTT, and persistent device settings. Blynk can be used for quick trials, but the long-term product should stay brandable, secure, and independent.

ESP32 Firmware

WiFi station + access point mode, captive portal setup, mDNS discovery, REST API, WebSocket state sync, OTA updates, and Preferences or LittleFS storage.

Relay + Fan Hardware

Four safe GPIO relay outputs and one zero-cross TRIAC fan channel using BTA16, MOC3052 or suitable random-phase optotriac isolation, snubber design, fuse protection, and enclosure-grade wiring.

Flutter App

Android, iOS, and web app with local device discovery, custom names, toggles, fan slider, schedules, scenes, theme support, and offline state caching.

MQTT + Voice Path

Local Mosquitto or cloud MQTT topics for commands and states, compatible with Home Assistant, Google Assistant, Alexa, or Sinric Pro for fast voice trials.

User Experience

Simple for Customers, Flexible for Engineers

Users get familiar switch controls, custom device names, fan speed levels, schedules, and manual fallback buttons. Engineers get clean APIs, MQTT topics, OTA maintenance, and upgrade room for sensors, power monitoring, or cloud dashboards.

Custom namesRename all four switches and the fan from the web interface or app.
Real-time syncWebSocket updates keep physical buttons, web dashboard, app, and MQTT in step.
Schedules and timersPer-device automation for lights, sockets, and fan speed levels.
Factory resetLong button press clears credentials and starts setup access point mode.
My Room
Kitchen Light
Wall Socket
Study Light
Appliance
Kitchen Fan Level 3
MQTT topics home/room/light1/set home/room/fan/speed home/room/state
Implementation Detail

Recommended Prototype Scope

The first build should focus on reliable local operation, safe AC hardware, and clean interfaces. Cloud, analytics, and voice can be layered on after the device behavior is proven.

Firmware Modules

  • Relay control with persisted power-failure restoration.
  • TRIAC fan control with zero-cross interrupt and 5 speed levels.
  • AsyncWebServer dashboard with REST and WebSocket APIs.
  • WiFiManager or equivalent captive portal for first setup.
  • MQTT client with configurable broker, topics, auth, and retained state.

Mobile App Modules

  • mDNS discovery plus manual IP or QR code pairing.
  • Material 3 dashboard with switches and fan speed slider.
  • Rename controls and sync names back to ESP32 storage.
  • Schedule, scene, OTA trigger, password, and factory reset screens.
  • Speech-to-text button for in-app voice commands.

Hardware Notes

  • Use ESP32 safe pins and avoid boot strapping pins for relays.
  • Use opto-isolation, fuse, MOV, snubber, and clearance for 220V AC.
  • Separate low-voltage ESP32 ground strategy from mains handling.
  • Add manual push buttons and status LEDs for service fallback.
  • Optional expansion: DHT22, HLW8011, current sensing, or buzzer alerts.
Practical Build Plan

From Bench Prototype to Professional Product

01

Prototype Hardware

Bring up ESP32, relays, zero-cross detection, and isolated TRIAC fan control on the bench before connecting real loads.

02

Local Firmware

Implement dashboard, API, WebSocket sync, persistent names, physical buttons, OTA, and basic authentication.

03

Flutter App

Build Android, iOS, and web control with discovery, renaming, schedule, fan slider, scene, and settings screens.

04

Voice + Cloud

Integrate Home Assistant or Sinric Pro through MQTT, then move to a hosted broker, AWS IoT, or ESP RainMaker when ready.

Need a prototype or production-ready design?

We can help select components, review the 220V AC circuit, prepare firmware architecture, and plan a manufacturable enclosure.

Safety note: Relay and TRIAC fan regulator circuits involve 220V AC. Use certified enclosures, proper fusing, isolation, clearances, strain relief, and qualified electrical review before installation or production.
Call Now WhatsApp
Chat on WhatsApp