diff --git a/dashboards/PV Monat.json b/dashboards/PV Monat.json index 264b959..1d46cb8 100644 --- a/dashboards/PV Monat.json +++ b/dashboards/PV Monat.json @@ -1093,7 +1093,7 @@ "axisLabel": "", "axisPlacement": "auto", "axisWidth": 80, - "barAlignment": 0, + "barAlignment": 1, "drawStyle": "bars", "fillOpacity": 100, "gradientMode": "none", @@ -1559,7 +1559,7 @@ "axisPlacement": "auto", "axisSoftMin": 0, "axisWidth": 80, - "barAlignment": 0, + "barAlignment": 1, "drawStyle": "bars", "fillOpacity": 50, "gradientMode": "none", @@ -1710,7 +1710,7 @@ "axisSoftMax": 1, "axisSoftMin": 0, "axisWidth": 80, - "barAlignment": 0, + "barAlignment": 1, "drawStyle": "bars", "fillOpacity": 55, "gradientMode": "none", @@ -2015,7 +2015,7 @@ "axisSoftMax": 100, "axisSoftMin": 0, "axisWidth": 80, - "barAlignment": 0, + "barAlignment": 1, "drawStyle": "bars", "fillOpacity": 100, "gradientMode": "none", @@ -2226,6 +2226,6 @@ "timezone": "utc", "title": "PV Monat", "uid": "4iQda7igz", - "version": 129, + "version": 132, "weekStart": "" } \ No newline at end of file diff --git a/dashboards/PV Today (Mobile).json b/dashboards/PV Today (Mobile).json index fc042ed..3d770d3 100644 --- a/dashboards/PV Today (Mobile).json +++ b/dashboards/PV Today (Mobile).json @@ -7,22 +7,6 @@ "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" - }, - { - "name": "DS_INFLUXDB-FOR-LIBRARY-PANEL", - "label": "InfluxDB", - "description": "", - "type": "datasource", - "pluginId": "influxdb", - "pluginName": "InfluxDB", - "usage": { - "libraryPanels": [ - { - "name": "Kennzahlen Gauges Live", - "uid": "edgpezcp0j474c" - } - ] - } } ], "__elements": { @@ -1833,7 +1817,7 @@ "model": { "datasource": { "type": "influxdb", - "uid": "${DS_INFLUXDB-FOR-LIBRARY-PANEL}" + "uid": "${DS_INFLUXDB}" }, "description": "", "fieldConfig": { @@ -1907,10 +1891,6 @@ } ] }, - "libraryPanel": { - "name": "Kennzahlen Gauges Live", - "uid": "edgpezcp0j474c" - }, "options": { "minVizHeight": 200, "minVizWidth": 200, @@ -1982,7 +1962,7 @@ "uid": "L-nZgczgk" }, "hide": true, - "query": "SELECT integral(\"subquery\") /3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Netzbezug", "resultFormat": "time_series" @@ -1993,7 +1973,7 @@ "uid": "L-nZgczgk" }, "hide": true, - "query": "SELECT integral(\"subquery\") /-3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /-3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Einspeisung", "resultFormat": "time_series" @@ -2738,7 +2718,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Netzbezug", "resultFormat": "time_series", @@ -2781,7 +2761,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Einspeisung", "resultFormat": "time_series", @@ -2824,7 +2804,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Entladen", "resultFormat": "time_series", @@ -2867,7 +2847,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Laden", "resultFormat": "time_series", @@ -2974,7 +2954,7 @@ "tags": [] }, { - "alias": "Volvo", + "alias": "Hyundai", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" diff --git a/dashboards/PV Today.json b/dashboards/PV Today.json index 579dadd..23b9b4f 100644 --- a/dashboards/PV Today.json +++ b/dashboards/PV Today.json @@ -7,13 +7,6 @@ "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" - }, - { - "name": "DS_EXPRESSION", - "label": "Expression", - "description": "", - "type": "datasource", - "pluginId": "__expr__" } ], "__elements": { @@ -460,9 +453,9 @@ "type": "timeseries" } }, - "f930b616-80c3-4485-98ee-0205a64c8260": { - "name": "Speicher/Haus Gauge", - "uid": "f930b616-80c3-4485-98ee-0205a64c8260", + "edgpezcp0j474c": { + "name": "Kennzahlen Gauges Live", + "uid": "edgpezcp0j474c", "kind": 1, "model": { "datasource": { @@ -473,12 +466,10 @@ "fieldConfig": { "defaults": { "color": { + "fixedColor": "semi-dark-green", "mode": "thresholds" }, - "custom": { - "neutral": 0 - }, - "decimals": 2, + "decimals": 1, "links": [], "mappings": [], "thresholds": { @@ -490,71 +481,42 @@ } ] }, - "unit": "kW" + "unit": "kWh" }, "overrides": [ { "matcher": { "id": "byName", - "options": "Speicher" + "options": "Autarkie" }, "properties": [ + { + "id": "unit", + "value": "percentunit" + }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { - "color": "blue", + "color": "green", "value": null - }, - { - "color": "dark-blue", - "value": 0 } ] } - }, - { - "id": "min", - "value": -5 - }, - { - "id": "max", - "value": 5 } ] }, { "matcher": { "id": "byName", - "options": "Haus" + "options": "Eigenverbrauch" }, "properties": [ { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "thresholds" - } - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "SolarMan", - "url": "https://globalhome.solarmanpv.com/plant/infos/data" - } - ] - }, - { - "id": "min", - "value": -6 - }, - { - "id": "max", - "value": 0 + "id": "unit", + "value": "percentunit" }, { "id": "thresholds", @@ -562,7 +524,7 @@ "mode": "absolute", "steps": [ { - "color": "red", + "color": "purple", "value": null } ] @@ -591,20 +553,35 @@ "valueSize": 16 } }, - "pluginVersion": "10.2.3", + "pluginVersion": "10.4.1", "targets": [ { - "alias": "Speicher", + "alias": "PV", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" }, - "groupBy": [], - "hide": false, - "measurement": "batteryPower", + "groupBy": [ + { + "params": [ + "1h" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": true, + "measurement": "pvPower", "orderByTime": "ASC", - "policy": "autogen", - "refId": "Speicher", + "policy": "default", + "query": "SELECT integral(\"value\") /3600 FROM \"pvPower\" WHERE $timeFilter AND value < 20000 GROUP BY time(1d) fill(none)", + "rawQuery": true, + "refId": "energyPV", "resultFormat": "time_series", "select": [ [ @@ -615,29 +592,61 @@ "type": "field" }, { - "params": [ - " / 1000" - ], - "type": "math" + "params": [], + "type": "mean" } ] ], "tags": [] }, + { + "datasource": { + "type": "influxdb", + "uid": "L-nZgczgk" + }, + "hide": true, + "query": "SELECT integral(\"subquery\") /3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", + "rawQuery": true, + "refId": "Netzbezug", + "resultFormat": "time_series" + }, + { + "datasource": { + "type": "influxdb", + "uid": "L-nZgczgk" + }, + "hide": true, + "query": "SELECT integral(\"subquery\") /-3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", + "rawQuery": true, + "refId": "Einspeisung", + "resultFormat": "time_series" + }, { "alias": "Haus", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" }, - "groupBy": [], - "hide": false, - "measurement": "homePower", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": true, "orderByTime": "ASC", - "policy": "autogen", - "query": "SELECT mean(\"value\") FROM \"measurement\" WHERE $timeFilter GROUP BY time($__interval) fill(null)", - "rawQuery": false, - "refId": "Haus", + "policy": "default", + "query": "SELECT integral(\"value\") /3600 FROM \"homePower\" WHERE $timeFilter AND value < 20000 GROUP BY time(1d) fill(none)", + "rawQuery": true, + "refId": "energieHaus", "resultFormat": "time_series", "select": [ [ @@ -647,24 +656,88 @@ ], "type": "field" }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Garage", + "datasource": { + "type": "influxdb", + "uid": "L-nZgczgk" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": true, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT integral(\"value\") / 3600 FROM \"chargePower\" WHERE $timeFilter GROUP BY time(1d) fill(none)", + "rawQuery": true, + "refId": "energieAuto", + "resultFormat": "time_series", + "select": [ + [ { "params": [ - "*(-1)/1000" + "value" ], - "type": "math" + "type": "field" + }, + { + "params": [], + "type": "mean" } ] ], "tags": [] + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "1 - $Netzbezug/($energieHaus + $energieAuto)", + "hide": false, + "refId": "Autarkie", + "type": "math" + }, + { + "datasource": { + "name": "Expression", + "type": "__expr__", + "uid": "__expr__" + }, + "expression": "($energyPV - $Einspeisung) / $energyPV", + "hide": false, + "refId": "Eigenverbrauch", + "type": "math" } ], + "title": "Kennzahlen", "transparent": true, "type": "gauge" } }, - "fad84f15-41e1-4f01-9ad1-f8c3a02bfaac": { - "name": "Ladepunkte Gauge", - "uid": "fad84f15-41e1-4f01-9ad1-f8c3a02bfaac", + "f930b616-80c3-4485-98ee-0205a64c8260": { + "name": "Speicher/Haus Gauge", + "uid": "f930b616-80c3-4485-98ee-0205a64c8260", "kind": 1, "model": { "datasource": { @@ -681,15 +754,8 @@ "neutral": 0 }, "decimals": 2, - "links": [ - { - "title": "EVCC", - "url": "http://home:7070/#/" - } - ], + "links": [], "mappings": [], - "max": 0, - "min": -11, "thresholds": { "mode": "absolute", "steps": [ @@ -705,7 +771,7 @@ { "matcher": { "id": "byName", - "options": "Garage" + "options": "Speicher" }, "properties": [ { @@ -714,27 +780,64 @@ "mode": "absolute", "steps": [ { - "color": "orange", + "color": "blue", "value": null + }, + { + "color": "dark-blue", + "value": 0 } ] } + }, + { + "id": "min", + "value": -5 + }, + { + "id": "max", + "value": 5 } ] }, { "matcher": { "id": "byName", - "options": "Stellplatz" + "options": "Haus" }, "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "thresholds" + } + }, + { + "id": "links", + "value": [ + { + "targetBlank": true, + "title": "SolarMan", + "url": "https://globalhome.solarmanpv.com/plant/infos/data" + } + ] + }, + { + "id": "min", + "value": -6 + }, + { + "id": "max", + "value": 0 + }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { - "color": "dark-orange", + "color": "red", "value": null } ] @@ -766,17 +869,17 @@ "pluginVersion": "10.2.3", "targets": [ { - "alias": "Garage", + "alias": "Speicher", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" }, "groupBy": [], "hide": false, - "measurement": "chargePower", + "measurement": "batteryPower", "orderByTime": "ASC", "policy": "autogen", - "refId": "Garage", + "refId": "Speicher", "resultFormat": "time_series", "select": [ [ @@ -788,32 +891,28 @@ }, { "params": [ - "*(-1)/1000" + " / 1000" ], "type": "math" } ] ], - "tags": [ - { - "key": "loadpoint::tag", - "operator": "=", - "value": "Garage" - } - ] + "tags": [] }, { - "alias": "Stellplatz", + "alias": "Haus", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" }, "groupBy": [], "hide": false, - "measurement": "chargePower", + "measurement": "homePower", "orderByTime": "ASC", "policy": "autogen", - "refId": "Stellplatz", + "query": "SELECT mean(\"value\") FROM \"measurement\" WHERE $timeFilter GROUP BY time($__interval) fill(null)", + "rawQuery": false, + "refId": "Haus", "resultFormat": "time_series", "select": [ [ @@ -831,13 +930,7 @@ } ] ], - "tags": [ - { - "key": "loadpoint::tag", - "operator": "=", - "value": "Stellplatz" - } - ] + "tags": [] } ], "transparent": true, @@ -1470,7 +1563,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Netzbezug", "resultFormat": "time_series", @@ -1513,7 +1606,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Einspeisung", "resultFormat": "time_series", @@ -1556,7 +1649,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Entladen", "resultFormat": "time_series", @@ -1599,7 +1692,7 @@ "hide": false, "orderByTime": "ASC", "policy": "default", - "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", + "query": "SELECT integral(\"subquery\") /-3600000 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"batteryPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(0)) WHERE $timeFilter GROUP BY time(1d) fill(0)", "rawQuery": true, "refId": "Laden", "resultFormat": "time_series", @@ -1649,45 +1742,225 @@ "select": [ [ { - "params": [ - "value" - ], - "type": "field" - }, + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tesla", + "datasource": { + "type": "influxdb", + "uid": "L-nZgczgk" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT integral(\"value\") / 3600000 FROM \"chargePower\" WHERE (\"vehicle\"::tag = 'Tesla') AND $timeFilter GROUP BY time(1d) fill(null)", + "rawQuery": true, + "refId": "energyTesla", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Hyundai", + "datasource": { + "type": "influxdb", + "uid": "L-nZgczgk" + }, + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT integral(\"value\") / 3600000 FROM \"chargePower\" WHERE (\"vehicle\"::tag = 'Hyundai') AND $timeFilter GROUP BY time(1d) fill(0)", + "rawQuery": true, + "refId": "energyHyundai", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "transparent": true, + "type": "bargauge" + } + }, + "fad84f15-41e1-4f01-9ad1-f8c3a02bfaac": { + "name": "Ladepunkte Gauge", + "uid": "fad84f15-41e1-4f01-9ad1-f8c3a02bfaac", + "kind": 1, + "model": { + "datasource": { + "type": "influxdb", + "uid": "${DS_INFLUXDB}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "neutral": 0 + }, + "decimals": 2, + "links": [ + { + "title": "EVCC", + "url": "http://home:7070/#/" + } + ], + "mappings": [], + "max": 0, + "min": -11, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "kW" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Garage" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "orange", + "value": null + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Stellplatz" + }, + "properties": [ { - "params": [], - "type": "mean" + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-orange", + "value": null + } + ] + } } ] + } + ] + }, + "options": { + "minVizHeight": 200, + "minVizWidth": 200, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" ], - "tags": [] + "fields": "", + "values": false }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto", + "text": { + "titleSize": 12, + "valueSize": 16 + } + }, + "pluginVersion": "10.2.3", + "targets": [ { - "alias": "Tesla", + "alias": "Garage", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" }, - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], + "groupBy": [], "hide": false, + "measurement": "chargePower", "orderByTime": "ASC", - "policy": "default", - "query": "SELECT integral(\"value\") / 3600000 FROM \"chargePower\" WHERE (\"vehicle\"::tag = 'Tesla') AND $timeFilter GROUP BY time(1d) fill(null)", - "rawQuery": true, - "refId": "energyTesla", + "policy": "autogen", + "refId": "Garage", "resultFormat": "time_series", "select": [ [ @@ -1698,39 +1971,33 @@ "type": "field" }, { - "params": [], - "type": "mean" + "params": [ + "*(-1)/1000" + ], + "type": "math" } ] ], - "tags": [] + "tags": [ + { + "key": "loadpoint::tag", + "operator": "=", + "value": "Garage" + } + ] }, { - "alias": "Volvo", + "alias": "Stellplatz", "datasource": { "type": "influxdb", "uid": "L-nZgczgk" }, - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], + "groupBy": [], "hide": false, + "measurement": "chargePower", "orderByTime": "ASC", - "policy": "default", - "query": "SELECT integral(\"value\") / 3600000 FROM \"chargePower\" WHERE (\"vehicle\"::tag = 'Hyundai') AND $timeFilter GROUP BY time(1d) fill(0)", - "rawQuery": true, - "refId": "energyHyundai", + "policy": "autogen", + "refId": "Stellplatz", "resultFormat": "time_series", "select": [ [ @@ -1741,16 +2008,24 @@ "type": "field" }, { - "params": [], - "type": "mean" + "params": [ + "*(-1)/1000" + ], + "type": "math" } ] ], - "tags": [] + "tags": [ + { + "key": "loadpoint::tag", + "operator": "=", + "value": "Stellplatz" + } + ] } ], "transparent": true, - "type": "bargauge" + "type": "gauge" } }, "Blh9JqRRk": { @@ -2472,17 +2747,6 @@ } }, "__requires": [ - { - "type": "datasource", - "id": "__expr__", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, { "type": "grafana", "id": "grafana", @@ -2627,286 +2891,17 @@ } }, { - "datasource": { - "type": "influxdb", - "uid": "${DS_INFLUXDB}" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "semi-dark-green", - "mode": "thresholds" - }, - "decimals": 1, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kWh" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Autarkie" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Eigenverbrauch" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "purple", - "value": null - } - ] - } - } - ] - } - ] - }, "gridPos": { - "h": 10, + "h": 6, "w": 4, "x": 20, "y": 0 }, - "id": 58, - "options": { - "minVizHeight": 200, - "minVizWidth": 200, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto", - "text": { - "titleSize": 12, - "valueSize": 16 - } - }, - "pluginVersion": "10.4.1", - "targets": [ - { - "alias": "PV", - "datasource": { - "type": "influxdb", - "uid": "${DS_INFLUXDB}" - }, - "groupBy": [ - { - "params": [ - "1h" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": true, - "measurement": "pvPower", - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT integral(\"value\") /3600 FROM \"pvPower\" WHERE $timeFilter AND value < 20000 GROUP BY time(1d) fill(none)", - "rawQuery": true, - "refId": "energyPV", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - { - "datasource": { - "type": "influxdb", - "uid": "${DS_INFLUXDB}" - }, - "hide": true, - "query": "SELECT integral(\"subquery\") /3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value >=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", - "rawQuery": true, - "refId": "Netzbezug", - "resultFormat": "time_series" - }, - { - "datasource": { - "type": "influxdb", - "uid": "${DS_INFLUXDB}" - }, - "hide": true, - "query": "SELECT integral(\"subquery\") /-3600 FROM (SELECT mean(\"value\") AS \"subquery\" FROM \"gridPower\" WHERE $timeFilter and value <=0 GROUP BY time(10s) fill(none)) WHERE $timeFilter GROUP BY time(1d) fill(null)", - "rawQuery": true, - "refId": "Einspeisung", - "resultFormat": "time_series" - }, - { - "alias": "Haus", - "datasource": { - "type": "influxdb", - "uid": "${DS_INFLUXDB}" - }, - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": true, - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT integral(\"value\") /3600 FROM \"homePower\" WHERE $timeFilter AND value < 20000 GROUP BY time(1d) fill(none)", - "rawQuery": true, - "refId": "energieHaus", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - { - "alias": "Garage", - "datasource": { - "type": "influxdb", - "uid": "${DS_INFLUXDB}" - }, - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": true, - "orderByTime": "ASC", - "policy": "default", - "query": "SELECT integral(\"value\") / 3600 FROM \"chargePower\" WHERE $timeFilter GROUP BY time(1d) fill(none)", - "rawQuery": true, - "refId": "energieAuto", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - }, - { - "datasource": { - "type": "__expr__", - "uid": "${DS_EXPRESSION}" - }, - "expression": "1 - $Netzbezug/($energieHaus + $energieAuto)", - "hide": false, - "refId": "Autarkie", - "type": "math" - }, - { - "datasource": { - "type": "__expr__", - "uid": "${DS_EXPRESSION}" - }, - "expression": "($energyPV - $Einspeisung) / $energyPV", - "hide": false, - "refId": "Eigenverbrauch", - "type": "math" - } - ], - "title": "Kennzahlen", - "transparent": true, - "type": "gauge" + "id": 64, + "libraryPanel": { + "uid": "edgpezcp0j474c", + "name": "Kennzahlen Gauges Live" + } }, { "gridPos": { @@ -2921,25 +2916,12 @@ "name": "Speicher/Haus Gauge" } }, - { - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 10 - }, - "id": 54, - "libraryPanel": { - "uid": "fad84f15-41e1-4f01-9ad1-f8c3a02bfaac", - "name": "Ladepunkte Gauge" - } - }, { "gridPos": { "h": 3, "w": 4, "x": 20, - "y": 10 + "y": 6 }, "id": 51, "libraryPanel": { @@ -2949,10 +2931,10 @@ }, { "gridPos": { - "h": 8, + "h": 12, "w": 4, "x": 20, - "y": 13 + "y": 9 }, "id": 40, "libraryPanel": { @@ -2960,6 +2942,19 @@ "name": "Energie" } }, + { + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 54, + "libraryPanel": { + "uid": "fad84f15-41e1-4f01-9ad1-f8c3a02bfaac", + "name": "Ladepunkte Gauge" + } + }, { "gridPos": { "h": 6, @@ -2967,7 +2962,7 @@ "x": 0, "y": 15 }, - "id": 4, + "id": 66, "libraryPanel": { "uid": "Blh9JqRRk", "name": "Batterieverlauf" @@ -3004,6 +2999,6 @@ "timezone": "", "title": "PV Today", "uid": "7Ou-Y1Rgk", - "version": 107, + "version": 111, "weekStart": "" } \ No newline at end of file diff --git a/scripts/evcc-influx-aggregate.sh b/scripts/evcc-influx-aggregate.sh index fe34afe..4605a77 100755 --- a/scripts/evcc-influx-aggregate.sh +++ b/scripts/evcc-influx-aggregate.sh @@ -151,11 +151,11 @@ writeDailyEnergies() { ;; positives) logDebug "${fYear}-${fMonth}-${fDay}: Aggregating energy of positive values from $powerMeasurement into ${energyMeasurement}" - query="SELECT integral(\"subquery\") / 3600 FROM (SELECT mean(\"$field\") AS \"subquery\" FROM \"$powerMeasurement\" WHERE time >= '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time <= '${fYear}-${fMonth}-${fDay}T23:59:59Z' $additionalWhere AND \"$field\" >=0 GROUP BY time(10s) fill(none)) WHERE time > '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time < '${fYear}-${fMonth}-${fDay}T23:59:59Z' GROUP BY time(1d) fill(null)" + query="SELECT integral(\"subquery\") / 3600 FROM (SELECT mean(\"$field\") AS \"subquery\" FROM \"$powerMeasurement\" WHERE time >= '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time <= '${fYear}-${fMonth}-${fDay}T23:59:59Z' $additionalWhere AND \"$field\" >=0 GROUP BY time(10s) fill(0)) WHERE time > '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time < '${fYear}-${fMonth}-${fDay}T23:59:59Z' GROUP BY time(1d) fill(0)" ;; negatives) logDebug "${fYear}-${fMonth}-${fDay}: Aggregating energy of negative values from $powerMeasurement into ${energyMeasurement}" - query="SELECT integral(\"subquery\") / -3600 FROM (SELECT mean(\"$field\") AS \"subquery\" FROM \"$powerMeasurement\" WHERE time >= '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time <= '${fYear}-${fMonth}-${fDay}T23:59:59Z' $additionalWhere AND \"$field\" <=0 GROUP BY time(10s) fill(none)) WHERE time > '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time < '${fYear}-${fMonth}-${fDay}T23:59:59Z' GROUP BY time(1d) fill(null)" + query="SELECT integral(\"subquery\") / -3600 FROM (SELECT mean(\"$field\") AS \"subquery\" FROM \"$powerMeasurement\" WHERE time >= '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time <= '${fYear}-${fMonth}-${fDay}T23:59:59Z' $additionalWhere AND \"$field\" <=0 GROUP BY time(10s) fill(0)) WHERE time > '${fYear}-${fMonth}-${fDay}T00:00:00Z' AND time < '${fYear}-${fMonth}-${fDay}T23:59:59Z' GROUP BY time(1d) fill(0)" ;; *) logError "Unknown query mode: '$mode'."