Commit 713001fd authored by 22stmo1bif's avatar 22stmo1bif
Browse files

Update README.md with German instructions for project setup and InfluxDB...

Update README.md with German instructions for project setup and InfluxDB configuration; adjust ChartView.vue layout direction
parent 0cb1330b
No related merge requests found
Showing with 71 additions and 3 deletions
+71 -3
# Project Folder Structure and Functions
This document describes the purpose and functionality of the folders within the `web` directory of the project.
This document describes the purpose and functionality of the folders within the `web` directory of the project. It also contains german instructions on how to start the project using the docker-compose.yaml.
---
......@@ -72,4 +72,72 @@ This document describes the purpose and functionality of the folders within the
- **Frontend**: Vue.js application for the user interface.
- **Data Generation**: Simulates sensor data and sends it to the MQTT broker.
- **Stream Processing**: Processes real-time data and writes it to InfluxDB.
- **Services**: Configurations for external services like InfluxDB and MQTT.
\ No newline at end of file
- **Services**: Configurations for external services like InfluxDB and MQTT.
## Anleitung
- **Frontend + Backend:**
[co2ampel2 / Web · GitLab](https://transfer.hft-stuttgart.de/gitlab/co2ampel2/web)
- **Firmware:**
[co2ampel2 / co2-ampel · GitLab](https://transfer.hft-stuttgart.de/gitlab/co2ampel2/co-2-ampel)
> **Hinweis:** In der `Config.h` Datei die WLAN-Zugangsdaten und die korrekte Adresse der Ampel anpassen.
Frontend und Backend laufen nun – allerdings ist **InfluxDB noch nicht korrekt mit dem Django-Ninja-Backend verbunden**, da API-Calls auf InfluxDB-Daten **nicht authentifiziert** sind.
## Projekt starten
```bash
docker-compose up --build
```
## InfluxDB einrichten
1. Öffne InfluxDB im Browser:
[http://localhost:8086/signin](http://localhost:8086/signin) - oder Server URL und entsprechender Port
2. Melde dich an mit:
- **Username:** `admin`
- **Password:** `password`
3. Token generieren:
- Klicke auf **Python**:
![[Pasted image 20250627200456.png]]
- Klicke dann auf **"Get Token"**:
![[Pasted image 20250627200618.png]]
4. Token kopieren und in der Datei `.env.docker` im Verzeichnis `backend` **ersetzen**.
5. Container neu starten:
```bash
docker-compose down
docker-compose up --build
```
---
## Testdaten generieren (für Entwicklung)
1. Ins Daten-Generator-Verzeichnis wechseln:
```bash
cd data_generation
```
2. Virtuelle Umgebung einrichten:
```bash
uv sync
```
3. Umgebung aktivieren:
```bash
source .venv/bin/activate
```
4. Skript starten:
```bash
python main.py
```
......@@ -217,6 +217,6 @@ export default defineComponent({
flex-wrap: nowrap;
gap: 2rem;
justify-content: flex-start;
flex-direction: row;
flex-direction: column;
}
</style>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment