Stack of Docker containers that generate metrics values of buildings for visualization with Grafana and a HTML/PHP/JS dynamic website
🏠 Homepage
Project scripts are based in the fallowing languages/tools :
- Dynamic website : HTML/PHP/JS
- Metrics generator script : Bash
- MQTT metric parser : PHP and NodeRed
- Databases :
- NodeRed : InfluxDB 1.8
- Dynamic website : MariaDB
This project was made for an final assesement exam the 'SAE 23' of the BUT Réseaux et Télécoms by four students of the Blagnac college.
All the services are dockerized, images are pre-provisionned :
- Grafana : Dashboard (set as default), data sources, administrator user (sae23) and password.
- NodeRED : Flow
- mariadb : 'sae23' database, 'sae23' user and password
- influxdb : 'capteurs' database, 'grafana' user and password
- apache : Dynamic website
- mosquitto_broker : Mosquitto server and metric generator script.
- cron : MQTT metric parser
Images are stored in our Docker Hub repository : https://hub.docker.com/r/totorx/sae23
Follow this guide if you don't have docker-compose installed : https://docs.docker.com/compose/install/
git clone https://github.com/TheToto318/IoT_stack.git
cd IoT_stack
docker-compose up -d
From the project root folder :
docker-compose down
- Grafana :
- User : sae23
- Password : grafana23
- InfluxDB :
- Hostname : influxdb
- Database : capteurs
- User : grafana
- Password : grafana23
- NodeRED :
- User : sae23
- Password : nodered23
- MariaDB :
- Hostname : db
- Database : sae23
- User : sae23
- Password : sae23pass
- Dynamic website :
- Administrator :
- User : Admin
- Pass : 4d?m17nisTt?r4!a0n
- Manager 1 (RT building) :
- User : Gestio-1
- Password : C0u5r?sc745e!
- Manager 2 (CS building) :
- User : Gestio-2
- Password : 4dm1nn?srt!0n
- Manager 3 (GIM building) :
- User : Gestio-3
- Password : G7iM5n14s?ti!
- Administrator :
Services are accessible by the following ports :
- Grafana : 3000 (TCP)
- NodeRed : 1880 (TCP)
- PHPMyAdmin : 1140 (TCP)
- Apache : 4443 (TCP)
Find the service name in the docker-compose.yml file and run :
docker-compose -f logs <service_name>
eg: docker-compose -f logs db
Or with the container name :
docker logs -f <container_name>
eg: docker logs -f logs db
Adaptative dashboard including :
- New panel for each buildings
- Filter by :
- Sensors type
- Building
- Floor
- Room
- Direct, Min, Max and Average values of all sensors type.
- Graphs for all sensors type.
-
Overview of the last metrics for all users.
-
Manager credentials, only able to see their associated building.
-
Administrator user with following rights :
- Add/delete building with associated manager credentials.
- Add/delete sensors.
-
Manager page inlude :
- Tables with metrics history.
- Line graph for all type of values.
- Statistics including average, minimum and maximum.
-
Other functionalities :
- Admin and manager session to stay connected after login.
- Listen to all topics (iut/#)
- Parsing :
- Sensor type
- Building
- Floor
- Room
- Add unit to value.
- Insert value into the matching measurement table
- 'Administration' : Admin user and password (MD5 encrypted).
- 'Batiment' : Building name, login and password for the building manager (MD5 encrypted).
- 'capteur' : Sensors type, building, floor, room, MQTT topic
- 'mesure' : measure date and time
- 'valeur' : value returned by sensors
Tables are linked by the fallowing foreign_key :
- 'valeur': id_mesure and id_capteur with 'id' column of table 'mesure' and 'capteur'.
- 'capteur' : 'batiment' column with the 'id' column of the 'batiment' table.
👤 Thomas Roux (Backend developper)
- Github: @TheToto318
👤 Clement Roques (Frontend developper)
- Github: @ClementRqs
👤 Mattieu Naissant (Frontend developper)
- Github: @Snip31
👤 Mathias Chauvet (Frontend developper)
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2022 Thomas Roux.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator