# facundonieto/paneles-solares-telemetria architecture

> Architecture diagram of the GitHub repository facundonieto/paneles-solares-telemetria, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/facundonieto/paneles-solares-telemetria
- Repository: https://github.com/facundonieto/paneles-solares-telemetria

## Overview

##### Project type and purpose
- From the file tree and the README title “paneles-solares-telemetria,” this is an embedded IoT telemetry prototype for solar panels, implemented on an ESP32 microcontroller.
- The single source file `prototipo_esp32.ino` indicates firmware running on the ESP32, reading sensor data and sending it over the network.

##### File structure
- Top‐level:
- README.md – project title and description placeholder
- prototipo_esp32/ – ESP32 Arduino sketch folder
– prototipo_esp32.ino – main firmware code
- No separate frontend/backend code in this repo, so the architecture is primarily embedded firmware plus external cloud/services.

##### README for additional insights
- The README only provides the project name. We infer from “telemetria” that the ESP32 reads solar panel metrics (voltage, current, power, temperature) and publishes them.

##### Elements
- Labels: each block named (e.g., “ESP32 – prototipo_esp32.ino,” “MQTT Broker,” “InfluxDB”)
- Sensors → ESP32 (data acquisition)
- ESP32 → Broker/API (telemetry upload)
- Broker/API → Database (data ingestion)
- Database → Dashboard (queries)
- Physical/hardware (e.g., grey block for solar array)
- Firmware/edge device (e.g., blue)
- Cloud services (e.g., green)
- UI/dashboard (e.g., orange)

## Diagram (Mermaid)

```mermaid
flowchart TD
    Readme["Project Documentation<br/>(README.md)"]:::docs

    subgraph "Physical Layer"
        Sensors["Solar Panel Sensors<br/>(Voltage, Current, Temperature)"]:::hardware
    end

    subgraph "Edge Device"
        ESP32["ESP32 Firmware<br/>(prototipo_esp32.ino)"]:::firmware
    end

    subgraph "Network Layer"
        WiFi["Wi-Fi Connectivity<br/>(802.11)"]:::network
        Protocol["Protocol<br/>(MQTT / HTTP)"]:::network
    end

    subgraph "Cloud Services"
        Broker["MQTT Broker"]:::cloud
        Auth["Authentication Service"]:::cloud
        REST["REST API Server"]:::cloud
        DB["Time-Series Database<br/>(InfluxDB)"]:::cloud
        OTA["OTA Update Service"]:::cloud
    end

    subgraph "UI Layer"
        Grafana["Dashboard<br/>(Grafana)"]:::ui
        Alerts["Alerting Service"]:::ui
    end

    Sensors -->|"reads data"| ESP32
    ESP32 -->|"sends telemetry"| WiFi
    WiFi -->|"over network"| Protocol
    Protocol -->|"publishes"| Broker
    Protocol -->|"posts"| REST
    Auth -->|"secures"| Broker
    Auth -->|"secures"| REST
    Broker -->|"ingests data"| DB
    REST -->|"writes data"| DB
    DB -->|"queries"| Grafana
    DB -->|"triggers alerts"| Alerts
    OTA -->|"provides updates"| ESP32

    click ESP32 "https://github.com/facundonieto/paneles-solares-telemetria/blob/main/prototipo_esp32/prototipo_esp32.ino"
    click Readme "https://github.com/facundonieto/paneles-solares-telemetria/blob/main/README.md"

    classDef hardware fill:#dddddd,stroke:#888888,color:#333333
    classDef firmware fill:#bbdefb,stroke:#1e88e5,color:#0d47a1
    classDef network fill:#d1c4e9,stroke:#7e57c2,color:#4527a0
    classDef cloud fill:#c8e6c9,stroke:#43a047,color:#1b5e20
    classDef ui fill:#ffe0b2,stroke:#fb8c00,color:#e65100
    classDef docs fill:#f5f5f5,stroke:#9e9e9e,color:#616161
```
