Profile
Rezxlnz
Back to projects

AirLink IoT

AirLink is an IoT-based fan control system that allows users to control an electric fan from a web interface over a local WiFi network.

Overview

AirLink is a local IoT-based system to remotely control an electric fan via a web interface over WiFi. It integrates a React web app with an ESP microcontroller (ESP8266/ESP32) and a relay module. Everything runs entirely within a local network using IP-based HTTP communication, ensuring ultra-low latency and maximum privacy.

AirLink Dashboard View 1
AirLink Dashboard View 1
AirLink Dashboard View 2
AirLink Dashboard View 2

Core Architecture

  1. Hardware Setup: An ESP microcontroller connects to the local WiFi and acts as a local web server to control a relay switch connected to the fan.
  2. Web Control: A React-based web dashboard sends simple HTTP requests to the ESP's IP address to trigger the relay.

Key Components & Technologies

  • Frontend: React, Vite, Tailwind CSS
  • Hardware: ESP8266/ESP32, 1-Channel Relay Module, Electric Fan
  • Communication Protocol: Local HTTP Requests

Controlling the Device

The ESP exposes endpoints to trigger the relay. The React app fetches these endpoints based on user interaction:

// Example of turning the fan ON
fetch('http://192.168.1.10/on');
// ESP C++ code to trigger the relay
digitalWrite(RELAY_PIN, HIGH);

Installation & Setup

  1. Clone the repository:

    git clone https://github.com/Rezkydesyafa/AirLink-web-IoTFan.git
    cd AirLink-web-IoTFan
    
  2. Install dependencies and run:

    npm install
    npm run dev
    
  3. Access the Web Dashboard: Open http://localhost:5173 in your browser.