From 25dfe7108362017b15a4c9d75f5051a135be70ba Mon Sep 17 00:00:00 2001 From: Ralf Geschke Date: Tue, 7 Jun 2022 00:30:28 +0200 Subject: [PATCH] Initial commit, contains all necessary files to start invafetch and invaps --- README.md | 14 +- Solar_Inverter_Dashboard-1654554014678.json | 1630 +++++++++++++++++++ invafetch/processdata.json | 163 ++ kopv-dashboard.yml | 43 + sql/solardata.sql | 11 + 5 files changed, 1860 insertions(+), 1 deletion(-) create mode 100644 Solar_Inverter_Dashboard-1654554014678.json create mode 100644 invafetch/processdata.json create mode 100644 kopv-dashboard.yml create mode 100644 sql/solardata.sql diff --git a/README.md b/README.md index fc9dfb5..c60515f 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ -# grkopv-dashboard \ No newline at end of file +# grkopv-dashboard + +Start: + +``` +docker-compose -f kopv-dashboard.yml up -d +``` + +Stop: + +``` +docker-compose -f kopv-dashboard.yml down +``` diff --git a/Solar_Inverter_Dashboard-1654554014678.json b/Solar_Inverter_Dashboard-1654554014678.json new file mode 100644 index 0000000..2eb142a --- /dev/null +++ b/Solar_Inverter_Dashboard-1654554014678.json @@ -0,0 +1,1630 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "7.3.6" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Kostal Solar Electric Inverter Dashboard", + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 34, + "panels": [], + "title": "Main", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "watt" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_home_own_p", + "interval": "", + "legendFormat": "Own Consumption", + "refId": "A" + }, + { + "expr": "devices_local_home_bat_p", + "interval": "", + "legendFormat": "Battery", + "refId": "B" + }, + { + "expr": "devices_local_home_grid_p", + "interval": "", + "legendFormat": "Grid", + "refId": "C" + }, + { + "expr": "devices_local_home_pv_p", + "interval": "", + "legendFormat": "PV", + "refId": "D" + }, + { + "expr": "devices_local_home_p", + "interval": "", + "legendFormat": "Total", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Home Consumption", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:94", + "format": "watt", + "label": "Watt", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:95", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "max": 6000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 6000 + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 12, + "y": 1 + }, + "id": 20, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.3.6", + "targets": [ + { + "expr": "devices_local_pv1_p", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Input DC1 Power", + "type": "gauge" + }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "max": 6000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 10000 + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 22, + "options": { + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.3.6", + "targets": [ + { + "expr": "devices_local_pv2_p", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Input DC2 Power", + "type": "gauge" + }, + { + "datasource": "${DS_PROMETHEUS}", + "description": "", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "7.3.6", + "targets": [ + { + "expr": "devices_local_battery_cycles", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Battery Charging Cycles", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "amp" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "hiddenSeries": false, + "id": 26, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_pv1_i", + "interval": "", + "legendFormat": "Input DC1 Amperage", + "refId": "B" + }, + { + "expr": "devices_local_pv2_i", + "interval": "", + "legendFormat": "Input DC2 Amperage", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "PV Generator Amperage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:92", + "format": "amp", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:93", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "watt" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_pv1_p", + "interval": "", + "legendFormat": "Input DC1 Power", + "refId": "A" + }, + { + "expr": "devices_local_pv2_p", + "interval": "", + "legendFormat": "Input DC2 Power", + "refId": "B" + }, + { + "expr": "devices_local_pv1_p + devices_local_pv2_p", + "interval": "", + "legendFormat": "Input Total Power", + "refId": "C" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "PV Generator Power", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:607", + "format": "watt", + "label": "Watt", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:608", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "volt" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_pv1_u", + "interval": "", + "legendFormat": "Input DC1 Voltage", + "refId": "A" + }, + { + "expr": "devices_local_pv2_u", + "interval": "", + "legendFormat": "Input DC2 Voltage", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "PV Generator Voltage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:261", + "format": "volt", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:262", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "hertz" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_powermeter_frequency", + "interval": "", + "legendFormat": "Powermeter Frequency", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Powermeter Frequency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:437", + "format": "hertz", + "label": "Hz", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:438", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "hertz" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 16, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_ac_frequency", + "interval": "", + "legendFormat": "AC Frequency", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "AC Frequency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:522", + "format": "hertz", + "label": "Hz", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:523", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 36, + "panels": [], + "title": "Battery", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "percent" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 33 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_battery_soc", + "interval": "", + "legendFormat": "Battery Charging Status", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Battery Charging Status", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:210", + "format": "percent", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:211", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 33 + }, + "hiddenSeries": false, + "id": 30, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_battery_u", + "interval": "", + "legendFormat": "Battery Voltage", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Battery Voltage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:125", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:126", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "watt" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 41 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "devices_local_battery_p", + "interval": "", + "legendFormat": "Battery Power", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Battery Power", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:389", + "format": "watt", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:390", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": "${DS_PROMETHEUS}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 49 + }, + "id": 24, + "panels": [], + "title": "Statistics", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 50 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "statistic_autarky_day", + "interval": "", + "legendFormat": "Autarky Day", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Statistic Autarky Day", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:97", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:98", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {}, + "unit": "masskg" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 50 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "statistic_co2saving_day/1000", + "interval": "", + "legendFormat": "CO2 Saving Day", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Statistic CO2 Saving Day", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:182", + "format": "masskg", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:183", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 58 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "statistic_energy_home_day", + "interval": "", + "legendFormat": "Energy Home Day", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Statistic Energy Home Day", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:267", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:268", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 58 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.6", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "statistic_own_consumption_rate_day", + "interval": "", + "legendFormat": "Own Consumption Rate Day", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Statistic Own Consumption Rate Day", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:352", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:353", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "30s", + "schemaVersion": 26, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Solar Inverter Dashboard", + "uid": "BDreml_7k", + "version": 18 +} \ No newline at end of file diff --git a/invafetch/processdata.json b/invafetch/processdata.json new file mode 100644 index 0000000..265f458 --- /dev/null +++ b/invafetch/processdata.json @@ -0,0 +1,163 @@ +[ + { + "moduleid": "scb:statistic:EnergyFlow", + "processdataids": [ + "Statistic:Autarky:Day", + "Statistic:Autarky:Month", + "Statistic:Autarky:Total", + "Statistic:Autarky:Year", + "Statistic:CO2Saving:Day", + "Statistic:CO2Saving:Month", + "Statistic:CO2Saving:Total", + "Statistic:CO2Saving:Year", + "Statistic:EnergyChargeGrid:Day", + "Statistic:EnergyChargeGrid:Month", + "Statistic:EnergyChargeGrid:Total", + "Statistic:EnergyChargeGrid:Year", + "Statistic:EnergyChargeInvIn:Day", + "Statistic:EnergyChargeInvIn:Month", + "Statistic:EnergyChargeInvIn:Total", + "Statistic:EnergyChargeInvIn:Year", + "Statistic:EnergyChargePv:Day", + "Statistic:EnergyChargePv:Month", + "Statistic:EnergyChargePv:Total", + "Statistic:EnergyChargePv:Year", + "Statistic:EnergyDischarge:Day", + "Statistic:EnergyDischarge:Month", + "Statistic:EnergyDischarge:Total", + "Statistic:EnergyDischarge:Year", + "Statistic:EnergyDischargeGrid:Day", + "Statistic:EnergyDischargeGrid:Month", + "Statistic:EnergyDischargeGrid:Total", + "Statistic:EnergyDischargeGrid:Year", + "Statistic:EnergyHome:Day", + "Statistic:EnergyHome:Month", + "Statistic:EnergyHome:Total", + "Statistic:EnergyHome:Year", + "Statistic:EnergyHomeBat:Day", + "Statistic:EnergyHomeBat:Month", + "Statistic:EnergyHomeBat:Total", + "Statistic:EnergyHomeBat:Year", + "Statistic:EnergyHomeGrid:Day", + "Statistic:EnergyHomeGrid:Month", + "Statistic:EnergyHomeGrid:Total", + "Statistic:EnergyHomeGrid:Year", + "Statistic:EnergyHomeOwn:Total", + "Statistic:EnergyHomePv:Day", + "Statistic:EnergyHomePv:Month", + "Statistic:EnergyHomePv:Total", + "Statistic:EnergyHomePv:Year", + "Statistic:EnergyPv1:Day", + "Statistic:EnergyPv1:Month", + "Statistic:EnergyPv1:Total", + "Statistic:EnergyPv1:Year", + "Statistic:EnergyPv2:Day", + "Statistic:EnergyPv2:Month", + "Statistic:EnergyPv2:Total", + "Statistic:EnergyPv2:Year", + "Statistic:EnergyPv3:Day", + "Statistic:EnergyPv3:Month", + "Statistic:EnergyPv3:Total", + "Statistic:EnergyPv3:Year", + "Statistic:OwnConsumptionRate:Day", + "Statistic:OwnConsumptionRate:Month", + "Statistic:OwnConsumptionRate:Total", + "Statistic:OwnConsumptionRate:Year", + "Statistic:Yield:Day", + "Statistic:Yield:Month", + "Statistic:Yield:Total", + "Statistic:Yield:Year" + ] + }, + { + "moduleid": "devices:local", + "processdataids": [ + "Bat2Grid_P", + "Dc_P", + "DigitalIn", + "EM_State", + "Grid2Bat_P", + "Grid_L1_I", + "Grid_L1_P", + "Grid_L2_I", + "Grid_L2_P", + "Grid_L3_I", + "Grid_L3_P", + "Grid_P", + "Grid_Q", + "Grid_S", + "HomeBat_P", + "HomeGrid_P", + "HomeOwn_P", + "HomePv_P", + "Home_P", + "Inverter:State", + "Iso_R", + "LimitEvuAbs", + "LimitEvuRel", + "PV2Bat_P", + "SinkMax_P", + "SourceMax_P", + "WorkTime" + ] + }, + { + "moduleid": "devices:local:ac", + "processdataids": [ + "CosPhi", + "Frequency", + "InvIn_P", + "InvOut_P", + "L1_I", + "L1_P", + "L1_U", + "L2_I", + "L2_P", + "L2_U", + "L3_I", + "L3_P", + "L3_U", + "P", + "Q", + "ResidualCDc_I", + "S" + ] + }, + { + "moduleid": "devices:local:battery", + "processdataids": [ + "BatManufacturer", + "BatModel", + "BatSerialNo", + "BatVersionFW", + "Cycles", + "FullChargeCap_E", + "I", + "P", + "SoC", + "U", + "WorkCapacity" + ] + }, + { + "moduleid": "devices:local:powermeter", + "processdataids": ["CosPhi", "Frequency", "P", "Q", "S"] + }, + { + "moduleid": "devices:local:pv1", + "processdataids": ["I", "P", "U"] + }, + { + "moduleid": "devices:local:pv2", + "processdataids": ["I", "P", "U"] + }, + { + "moduleid": "scb:event", + "processdataids": [ + "ErrMc", + "ErrSFH", + "Event:ActiveErrorCnt", + "Event:ActiveWarningCnt" + ] + } +] diff --git a/kopv-dashboard.yml b/kopv-dashboard.yml new file mode 100644 index 0000000..e1e8f94 --- /dev/null +++ b/kopv-dashboard.yml @@ -0,0 +1,43 @@ +version: '3.7' +services: + mariadb: + image: mariadb:10.8 + restart: always + volumes: + - ./mariadb_solar/data:/var/lib/mysql + - ./sql:/docker-entrypoint-initdb.d + #ports: + # - "3307:3306" + environment: + MYSQL_ROOT_PASSWORD: + MYSQL_DATABASE: solardb + MYSQL_USER: solardbuser + MYSQL_PASSWORD: + invafetch: + image: ghcr.io/geschke/invafetch:main + restart: always + volumes: + - ./invafetch/processdata.json:/app/processdata.json + environment: + DBHOST: "mariadb" + DBUSER: "solardbuser" + DBNAME: "solardb" + DBPASSWORD: + #DBPORT:"3307" + INV_SERVER: + INV_PASSWORD: + #TIME_REQUEST_DURATION_SECONDS:2 + #TIME_NEW_LOGIN_MINUTES:1 + invaps: + image: ghcr.io/geschke/invaps:main + restart: always + environment: + DBHOST: "mariadb" + DBUSER: "solardbuser" + DBNAME: "solardb" + DBPASSWORD: + PORT: "8080" + GIN_MODE: release + #DBPORT: 3307 + ports: + - "8090:8080" diff --git a/sql/solardata.sql b/sql/solardata.sql new file mode 100644 index 0000000..ba94f66 --- /dev/null +++ b/sql/solardata.sql @@ -0,0 +1,11 @@ +CREATE TABLE `solardata` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `dt_created` DATETIME NULL DEFAULT current_timestamp(), + `processdata` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin', + PRIMARY KEY (`id`) USING BTREE, + INDEX `dt_created` (`dt_created`) USING BTREE, + CONSTRAINT `processdata` CHECK (json_valid(`processdata`)) +) +COLLATE='utf8mb4_general_ci' +ENGINE=InnoDB +;