diff --git a/README.md b/README.md index 4c5de6e..aa10156 100644 --- a/README.md +++ b/README.md @@ -57,12 +57,14 @@ Die Anwendung unterstützt folgende JSON-Formate: { "Uhrzeit": "10:00:38", "SDS_P1": 9.15, - "SDS_P2": 6.22 + "SDS_P2": 6.22, + "sensor_name": "Sensor-1" }, { "Uhrzeit": "10:15:36", "SDS_P1": 9.75, - "SDS_P2": 5.97 + "SDS_P2": 5.97, + "sensor_name": "Sensor-1" } ] ``` @@ -72,7 +74,7 @@ Oder als Objekt mit Daten-Array: ```json { "data": [ - { "Uhrzeit": "10:00:38", "SDS_P1": 9.15, "SDS_P2": 6.22 } + { "Uhrzeit": "10:00:38", "SDS_P1": 9.15, "SDS_P2": 6.22, "sensor_name": "Sensor-1" } ] } ``` @@ -94,6 +96,7 @@ Für die automatische Datenerfassung und -speicherung muss eine NocoDB-Datenbank | `Title` | Text | Optionaler Titel (kann leer bleiben) | | `SDS_P1` | Number | Feinstaub PM10-Wert | | `SDS_P2` | Number | Feinstaub PM2.5-Wert | +| `sensor_name` | Text | Bezeichnung des Sensors zur Unterscheidung mehrerer Sensoren | | `BME280_Temperature` | Number | Temperatur in °C | | `BME280_Humidity` | Number | Luftfeuchtigkeit in % | | `BME280_Pressure` | Number | Luftdruck (optional) | @@ -132,7 +135,7 @@ Das Projekt enthält zwei n8n-Workflows für die Automatisierung: **Workflow-Schritte**: 1. **Webhook**: Empfängt Anfragen auf `/sds-data` -2. **NocoDB GetAll**: Liest alle Daten aus der Tabelle (SDS_P1, SDS_P2, Uhrzeit) +2. **NocoDB GetAll**: Liest alle Daten aus der Tabelle (SDS_P1, SDS_P2, Uhrzeit, sensor_name) 3. **JavaScript Code**: Filtert die letzten 50 Einträge 4. **Response**: Gibt JSON-Daten zurück diff --git a/feinstaub-webhook.json b/feinstaub-webhook.json index ce2a58f..6e0fc11 100644 --- a/feinstaub-webhook.json +++ b/feinstaub-webhook.json @@ -23,7 +23,8 @@ "fields": [ "SDS_P1", "SDS_P2", - "Uhrzeit" + "Uhrzeit", + "sensor_name" ] } }, @@ -130,7 +131,7 @@ "availableInMCP": false, "errorWorkflow": "0bBZzSE6SUzVsif5" }, - "versionId": "9ece3377-504a-4df7-900d-ef23c1bd5905", + "versionId": "220f6cf9-fc5b-4afe-875d-a70cb8cadf36", "meta": { "templateCredsSetupCompleted": true, "instanceId": "2f7fd37175cefa82de44e06b8af9ab9c01e7956018045d6efc4f7bf1588a41eb" diff --git a/feinstaub.html b/feinstaub.html index d31138d..a532c13 100644 --- a/feinstaub.html +++ b/feinstaub.html @@ -182,6 +182,28 @@ border-radius: 5px; font-size: 14px; } + .sensor-selection { + width: 100%; + margin-top: 20px; + padding: 20px; + background: #f7fafc; + border-radius: 5px; + border-left: 4px solid #48bb78; + display: none; + } + .sensor-selection h3 { + margin-bottom: 10px; + color: #2d3748; + } + .sensor-selection select { + width: 100%; + padding: 10px 15px; + border: 2px solid #e2e8f0; + border-radius: 5px; + font-size: 14px; + background: white; + cursor: pointer; + } @@ -221,7 +243,14 @@ - + +
+

Sensor-Auswahl

+ +
+