infrapuzzle/k8s/monitoring/dashboards/grafana-dashboard-taupi-fan...

506 lines
22 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-taupi-fan
namespace: monitoring
labels:
grafana_dashboard: '1'
annotations:
grafana_dashboard_folder: "Grabengasse7"
data:
taupi-fan.json: |
{
"uid": "taupi-fan",
"title": "💨 Cellar Fan (TAUPI)",
"tags": ["climate", "fan", "cellar", "prometheus"],
"timezone": "browser",
"schemaVersion": 39,
"version": 3,
"refresh": "30s",
"editable": false,
"graphTooltip": 2,
"time": {
"from": "now-24h",
"to": "now"
},
"panels": [
{
"title": "⚡ Status & Controls",
"type": "row",
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 0},
"collapsed": false
},
{
"title": "Fan Power Relay",
"type": "stat",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 4, "w": 6, "x": 0, "y": 1},
"fieldConfig": {
"defaults": {
"mappings": [
{"type": "value", "options": {"0": {"text": "OFF", "color": "blue"}, "1": {"text": "ON", "color": "orange"}}}
],
"color": {"mode": "thresholds"}
}
},
"options": {
"graphMode": "none",
"colorMode": "background",
"textMode": "auto",
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}
},
"targets": [
{"expr": "taupi_relay_status", "legendFormat": "Fan Status", "refId": "A"}
]
},
{
"title": "Mold Danger Status",
"type": "stat",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 4, "w": 6, "x": 6, "y": 1},
"fieldConfig": {
"defaults": {
"mappings": [
{"type": "value", "options": {"0": {"text": "SAFE", "color": "green"}, "1": {"text": "CRITICAL", "color": "red"}}}
]
}
},
"options": {
"graphMode": "none",
"colorMode": "background",
"textMode": "auto",
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}
},
"targets": [
{"expr": "taupi_is_critical", "legendFormat": "Mold Danger", "refId": "A"}
]
},
{
"title": "Activation Criteria Met",
"type": "stat",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 1},
"fieldConfig": {
"defaults": {
"mappings": [
{"type": "value", "options": {"0": {"text": "NO", "color": "gray"}, "1": {"text": "YES", "color": "green"}}}
]
}
},
"options": {
"graphMode": "none",
"colorMode": "background",
"textMode": "auto",
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}
},
"targets": [
{"expr": "taupi_would_fan_activate", "legendFormat": "Dewpoint Condition", "refId": "A"}
]
},
{
"title": "Shelly Plug Reachability",
"type": "stat",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 4, "w": 6, "x": 18, "y": 1},
"fieldConfig": {
"defaults": {
"mappings": [
{"type": "value", "options": {"0": {"text": "OFFLINE", "color": "red"}, "1": {"text": "ONLINE", "color": "green"}}}
]
}
},
"options": {
"graphMode": "none",
"colorMode": "background",
"textMode": "auto",
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}
},
"targets": [
{"expr": "up{job=\"taupi-fan\"}", "legendFormat": "Connectivity", "refId": "A"}
]
},
{
"title": "📊 Climate Correlation",
"type": "row",
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 5},
"collapsed": false
},
{
"title": "📊 Full Climate & Fan Correlation",
"description": "All metrics in one view. Left axis: temperatures & dewpoints (°C). Right axis: humidity & mold threshold (%). Colored background bands: orange = fan running, red = mold critical, green = activation criteria met. Hover anywhere to read all values at that timestamp.",
"type": "timeseries",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 14, "w": 24, "x": 0, "y": 6},
"fieldConfig": {
"defaults": {
"custom": {
"lineWidth": 2,
"fillOpacity": 0,
"spanNulls": true,
"showPoints": "never"
}
},
"overrides": [
{
"matcher": {"id": "byName", "options": "Fan Active"},
"properties": [
{"id": "color", "value": {"fixedColor": "#FF9800", "mode": "fixed"}},
{"id": "custom.axisPlacement", "value": "hidden"},
{"id": "custom.drawStyle", "value": "line"},
{"id": "custom.lineInterpolation", "value": "stepAfter"},
{"id": "custom.lineWidth", "value": 0},
{"id": "custom.fillOpacity", "value": 15},
{"id": "min", "value": 0},
{"id": "max", "value": 1},
{"id": "decimals", "value": 0},
{"id": "mappings", "value": [{"type": "value", "options": {"0": {"text": "OFF"}, "1": {"text": "ON"}}}]}
]
},
{
"matcher": {"id": "byName", "options": "Mold Critical"},
"properties": [
{"id": "color", "value": {"fixedColor": "#F44336", "mode": "fixed"}},
{"id": "custom.axisPlacement", "value": "hidden"},
{"id": "custom.drawStyle", "value": "line"},
{"id": "custom.lineInterpolation", "value": "stepAfter"},
{"id": "custom.lineWidth", "value": 0},
{"id": "custom.fillOpacity", "value": 10},
{"id": "min", "value": 0},
{"id": "max", "value": 1},
{"id": "decimals", "value": 0},
{"id": "mappings", "value": [{"type": "value", "options": {"0": {"text": "SAFE"}, "1": {"text": "CRITICAL"}}}]}
]
},
{
"matcher": {"id": "byName", "options": "Activation Criteria"},
"properties": [
{"id": "color", "value": {"fixedColor": "#4CAF50", "mode": "fixed"}},
{"id": "custom.axisPlacement", "value": "hidden"},
{"id": "custom.drawStyle", "value": "line"},
{"id": "custom.lineInterpolation", "value": "stepAfter"},
{"id": "custom.lineWidth", "value": 0},
{"id": "custom.fillOpacity", "value": 8},
{"id": "min", "value": 0},
{"id": "max", "value": 1},
{"id": "decimals", "value": 0},
{"id": "mappings", "value": [{"type": "value", "options": {"0": {"text": "NO"}, "1": {"text": "YES"}}}]}
]
},
{
"matcher": {"id": "byName", "options": "Indoor Temp"},
"properties": [
{"id": "custom.axisPlacement", "value": "left"},
{"id": "unit", "value": "celsius"},
{"id": "color", "value": {"fixedColor": "#FF6D00", "mode": "fixed"}},
{"id": "custom.lineWidth", "value": 2}
]
},
{
"matcher": {"id": "byName", "options": "Outdoor Temp"},
"properties": [
{"id": "custom.axisPlacement", "value": "left"},
{"id": "unit", "value": "celsius"},
{"id": "color", "value": {"fixedColor": "#2979FF", "mode": "fixed"}},
{"id": "custom.lineWidth", "value": 2}
]
},
{
"matcher": {"id": "byName", "options": "Indoor Dewpoint"},
"properties": [
{"id": "custom.axisPlacement", "value": "left"},
{"id": "unit", "value": "celsius"},
{"id": "color", "value": {"fixedColor": "#FF6D00", "mode": "fixed"}},
{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [10, 5]}},
{"id": "custom.lineWidth", "value": 1}
]
},
{
"matcher": {"id": "byName", "options": "Outdoor Dewpoint"},
"properties": [
{"id": "custom.axisPlacement", "value": "left"},
{"id": "unit", "value": "celsius"},
{"id": "color", "value": {"fixedColor": "#2979FF", "mode": "fixed"}},
{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [10, 5]}},
{"id": "custom.lineWidth", "value": 1}
]
},
{
"matcher": {"id": "byName", "options": "Indoor Humidity"},
"properties": [
{"id": "custom.axisPlacement", "value": "right"},
{"id": "unit", "value": "percent"},
{"id": "color", "value": {"fixedColor": "#00BFA5", "mode": "fixed"}},
{"id": "custom.lineWidth", "value": 2},
{"id": "custom.fillOpacity", "value": 5}
]
},
{
"matcher": {"id": "byName", "options": "Outdoor Humidity"},
"properties": [
{"id": "custom.axisPlacement", "value": "right"},
{"id": "unit", "value": "percent"},
{"id": "color", "value": {"fixedColor": "#448AFF", "mode": "fixed"}},
{"id": "custom.lineWidth", "value": 1}
]
},
{
"matcher": {"id": "byName", "options": "Mold Threshold"},
"properties": [
{"id": "custom.axisPlacement", "value": "right"},
{"id": "unit", "value": "percent"},
{"id": "color", "value": {"fixedColor": "#F44336", "mode": "fixed"}},
{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [10, 5]}},
{"id": "custom.lineWidth", "value": 1}
]
}
]
},
"options": {
"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["lastNotNull", "min", "max"]},
"tooltip": {"mode": "multi", "sort": "desc"}
},
"targets": [
{"expr": "taupi_relay_status", "legendFormat": "Fan Active", "refId": "A"},
{"expr": "taupi_is_critical", "legendFormat": "Mold Critical", "refId": "B"},
{"expr": "taupi_would_fan_activate", "legendFormat": "Activation Criteria", "refId": "C"},
{"expr": "taupi_temperature_celsius_innen", "legendFormat": "Indoor Temp", "refId": "D"},
{"expr": "taupi_temperature_celsius_aussen", "legendFormat": "Outdoor Temp", "refId": "E"},
{"expr": "taupi_dewpoint_celsius_innen", "legendFormat": "Indoor Dewpoint", "refId": "F"},
{"expr": "taupi_dewpoint_celsius_aussen", "legendFormat": "Outdoor Dewpoint", "refId": "G"},
{"expr": "taupi_humidity_percent_innen", "legendFormat": "Indoor Humidity", "refId": "H"},
{"expr": "taupi_humidity_percent_aussen", "legendFormat": "Outdoor Humidity", "refId": "I"},
{"expr": "taupi_critical_humidity_threshold_percent", "legendFormat": "Mold Threshold", "refId": "J"}
]
},
{
"title": "📈 Deep Dive",
"type": "row",
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 16},
"collapsed": true,
"panels": [
{
"title": "🌡️ Temperature Differential (Indoor Outdoor)",
"description": "Positive = cellar warmer than outside (normal). Large delta means the fan can effectively dry the cellar air by exchanging it with drier outside air.",
"type": "timeseries",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 17},
"fieldConfig": {
"defaults": {
"unit": "celsius",
"custom": {
"lineWidth": 2,
"fillOpacity": 10,
"spanNulls": true,
"showPoints": "never",
"gradientMode": "scheme",
"thresholdsStyle": {"mode": "area"}
},
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "blue", "value": null},
{"color": "green", "value": 0},
{"color": "orange", "value": 5}
]
}
}
},
"options": {
"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean", "lastNotNull"]},
"tooltip": {"mode": "multi", "sort": "desc"}
},
"targets": [
{"expr": "taupi_temperature_celsius_innen - taupi_temperature_celsius_aussen", "legendFormat": "Temp Delta (In Out)", "refId": "A"}
]
},
{
"title": "💧 Dewpoint Spread (Indoor Outdoor)",
"description": "When indoor dewpoint exceeds outdoor dewpoint, running the fan helps: outside air can absorb moisture. Negative = fan would make things worse.",
"type": "timeseries",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 17},
"fieldConfig": {
"defaults": {
"unit": "celsius",
"custom": {
"lineWidth": 2,
"fillOpacity": 10,
"spanNulls": true,
"showPoints": "never",
"gradientMode": "scheme",
"thresholdsStyle": {"mode": "area"}
},
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "red", "value": null},
{"color": "green", "value": 0},
{"color": "super-light-green", "value": 3}
]
}
}
},
"options": {
"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean", "lastNotNull"]},
"tooltip": {"mode": "multi", "sort": "desc"}
},
"targets": [
{"expr": "taupi_dewpoint_celsius_innen - taupi_dewpoint_celsius_aussen", "legendFormat": "Dewpoint Delta (In Out)", "refId": "A"}
]
},
{
"title": "💧 Humidity Delta (Indoor Outdoor)",
"description": "How much more humid the cellar is compared to outside. High positive values indicate the fan can effectively remove moisture.",
"type": "timeseries",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 25},
"fieldConfig": {
"defaults": {
"unit": "percent",
"custom": {
"lineWidth": 2,
"fillOpacity": 10,
"spanNulls": true,
"showPoints": "never",
"gradientMode": "scheme",
"thresholdsStyle": {"mode": "area"}
},
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "blue", "value": null},
{"color": "green", "value": 0},
{"color": "orange", "value": 15}
]
}
}
},
"options": {
"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean", "lastNotNull"]},
"tooltip": {"mode": "multi", "sort": "desc"}
},
"targets": [
{"expr": "taupi_humidity_percent_innen - taupi_humidity_percent_aussen", "legendFormat": "Humidity Delta (In Out)", "refId": "A"}
]
},
{
"title": "📉 Indoor Humidity vs Fan Runtime",
"description": "Overlay of indoor humidity (left axis) and fan state (right axis). Shows the direct effect: when the orange fan-on band appears, does the teal humidity line drop?",
"type": "timeseries",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 25},
"fieldConfig": {
"defaults": {
"custom": {
"lineWidth": 2,
"spanNulls": true,
"showPoints": "never"
}
},
"overrides": [
{
"matcher": {"id": "byName", "options": "Indoor Humidity"},
"properties": [
{"id": "custom.axisPlacement", "value": "left"},
{"id": "unit", "value": "percent"},
{"id": "color", "value": {"fixedColor": "#00BFA5", "mode": "fixed"}},
{"id": "custom.fillOpacity", "value": 10}
]
},
{
"matcher": {"id": "byName", "options": "Fan Active"},
"properties": [
{"id": "custom.axisPlacement", "value": "right"},
{"id": "custom.drawStyle", "value": "line"},
{"id": "custom.lineInterpolation", "value": "stepAfter"},
{"id": "custom.fillOpacity", "value": 30},
{"id": "color", "value": {"fixedColor": "orange", "mode": "fixed"}},
{"id": "min", "value": 0},
{"id": "max", "value": 1},
{"id": "decimals", "value": 0},
{"id": "mappings", "value": [{"type": "value", "options": {"0": {"text": "OFF"}, "1": {"text": "ON"}}}]}
]
}
]
},
"options": {
"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["min", "max", "mean", "lastNotNull"]},
"tooltip": {"mode": "multi", "sort": "desc"}
},
"targets": [
{"expr": "taupi_humidity_percent_innen", "legendFormat": "Indoor Humidity", "refId": "A"},
{"expr": "taupi_relay_status", "legendFormat": "Fan Active", "refId": "B"}
]
}
]
},
{
"title": "🔋 BLE Sensors Diagnostic",
"type": "row",
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 17},
"collapsed": true,
"panels": [
{
"title": "Sensor Batteries",
"type": "gauge",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 6, "w": 12, "x": 0, "y": 18},
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "red", "value": null},
{"color": "orange", "value": 20},
{"color": "green", "value": 50}
]
}
}
},
"options": {
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"targets": [
{"expr": "taupi_battery_percent_innen", "legendFormat": "Indoor Sensor Battery", "refId": "A"},
{"expr": "taupi_battery_percent_aussen", "legendFormat": "Outdoor Sensor Battery", "refId": "B"}
]
},
{
"title": "Sensor Connection Age (Staleness)",
"type": "timeseries",
"datasource": {"type": "prometheus", "uid": "prometheus"},
"gridPos": {"h": 6, "w": 12, "x": 12, "y": 18},
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"lineWidth": 2,
"fillOpacity": 5,
"spanNulls": true,
"showPoints": "never"
}
}
},
"options": {
"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["lastNotNull"]},
"tooltip": {"mode": "multi", "sort": "desc"}
},
"targets": [
{"expr": "taupi_lost_connection_seconds_innen", "legendFormat": "Indoor Connection Stale Time", "refId": "A"},
{"expr": "taupi_lost_connection_seconds_aussen", "legendFormat": "Outdoor Connection Stale Time", "refId": "B"}
]
}
]
}
]
}