Sweden
Loading...
India
Loading...

Initial Setup and Phase

Phase-1-setup-Diagram

Our Energy Management System (EMS) utilizes a three-tier IoT architecture designed to decouple high-frequency sensor data from user Management.

The System Architecture is organized into three distince zones:

  • The Edge Layer (Ingestion): A Raspberry Pi polls the Inverter/Meter via Modbus RTU and pushes telemetry to the cloud every second via a persistent WebSocket connection.

  • The Cloud Layer (Processing): We utilize a 'Polyglot Persistence' Strategy. FastAPI acts as the high-perfomance hub, routing live data directly to TimescaleDB (Time-series) for efficient storage. In parallel, Django manages user identifies in SQLite and queries TimescaleDB to generate historical performance reports.

  • The User Layer (Visualization): A Next.js frontend connects to both backends receiving live updates from FastAPI via WebSockets and fetching secure historical data from Django via REST APIs.

Edge Layer

  1. State Machine Logic

  2. Communication Interface

Cloud Logic: Ingestion & Storage

  1. FastAPI - Real Time Hub

  2. History & Management

  3. Websocket Implementation Architecture

  4. Websocket Client Integration

Dashboard & Integration

  1. Frontend Developer Guide