Skip to content

Commit

Permalink
Fix #11: Wrong integral calculation (#12)
Browse files Browse the repository at this point in the history
Close #11
  • Loading branch information
cschlipf authored Apr 12, 2024
1 parent d3e5570 commit b4d3a36
Show file tree
Hide file tree
Showing 4 changed files with 481 additions and 506 deletions.
10 changes: 5 additions & 5 deletions dashboards/PV Monat.json
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"axisWidth": 80,
"barAlignment": 0,
"barAlignment": 1,
"drawStyle": "bars",
"fillOpacity": 100,
"gradientMode": "none",
Expand Down Expand Up @@ -1559,7 +1559,7 @@
"axisPlacement": "auto",
"axisSoftMin": 0,
"axisWidth": 80,
"barAlignment": 0,
"barAlignment": 1,
"drawStyle": "bars",
"fillOpacity": 50,
"gradientMode": "none",
Expand Down Expand Up @@ -1710,7 +1710,7 @@
"axisSoftMax": 1,
"axisSoftMin": 0,
"axisWidth": 80,
"barAlignment": 0,
"barAlignment": 1,
"drawStyle": "bars",
"fillOpacity": 55,
"gradientMode": "none",
Expand Down Expand Up @@ -2015,7 +2015,7 @@
"axisSoftMax": 100,
"axisSoftMin": 0,
"axisWidth": 80,
"barAlignment": 0,
"barAlignment": 1,
"drawStyle": "bars",
"fillOpacity": 100,
"gradientMode": "none",
Expand Down Expand Up @@ -2226,6 +2226,6 @@
"timezone": "utc",
"title": "PV Monat",
"uid": "4iQda7igz",
"version": 129,
"version": 132,
"weekStart": ""
}
36 changes: 8 additions & 28 deletions dashboards/PV Today (Mobile).json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -1833,7 +1817,7 @@
"model": {
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB-FOR-LIBRARY-PANEL}"
"uid": "${DS_INFLUXDB}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -1907,10 +1891,6 @@
}
]
},
"libraryPanel": {
"name": "Kennzahlen Gauges Live",
"uid": "edgpezcp0j474c"
},
"options": {
"minVizHeight": 200,
"minVizWidth": 200,
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -2974,7 +2954,7 @@
"tags": []
},
{
"alias": "Volvo",
"alias": "Hyundai",
"datasource": {
"type": "influxdb",
"uid": "L-nZgczgk"
Expand Down
Loading

0 comments on commit b4d3a36

Please sign in to comment.