# dankehidayat/eco-office architecture

> Architecture diagram of the GitHub repository dankehidayat/eco-office, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dankehidayat/eco-office
- Repository: https://github.com/dankehidayat/eco-office

## Overview

Smart Office Guardian is an ESP32-based office energy and environmental monitor. Sensors provide power and climate readings; the system calibrates climate measurements, classifies thermal comfort and energy use, and presents results on an LCD and Blynk, with Google Sheets logging. The diagram follows capabilities and links documented in the README; no source excerpts were available to verify internal call structure, so implementation details are kept at subsystem level.

Main entry points: [`Eco Office.ino`](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino) (Blynk Dashboard), [`gsheet_blynk_log_data.gs`](https://github.com/dankehidayat/eco-office/blob/main/gsheet_blynk_log_data.gs) (Sheets Logger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sensing["Sensing and Calibration"]
  node_pzem["PZEM-004T<br/>[Eco Office.ino]"]
  node_dht["DHT11 Sensor<br/>[Eco Office.ino]"]
  node_calibration["Sensor Calibration<br/>[Eco Office.ino]"]
  node_power["Power Metrics<br/>[Eco Office.ino]"]
  node_esp["ESP32 Monitor<br/>[Eco Office.ino]"]
end

subgraph group_analysis["Classification"]
  node_thermal["Thermal Classifier<br/>[Eco Office.ino]"]
  node_energy["Energy Classifier<br/>[Eco Office.ino]"]
end

subgraph group_interfaces["User Interfaces"]
  node_lcd["LCD Display<br/>[Eco Office.ino]"]
  node_blynk["Blynk Dashboard<br/>[Eco Office.ino]"]
  node_wifi["WiFi Manager<br/>[Eco Office.ino]"]
  node_serial["Serial Monitor<br/>[Eco Office.ino]"]
end

subgraph group_logging["Data Logging"]
  node_sheets_script["Sheets Logger"]
  node_sheets[("Google Sheets")]
end

node_office(("Office Conditions"))
node_user(("Office User"))

node_office -->|"supplies power"| node_pzem
node_office -->|"supplies climate"| node_dht
node_pzem -->|"measures"| node_power
node_dht -->|"provides readings"| node_calibration
node_calibration -->|"provides calibrated data"| node_thermal
node_power -->|"provides power inputs"| node_energy
node_esp -->|"monitors"| node_pzem
node_esp -->|"monitors"| node_dht
node_thermal -->|"displays results"| node_lcd
node_energy -->|"displays results"| node_lcd
node_thermal -->|"sends classification"| node_blynk
node_energy -->|"sends numeric result"| node_blynk
node_power -->|"sends metrics"| node_blynk
node_calibration -->|"reports accuracy"| node_serial
node_wifi -.->|"enables connectivity"| node_blynk
node_user -->|"views readings"| node_lcd
node_user -->|"views dashboard"| node_blynk
node_blynk -->|"provides data"| node_sheets_script
node_sheets_script -->|"logs records"| node_sheets

click node_pzem "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_dht "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_calibration "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_power "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_esp "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_thermal "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_energy "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_lcd "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_blynk "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_wifi "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"
click node_sheets_script "https://github.com/dankehidayat/eco-office/blob/main/gsheet_blynk_log_data.gs"
click node_serial "https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_pzem,node_dht,node_calibration,node_power,node_esp,node_user toneBlue
class node_thermal,node_energy toneAmber
class node_lcd,node_blynk,node_wifi,node_serial toneMint
class node_sheets_script,node_sheets toneRose
class node_office toneIndigo
```

## Components

### Sensing and Calibration

- [PZEM-004T](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [DHT11 Sensor](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [Sensor Calibration](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [Power Metrics](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [ESP32 Monitor](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`

### Classification

- [Thermal Classifier](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [Energy Classifier](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`

### User Interfaces

- [LCD Display](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [Blynk Dashboard](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [WiFi Manager](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`
- [Serial Monitor](https://github.com/dankehidayat/eco-office/blob/main/Eco%20Office.ino): `Eco Office.ino`

### Data Logging

- [Sheets Logger](https://github.com/dankehidayat/eco-office/blob/main/gsheet_blynk_log_data.gs): `gsheet_blynk_log_data.gs`
- **Google Sheets**

### Other components

- **Office Conditions**
- **Office User**

## Connections

- Office Conditions → PZEM-004T: supplies power (evidence: `README.md`)
- Office Conditions → DHT11 Sensor: supplies climate (evidence: `README.md`)
- PZEM-004T → Power Metrics: measures (evidence: `README.md`)
- DHT11 Sensor → Sensor Calibration: provides readings (evidence: `README.md`)
- Sensor Calibration → Thermal Classifier: provides calibrated data (evidence: `README.md`)
- Power Metrics → Energy Classifier: provides power inputs (evidence: `README.md`)
- ESP32 Monitor → PZEM-004T: monitors (evidence: `README.md`)
- ESP32 Monitor → DHT11 Sensor: monitors (evidence: `README.md`)
- Thermal Classifier → LCD Display: displays results (evidence: `README.md`)
- Energy Classifier → LCD Display: displays results (evidence: `README.md`)
- Thermal Classifier → Blynk Dashboard: sends classification (evidence: `README.md`)
- Energy Classifier → Blynk Dashboard: sends numeric result (evidence: `README.md`)
- Power Metrics → Blynk Dashboard: sends metrics (evidence: `README.md`)
- Sensor Calibration → Serial Monitor: reports accuracy (evidence: `README.md`)
- WiFi Manager → Blynk Dashboard: enables connectivity
- Office User → LCD Display: views readings (evidence: `README.md`)
- Office User → Blynk Dashboard: views dashboard (evidence: `README.md`)
- Blynk Dashboard → Sheets Logger: provides data (evidence: `README.md`)
- Sheets Logger → Google Sheets: logs records (evidence: `README.md`)
