# DTMAN

Code for the DTMAN project

## Description

The DTMAN project consist in the integration of a set of entities that allow the energy consumption monitoring of (numeric control) machines, thus enabling data analytics and visualization in a dashboard.

## Outline

The structure of the project is composed by:

```bash
|-- Grafana
|   |-- Dashboard
|   |   |-- Level 1
|   |   |   |-- Home.json
|   |   |-- Level 2
|   |   |   |-- Macchina1.json
|   |   |   |-- Macchina2.json
|-- Nodered
|   |-- flow-macchina-1.json
|   |-- flow-macchina-2.json
|-- Influxdb
|   |-- Tasks
|   |   |-- MaxStoredDataM1.flux
|   |   |-- MaxStoredDataM2.flux
|   |   |-- MeanStoredDataM1.flux
|   |   |-- MeanStoredDataM2.flux
|   |   |-- MinStoredDataM1.flux
|   |   |-- MinStoredDataM2.flux
|   |-- configuration.md
|-- Docker
|   |-- configuration.md
```

* **Nodered**: This folder contains the flow files in a json format
    * Macchina1.json: Represent the flow designed on Node-RED that allows the data collection from the sensor (associated to machine 1) via Modbus and the subsequent saving in InfluxDB.
    * Macchina2.json: Represent the flow designed on Node-RED that allows the data collection from the sensor (associated to machine 2) via Modbus and the subsequent saving in InfluxDB.

    * [Nodered files](/Nodered/).

* **Influxdb**: This folder contains a configuration file regarding to the buckets and downsampling task created in the GUI. There is also a folder Tasks that have the flux code of downsampling.

    * [Influxdb files](/Influxdb/).

* **Grafana**: This folder contains the different dashboard levels
    * Level 1: Production level
    * Level 2: Machine level

    * [Grafana files](/Grafana/Dashboard).

* **Docker**: Configuration file that displays docker-compose code for installation and update of influxdb and grafana apps.

    * [Docker files](/Docker/).





