107 lines
4.3 KiB
Markdown
107 lines
4.3 KiB
Markdown
# Telegraf - Telemetrie-Ingestion (CT143 "Raspi-Broker")
|
|
|
|
Versionierte Kopie der produktiven Telegraf-Konfiguration. **Laufort:**
|
|
`CT143` (pve-mu-3), Verzeichnis `/etc/telegraf/telegraf.d/`.
|
|
|
|
Diese Dateien sind die *Quelle der Wahrheit* (Konfiguration zaehlt Git/Doku).
|
|
Wenn am Server geaendert wird: hier nachziehen + committen + pushen.
|
|
|
|
## Architektur (Stand 21.06.2026)
|
|
|
|
MQTT-Broker = dedizierter **mosquitto 2.0.21** auf CT143 `192.168.178.36:1883`.
|
|
Telegraf ist der **alleinige** MQTT->InfluxDB-Ingest (die alten Python-Bruecken
|
|
`mqtt-influx-bridge.py` / `mqtt-rewrite-holzvergaser.py` sind gestoppt + disabled).
|
|
|
|
Zwei InfluxDB-Datenbanken:
|
|
- **`sensors`** - sauberes, aktives Schema (siehe `satellites.conf`).
|
|
- **`iobroker`** - eingefrorenes Archiv (Alt-Historie) + weiterhin openWB/PV (siehe `openwb.conf`).
|
|
|
|
## Routing (wichtig, damit nichts doppelt landet)
|
|
|
|
Beide Configs definieren je einen `outputs.influxdb`. Telegraf schickt jede Metrik
|
|
an *alle* Outputs, daher wird per name-Filter getrennt:
|
|
|
|
- `satellites.conf` -> DB `sensors`, **namepass** = `temperature`, `io_state`, `power`
|
|
- `openwb.conf` -> DB `iobroker`, **namedrop** = `temperature`, `io_state`, `power`
|
|
|
|
So schreibt der Satelliten-/Heizraum-Ingest ausschliesslich nach `sensors`,
|
|
und openWB/PV ausschliesslich nach `iobroker` - keine Dopplung.
|
|
|
|
## Schema in DB `sensors`
|
|
|
|
| Measurement | Tags | Wert | Quelle |
|
|
|---------------|-------------------------------|-------------|--------|
|
|
| `temperature` | `node` + optional `sensor` | float Grad C | `<raum>/temp`, `heizraum/<ROM>`, `oelknoten/<rolle>`, `shellies/.../ext_temperature` → `garage_decke` |
|
|
| `io_state` | `node`=heizraum, `signal` (pumpe1-4/brenner/kessel) | int 0/1 | `heizraum/io/+`, `heizraum/state/kessel` |
|
|
| `power` | `node` (klima_flur_oben/unten), `geraet` | float W/Wh | Shelly `*/status/pm1:0` |
|
|
|
|
Globaler Tag `host=Raspi-Broker` (Telegraf-Default).
|
|
|
|
## Deploy / Wiederherstellung
|
|
|
|
```bash
|
|
# auf CT143 (pve-mu-3):
|
|
pct push 143 satellites.conf /etc/telegraf/telegraf.d/satellites.conf
|
|
pct push 143 openwb.conf /etc/telegraf/telegraf.d/openwb.conf
|
|
pct push 143 klima.conf /etc/telegraf/telegraf.d/klima.conf
|
|
pct exec 143 -- systemctl restart telegraf
|
|
# Verifikation:
|
|
pct exec 143 -- influx -database sensors -execute 'SHOW MEASUREMENTS'
|
|
```
|
|
|
|
## klima.conf (ab 24.06.2026)
|
|
|
|
Shelly PM Mini Gen3 Leistungsmessung der Klimaanlagen -> DB `sensors`, Measurement `power`.
|
|
|
|
| Tag | Bedeutung |
|
|
|-----|-----------|
|
|
| `node` | `klima_flur_oben` (Split oben), `klima_flur_unten` (Panasonic, vorbereitet) |
|
|
| `geraet` | `split_ac` / `panasonic` |
|
|
|
|
MQTT-Topics (Shelly Prefix):
|
|
- `klima_flur_oben/status/pm1:0`
|
|
- `klima_flur_unten/status/pm1:0`
|
|
|
|
Felder: `watt` (apower), `voltage`, `current`, `energy_wh_total` (Wh kumuliert).
|
|
|
|
Grafana-Dashboard: `Klimatisierung` (UID `klima-bewertung`) unter `/d/klima-bewertung/klimatisierung`
|
|
|
|
Deploy:
|
|
```bash
|
|
pct push 143 klima.conf /etc/telegraf/telegraf.d/klima.conf
|
|
# satellites.conf + openwb.conf namepass/namedrop aktualisieren (power)
|
|
pct exec 143 -- systemctl restart telegraf
|
|
pct push 143 klima-bewertung.json /etc/grafana/provisioning/dashboards/klima-bewertung.json
|
|
```
|
|
|
|
## garage_decke (ab 26.06.2026)
|
|
|
|
Garage-Deckentemperaturen: 5x DS18B20 an 2x Shelly 1 (Gen1) → DB `sensors`, Measurement `temperature`.
|
|
|
|
| Tag | Bedeutung |
|
|
|-----|-----------|
|
|
| `node` | `garage_decke` (**nicht** `garage` — das ist der Raum-Satellit) |
|
|
| `sensor` | `rl_klimadecke`, `vl_kaeltedecke`, `vl_brunnen`, `rl_brunnen`, `reserve` |
|
|
|
|
MQTT-Topics (Shelly Gen1, plain float °C):
|
|
|
|
| Shelly | IP | Topics |
|
|
|--------|-----|--------|
|
|
| shelly1-F4CFA2D3B444 | 192.168.178.86 | `shellies/shelly1-F4CFA2D3B444/ext_temperature/0..2` |
|
|
| shelly1-8CAAB55D9A15 | 192.168.178.78 | `shellies/shelly1-8CAAB55D9A15/ext_temperature/0..1` |
|
|
|
|
Konfiguration: 5 feste `[[inputs.mqtt_consumer]]` in `satellites.conf` (je Topic + feste Tags).
|
|
|
|
Grafana-Dashboard: **Garage Decke** (UID `garage_decke`) → `/d/garage_decke/garage-decke`
|
|
|
|
Ausführliche Doku: CT999 `/root/docs/projekte/garage-decke-monitoring.md`
|
|
|
|
Shelly Gen1: MQTT aktiv → Shelly-App zeigt offline (Cloud vs. MQTT).
|
|
|
|
Deploy:
|
|
```bash
|
|
pct push 143 satellites.conf /etc/telegraf/telegraf.d/satellites.conf
|
|
pct exec 143 -- systemctl restart telegraf
|
|
pct push 143 garage_decke.json /etc/grafana/provisioning/dashboards/garage_decke.json
|
|
pct exec 143 -- systemctl restart grafana-server
|
|
```
|