From 2e2a487f4c9a404e9d6928c12e1ffe77d9dc0bab Mon Sep 17 00:00:00 2001 From: Lennard Beers Date: Sun, 12 Mar 2023 10:29:29 +0100 Subject: [PATCH] feat: add grafana dashboard --- dashboard.json | 807 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 807 insertions(+) create mode 100644 dashboard.json diff --git a/dashboard.json b/dashboard.json new file mode 100644 index 0000000..f6b4482 --- /dev/null +++ b/dashboard.json @@ -0,0 +1,807 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 22, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 10, + "x": 0, + "y": 0 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "homeassistant_sensor_power_w{entity=\"$power_entity\"}", + "legendFormat": "Leistung", + "range": true, + "refId": "A" + } + ], + "title": "Leistung", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 10, + "y": 0 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "homeassistant_sensor_power_w{entity=\"sensor.house_power_consumption\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Leistung", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 16, + "y": 0 + }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_total_kwh{name=\"$collector_name\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Energieverbrauch insgesamt", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 18, + "w": 2, + "x": 10, + "y": 4 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_day_kwh{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Tag", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_month_kwh_predicted{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Monat", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_year_kwh_predicted{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Jahr", + "range": true, + "refId": "C" + } + ], + "title": "Verbrauch", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "€" + }, + "overrides": [] + }, + "gridPos": { + "h": 18, + "w": 2, + "x": 12, + "y": 4 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_day_cost{name=\"$collector_name\"}", + "legendFormat": "Tag", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_month_cost_predicted{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Monat", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_year_cost_predicted{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Jahr", + "range": true, + "refId": "C" + } + ], + "title": "Kosten", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "€" + }, + "overrides": [] + }, + "gridPos": { + "h": 18, + "w": 2, + "x": 14, + "y": 4 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_day_cost_difference{name=\"$collector_name\"}", + "legendFormat": "Tag", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_month_cost_difference_predicted{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Monat", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_year_cost_difference_predicted{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Jahr", + "range": true, + "refId": "C" + } + ], + "title": "Kostendifferenz", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 18, + "w": 2, + "x": 16, + "y": 4 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "exemplar": false, + "expr": "estimenergy_day_accuracy{name=\"$collector_name\"}", + "instant": false, + "legendFormat": "Tag", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "exemplar": false, + "expr": "estimenergy_month_accuracy{name=\"$collector_name\"}", + "hide": false, + "instant": false, + "legendFormat": "Monat", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "exemplar": false, + "expr": "estimenergy_year_accuracy{name=\"$collector_name\"}", + "hide": false, + "instant": false, + "legendFormat": "Jahr", + "range": true, + "refId": "C" + } + ], + "title": "Genauigkeit", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "unit", + "value": "currencyEUR" + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 10, + "x": 0, + "y": 11 + }, + "hideTimeOverride": false, + "hidetimeoverride": true, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "exemplar": false, + "expr": "estimenergy_day_kwh{name=\"$collector_name\"}", + "hide": false, + "instant": false, + "legendFormat": "Energieverbrauch", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "editorMode": "code", + "expr": "estimenergy_day_cost{name=\"$collector_name\"}", + "hide": false, + "legendFormat": "Energiekosten", + "range": true, + "refId": "B" + } + ], + "timeTo": "now/d", + "title": "Energie", + "transformations": [], + "type": "timeseries" + } + ], + "refresh": "10s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "glow", + "value": "glow" + }, + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "definition": "label_values(estimenergy_day_kwh, name)", + "hide": 0, + "includeAll": false, + "label": "Collector Name", + "multi": false, + "name": "collector_name", + "options": [], + "query": { + "query": "label_values(estimenergy_day_kwh, name)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "sensor.house_power_consumption", + "value": "sensor.house_power_consumption" + }, + "datasource": { + "type": "prometheus", + "uid": "5gw-slhnk" + }, + "definition": "label_values(homeassistant_sensor_power_w, entity)", + "hide": 0, + "includeAll": false, + "label": "Power Entity", + "multi": false, + "name": "power_entity", + "options": [], + "query": { + "query": "label_values(homeassistant_sensor_power_w, entity)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "hidden": false + }, + "timezone": "", + "title": "Energie", + "uid": "wW1LMs04z", + "version": 16, + "weekStart": "" + } \ No newline at end of file