State-Aware Decisions
The controller tracks transition history, not only current readings, which reduces unsafe ON/OFF relay switching.
← Back to all projects by Boopathi
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.
Overview
| Control Mode | AUTO + SAFETY |
|---|---|
| Telemetry | Realtime Stream |
| Decision Engine | Model Reflex Agent |
| Deployment | ESP32 + Python API |
The controller tracks transition history, not only current readings, which reduces unsafe ON/OFF relay switching.
Manual override is available for operators, while autonomous safety constraints remain active in parallel.
Validated on ESP32 + relay + sensors as a complete sensing-to-actuation loop, not a simulation-only build.
How it works
ESP32 continuously reads water flow rate, temperature, current, and voltage from physical sensors.
Data is securely transmitted to the Python backend through an API/websocket pipeline in real-time.
The Model-Based Reflex Agent evaluates current thresholds and historical state transitions to determine the next optimal state.
Backend sends precise control commands to the relay channel (ON/OFF/AUTO/SAFETY) to manage the motor.
The web dashboard receives live telemetry and action logs, providing operators with full situational awareness.
Screenshots & hardware
Secure entry portal with role-based access control. Ensures only authorized operators can access motor controls and live telemetry.
Real-time situational awareness displaying stage state, flow, temperature, and motor current. Highlights staged motor logic states.
Hybrid interface combining measured output with direct relay actions. Allows manual override while agent handles autonomous runtime.
Time-series visualization for post-run analysis, threshold tuning, and anomaly detection. Proves motor response and pipeline behavior.
End-to-end integration proof featuring ESP32 controller, relay module, and sensor wiring. Validates physical to software connection.
Get the code
Access the complete codebase including hardware configurations, Python backend, and dashboard UI.
View on GitHubDirect access to compiled source files. Requires authorization password.
Hardware: ESP32, Relay Module, Sensors
Software: Python 3.8+, Node.js, Arduino IDE