Case study · IoT + AI + Embedded Control

HydroSmart — IoT-Based Water Management System

An intelligent water monitoring and motor control system built by Boopathi Mahendran, using ESP32 sensing, a real-time Python backend and a Model-Based Reflex Agent for autonomous safety and optimisation.

ESP32 Hardware Python Backend Real-Time Dashboard Relay Control

Overview

System Snapshot

System snapshot
Control ModeAUTO + SAFETY
TelemetryRealtime Stream
Decision EngineModel Reflex Agent
DeploymentESP32 + Python API

HydroSmart DNA: What Makes This Unique

State-Aware Decisions

The controller tracks transition history, not only current readings, which reduces unsafe ON/OFF relay switching.

Dual Control Integrity

Manual override is available for operators, while autonomous safety constraints remain active in parallel.

Real Hardware Proof

Validated on ESP32 + relay + sensors as a complete sensing-to-actuation loop, not a simulation-only build.

  1. Sense
  2. Validate
  3. Decide
  4. Actuate
  5. Log
HydroSmart logic cycle — each control step runs sense, validate, decide, actuate, log.

How it works

System Architecture

  1. Hardware Sensing

    ESP32 continuously reads water flow rate, temperature, current, and voltage from physical sensors.

  2. Data Transmission

    Data is securely transmitted to the Python backend through an API/websocket pipeline in real-time.

  3. Intelligent Processing

    The Model-Based Reflex Agent evaluates current thresholds and historical state transitions to determine the next optimal state.

  4. Actuation

    Backend sends precise control commands to the relay channel (ON/OFF/AUTO/SAFETY) to manage the motor.

  5. Operator Visibility

    The web dashboard receives live telemetry and action logs, providing operators with full situational awareness.

Get the code

Resources & Access

Source Repository

Access the complete codebase including hardware configurations, Python backend, and dashboard UI.

View on GitHub

Secure Download

Direct access to compiled source files. Requires authorization password.

Requirements

Hardware: ESP32, Relay Module, Sensors
Software: Python 3.8+, Node.js, Arduino IDE