How GreenNexa works
From raw sensor telemetry to prioritized operational action — a closed-loop intelligence pipeline operating on a rapid 30-second telemetry cycle.
GreenNexa processes sensor telemetry every 30 seconds across enabled facility modules — validating incoming payloads, updating rolling statistical baselines, evaluating multi-model anomalies, prioritizing urgent risks, and refreshing the operational dashboard in real time.
Two Dedicated Telemetry Pathways
GreenNexa maintains strict isolation between physical IoT telemetry and synthetic evaluation data.
Demo Mode Simulator
Designed for demonstrations, feature evaluations, and scenario testing without requiring physical sensors. Runs on an isolated 30-second cycle scoped strictly to the active organisation.
Authenticated IoT Ingestion
Production telemetry transmitted by physical microcontrollers (e.g., ESP32, industrial gateways, or smart digital meters) over secure HTTPS POST endpoints.
The Complete 11-Stage Operational Workflow
INPUT → VALIDATE → STORE → ANALYSE → DETECT → FORECAST → PRIORITIZE → RECOMMEND → NOTIFY → ACT → VERIFY
INPUT (Dual-Source Telemetry)
Sensor telemetry enters GreenNexa via two isolated ingestion pathways: authenticated physical IoT hardware (e.g. ESP32 microcontrollers) transmitting over HTTPS, or an integrated synthetic simulation engine generating realistic facility data.
VALIDATE (Authentication & Data Integrity)
Incoming payloads pass through strict backend Pydantic validation. The system verifies cryptographic device headers (X-Device-ID, X-API-Key), tenant organisation mapping, sensor configuration status, data types, physical ranges, and timestamps.
STORE (Normalized Database Persistence)
Validated readings are committed to a normalized SQLite database across 13 core tables, indexing organisation ID, sensor ID, facility block/ward location, numerical value, physical measurement unit, and UTC timestamp.
ANALYSE (Time-Series Feature Extraction)
The analytical engine computes rolling statistical features across active metrics: moving averages, standard deviations, diurnal (24-hour) hour-of-day baselines, and historical comparative boundaries.
DETECT (Tri-Layer Anomaly Classification)
Readings are simultaneously evaluated against three complementary layers: deterministic static threshold boundaries, statistical 3-sigma Z-scores, and Scikit-Learn Isolation Forest machine learning across 8 features.
FORECAST (Holt-Winters Trend Projection)
Statsmodels Holt-Winters Exponential Smoothing evaluates historical patterns to project expected near-future trajectories (e.g., 24-hour demand curves) for energy, water, and environmental metrics.
PRIORITIZE (Smart Priority Engine)
When multiple active anomalies occur simultaneously (3+ concurrent issues), the Priority Engine evaluates anomaly severity, persistence, and facility impact to rank and spotlight the single most urgent issue.
RECOMMEND (Contextual Prescriptive Guidance)
For detected anomalies, GreenNexa generates specific, actionable mitigation steps tailored to the metric, facility block, and fault severity, detailing estimated kWh/m³ and financial savings.
NOTIFY (Red-Dot & Unread State Tracking)
New anomalies trigger immediate visual indicators, including the global navigation Red-Dot alert and persistent unread tracking in the database (event_read_states) with block and ward attribution.
ACT (Human Operator Resolution)
The facility engineer or municipal officer reviews the alert via the dashboard (Executive, Operations, Analytics, or Command Center) or queries the Gemini 2.5 Flash assistant, and dispatches field personnel.
VERIFY (Closed-Loop Baseline Confirmation)
Following physical intervention (such as closing an isolation valve or replacing a clogged filter), subsequent 30-second telemetry streams confirm that metrics have returned to nominal baselines, closing the loop.
Real-World Incident: Water Consumption Surge
An end-to-end example demonstrating how GreenNexa handles an abnormal flow event from initial detection to human verification.
Telemetry Surge Detected
At 02:15 AM, Flow Meter W-102 in Block B detects water flow surging from a nominal night baseline of 22 m³/h to 88 m³/h.
Ingestion & Validation
The incoming HTTP payload is verified against device credentials (X-Device-ID / X-API-Key), validated against schema limits, and stored in SQLite within milliseconds.
Tri-Layer Anomaly Detection
The anomaly engine flags the event: hard threshold exceeded, statistical Z-score > 4.2σ, and Isolation Forest score -0.38. Severity is classified as HIGH.
Historical Context & Forecasting
Historical baselines identify this as an abnormal nocturnal draw. Holt-Winters forecasting projects significant cumulative volumetric loss over the next 12 hours if unaddressed.
Priority Engine Activation
With 3 minor environmental warnings active elsewhere, the Priority Engine evaluates risk scores and spotlights the Block B water surge as Priority #1.
Prescriptive Recommendation Generated
The engine generates an actionable recommendation: "Urgent: Nocturnal water surge in Block B. Inspect main riser isolation valve and secondary booster pumps. Estimated loss: ~66 m³/h (~₹3,200/hr)."
Red-Dot Notification
The Red-Dot indicator illuminates in the header navigation bar, alerting the duty operator to the unread priority issue.
Human Operational Action
The duty operator reviews the priority card, dispatches a night maintenance technician to Block B, who discovers a ruptured supply flange and isolates the riser valve.
Closed-Loop Verification
At 02:42 AM, subsequent 30-second telemetry cycles confirm flow has dropped back to 21.5 m³/h. The system logs the anomaly as resolved, completing the loop.
Verified Implementation Stack
Technologies verified directly in the implemented production codebase.
Next.js 14 & React 18
TypeScript, App Router, custom Vanilla CSS design tokens, responsive layouts, and React Context-based state management.
FastAPI & Python 3.11+
Asynchronous REST architecture, Pydantic v2 data models, SQLAlchemy 2.0 ORM, and JWT bearer authentication.
SQLite (13 Normalized Tables)
Multi-tenant schema, physical SQLite .db file size monitoring, logical org byte attribution, and SQLite VACUUM maintenance.
Statsmodels & Scikit-Learn
Holt-Winters Exponential Smoothing for 24h diurnal forecasting, statistical 3-sigma Z-scores, and 8-feature Isolation Forest ML.
Gemini 2.5 Flash & GenAI SDK
Conversational assistant with 15 domain tool bindings, multilingual dialogue (English, Hinglish, Odia), and safe offline fallback.
Authenticated HTTP Ingestion
Dedicated endpoint (/api/v1/iot/sensor-data) authenticated with X-Device-ID and X-API-Key headers and sensor catalog verification.
- Simulated Data: Telemetry in Demo Mode is synthetically generated on a 30-second cycle for evaluation purposes.
- Modelled What-If Scenarios: What-If simulations are mathematical approximations of operational changes, not guaranteed future outcomes.
- Forecast Reliability: Holt-Winters projection fidelity scales directly with historical telemetry depth.
- Storage Attribution: Organisation storage usage shown in Super Admin Manage Storage is a logical attribution calculated within the shared SQLite database.
- Future Placeholders: Advanced 3D/BIM facility digital twins and OTA device firmware updates, where noted on the roadmap, remain conceptual placeholders.
