From 1ea4788848b4b0c5c01261d77b07288f94ef6d9b Mon Sep 17 00:00:00 2001 From: znetsixe <73483679+znetsixe@users.noreply.github.com> Date: Tue, 13 Jan 2026 14:29:43 +0100 Subject: [PATCH] update dashboardAPI -AGENT --- config/dashboardapi.json | 71 + config/machine.json | 2097 +------------------------ config/machineGroup.json | 2693 ++------------------------------- config/measurement.json | 959 +----------- config/monster.json | 2667 +------------------------------- config/pumpingStation.json | 85 ++ config/reactor.json | 71 + config/settler.json | 71 + config/valve.json | 85 ++ config/valveGroupControl.json | 85 ++ dashboardapi.html | 172 +-- dashboardapi.js | 133 +- package.json | 26 + src/nodeClass.js | 103 ++ src/specificClass.js | 195 +++ test/dashboardapi.test.js | 82 + 16 files changed, 1202 insertions(+), 8393 deletions(-) create mode 100644 config/dashboardapi.json create mode 100644 config/pumpingStation.json create mode 100644 config/reactor.json create mode 100644 config/settler.json create mode 100644 config/valve.json create mode 100644 config/valveGroupControl.json create mode 100644 package.json create mode 100644 src/nodeClass.js create mode 100644 src/specificClass.js create mode 100644 test/dashboardapi.test.js diff --git a/config/dashboardapi.json b/config/dashboardapi.json new file mode 100644 index 0000000..c7953f8 --- /dev/null +++ b/config/dashboardapi.json @@ -0,0 +1,71 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "DashboardAPI", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 1 }, + "id": 2, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\")\n |> aggregateWindow(every: v.windowPeriod, fn: count, createEmpty: false)", + "refId": "A" + } + ], + "title": "Upsert Activity (if logged)", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "dashboardapi", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/machine.json b/config/machine.json index 1eb1e3a..b4c82ae 100644 --- a/config/machine.json +++ b/config/machine.json @@ -3,2089 +3,126 @@ "list": [ { "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, - "iconColor": "rgba(0,255,255,1)", + "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, - "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 20, + "id": null, "links": [], "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Realtime Machine", "type": "row" }, { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1, - "panels": [], - "title": "Realtime", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 1 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 6, "x": 0, "y": 1 }, "id": 2, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^state \\{geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K\\-S03R\\+HGM1X\\-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"\\}$/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"state\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", + "query": "from(bucket: \"${bucket}\")\n |> range(start: -7d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"state\" or r._field==\"mode\"))\n |> last()", "refId": "A" } ], - "title": "Machine State", + "title": "State / Mode (last)", "type": "stat" }, { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 1 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 6, "x": 6, "y": 1 }, + "id": 3, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: -7d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"ctrl\" or r._field==\"runtime\"))\n |> last()", + "refId": "A" + } + ], + "title": "Ctrl / Runtime (last)", + "type": "stat" + }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 9, "w": 12, "x": 12, "y": 1 }, "id": 4, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^mode \\{geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K\\-S03R\\+HGM1X\\-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"\\}$/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"mode\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"flow.predicted.downstream\" or r._field==\"flow.predicted.atEquipment\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", "refId": "A" } ], - "title": "Machine Mode", - "type": "stat" + "title": "Flow (predicted)", + "type": "timeseries" }, { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "green", - "value": 0 - }, - { - "color": "orange", - "value": 0.4 - }, - { - "color": "red", - "value": 0.8 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 9, - "y": 1 - }, - "id": 28, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"effRelDistFromPeak\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Relative distance from BEP", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 220, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 150 - }, - { - "color": "red", - "value": 200 - } - ] - }, - "unit": "m3/h" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 12, - "y": 1 - }, - "id": 26, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"downstream_measured_flow\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Downstream measured flow", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "flowLongTermLevel {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] - }, - "gridPos": { - "h": 15, - "w": 3, - "x": 15, - "y": 1 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"ctrl\" )\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Control", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "flowLongTermLevel {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] - }, - "gridPos": { - "h": 15, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"NCogPercent\" )\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Normalized CoG in %", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "flowLongTermLevel {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] - }, - "gridPos": { - "h": 5, - "w": 3, - "x": 0, - "y": 4 - }, - "id": 21, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"cog\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Best Efficiency Point", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 3, - "x": 3, - "y": 4 - }, - "id": 19, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"flowImmediateLevel\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Flow Shortterm NRMSD", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 1 - }, - { - "color": "orange", - "value": 2 - }, - { - "color": "red", - "value": 3 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 3, - "x": 6, - "y": 4 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"flowLongTermLevel\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Flow Longterm NRMSD", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "green", - "value": 0 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 0, - "y": 9 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"downstream_predicted_efficiency\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Efficiency", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "max": 3600, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 1500 - }, - { - "color": "red", - "value": 2000 - } - ] - }, - "unit": "pressurembar" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 3, - "y": 9 - }, - "id": 23, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"upstream_measured_pressure\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Upstream pressure", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "max": 3600, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 1500 - }, - { - "color": "red", - "value": 2000 - } - ] - }, - "unit": "pressurembar" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"downstream_measured_pressure\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Downstream pressure", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 220, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "red", - "value": 120 - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 9, - "y": 9 - }, - "id": 31, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"upstream_predicted_power\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Predicted power", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 220, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 150 - }, - { - "color": "red", - "value": 200 - } - ] - }, - "unit": "m3/h" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 12, - "y": 9 - }, - "id": 24, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"downstream_predicted_flow\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Downstream predicted flow", - "type": "gauge" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 }, "id": 5, - "panels": [], - "title": "Measurements", - "type": "row" + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"power.predicted.atEquipment\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Power (predicted @ atEquipment)", + "type": "timeseries" }, { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "displayName": "pressure", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 17 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 10 }, "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"upstream_measured_pressure\" or r._field==\"upstream_predicted_pressure\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"pressure.measured.upstream\" or r._field==\"pressure.measured.downstream\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", "refId": "A" } ], - "title": "Upstream pressure", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 19, - "w": 5, - "x": 6, - "y": 17 - }, - "id": 15, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"differential_measured_pressure\" )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Differential pressure", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 6, - "x": 11, - "y": 17 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"upstream_measured_power\" or r._field==\"upstream_predicted_power\" ) )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Power", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 7, - "x": 17, - "y": 17 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"downstream_measured_flow\" or r._field==\"downstream_predicted_flow\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Flow", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "dashed" - } - }, - "decimals": 2, - "displayName": "pressure", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1500 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 22 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"downstream_measured_pressure\" or r._field==\"downstream_predicted_pressure\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Downstream pressure", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "dashed" - } - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "green", - "value": 0 - }, - { - "color": "orange", - "value": 0.4 - }, - { - "color": "red", - "value": 0.8 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 0, - "y": 27 - }, - "id": 29, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"effRelDistFromPeak\")", - "refId": "A" - } - ], - "title": "Relative distance from BEP", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "flowLongterNRMSD {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 7, - "x": 17, - "y": 27 - }, - "id": 18, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"flowLongterNRMSD\" or r._field==\"flowNrmse\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Predictive maintenance flow", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Flow / Power", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "downstream_predicted_efficiency {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 24, - "x": 0, - "y": 37 - }, - "id": 17, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"downstream_measured_efficiency\" or r._field==\"downstream_predicted_efficiency\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Efficiency", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 50 - }, - "id": 10, - "panels": [], - "title": "Machine control", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 10 - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "position {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 51 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.0.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"ctrl\" or r._field==\"moveTimeleft\" ))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Control", + "title": "Pressure (measured)", "type": "timeseries" } ], - "refresh": "10s", "schemaVersion": 39, - "tags": [], + "tags": ["EVOLV", "machine", "template"], "templating": { "list": [ { - "current": { - "selected": false, - "text": "influxdb", - "value": "influxdb" - }, - "hide": 0, - "includeAll": false, - "label": "dbase", - "multi": false, "name": "dbase", - "options": [ - { - "selected": true, - "text": "influxdb", - "value": "influxdb" - } - ], - "query": "influxdb", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 }, { - "current": { - "selected": false, - "text": "m1", - "value": "m1" - }, - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, "name": "measurement", - "options": [ - { - "selected": true, - "text": "m1", - "value": "m1" - } - ], - "query": "m1", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] }, { - "current": { - "selected": false, - "text": "lvl2", - "value": "lvl2" - }, - "hide": 0, - "includeAll": false, - "multi": false, "name": "bucket", - "options": [ - { - "selected": true, - "text": "lvl2", - "value": "lvl2" - } - ], + "type": "custom", "query": "lvl2", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] } ] }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h" - ] - }, - "timezone": "browser", - "title": "machineDashboard", - "uid": "", - "version": 40, - "weekStart": "" -} \ No newline at end of file + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/machineGroup.json b/config/machineGroup.json index 3a30e79..cb7a7bc 100644 --- a/config/machineGroup.json +++ b/config/machineGroup.json @@ -1,2609 +1,98 @@ { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0,255,255,1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": 22, - "links": [], - "panels": [ + "annotations": { + "list": [ { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1, - "panels": [], - "title": "Realtime Prio flow", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 150 - }, - { - "color": "red", - "value": 180 - } - ] - }, - "unit": "m3/h" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 25, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG1\" ) and ( r._field==\"downstream_predicted_flow\" ) )\n |> last()", - "refId": "A" - } - ], - "title": "Realtime flow", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "cost / h", - "binary": { - "left": "upstream_predicted_power {geoLocation=\"undefined\", id=\"eb9bc2362e755b9e\", model=\"undefined\", name=\"mG1\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "operator": "*", - "right": "0.25" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 100 - }, - { - "color": "red", - "value": 180 - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 4, - "y": 1 - }, - "id": 23, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG1\" ) and ( r._field==\"upstream_measured_power\" or r._field==\"upstream_predicted_power\" ) )\n |> last()", - "refId": "A" - } - ], - "title": "Realtime verbruik", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] - }, - "unit": "currencyEUR" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 2, - "x": 9, - "y": 1 - }, - "id": 39, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"mG1\" and r._field == \"upstream_predicted_power\")\n |> last()\n |> map(fn: (r) => ({ r with _value: r._value * 0.25 }))\n |> yield(name: \"multiplied_value\")", - "refId": "A" - } - ], - "title": "Realtime kost", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "cost / h", - "binary": { - "left": "upstream_predicted_power {geoLocation=\"undefined\", id=\"07ec60b7b7c17582\", model=\"undefined\", name=\"mG2\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "operator": "*", - "right": "0.25" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] - }, - "unit": "m3/kW" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 11, - "y": 1 - }, - "id": 44, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"mG1\" and r._field == \"downstream_predicted_efficiency\")\n |> last()\n |> map(fn: (r) => ({ r with _value: r._value}))\n |> yield(name: \"multiplied_value\")", - "refId": "A" - } - ], - "title": "Flow / Power", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "cost / h", - "binary": { - "left": "upstream_predicted_power {geoLocation=\"undefined\", id=\"07ec60b7b7c17582\", model=\"undefined\", name=\"mG2\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "operator": "*", - "right": "0.25" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 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": "blue", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 14, - "y": 1 - }, - "id": 27, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => \n r._measurement == \"mG1\" and \n r._field == \"upstream_predicted_power\"\n )\n |> group()\n |> window(every: $__interval, period: $__interval)\n |> mean(column: \"_value\")\n |> duplicate(column: \"_start\", as: \"_time\")\n |> drop(columns: [\"_start\", \"_stop\"])\n |> yield(name: \"rolling_average_predicted_power\")\n", - "refId": "A" - } - ], - "title": "Verbruik", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 21, - "y": 1 - }, - "id": 42, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG1\" ) and ( r._field==\"absDistFromPeak\" ) )\n |> last()\n", - "refId": "A" - } - ], - "title": "Distance from group BEP", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 8 - }, - "id": 34, - "panels": [], - "title": "Realtime Optimaal", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 150 - }, - { - "color": "red", - "value": 180 - } - ] - }, - "unit": "m3/h" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 9 - }, - "id": 37, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG2\" ) and ( r._field==\"downstream_predicted_flow\" ) )\n |> last()", - "refId": "A" - } - ], - "title": "Realtime flow", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "cost / h", - "binary": { - "left": "upstream_predicted_power {geoLocation=\"undefined\", id=\"eb9bc2362e755b9e\", model=\"undefined\", name=\"mG1\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "operator": "*", - "right": "0.25" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 100 - }, - { - "color": "red", - "value": 180 - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 4, - "y": 9 - }, - "id": 24, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG2\" ) and ( r._field==\"upstream_measured_power\" or r._field==\"upstream_predicted_power\" ) )\n |> last()", - "refId": "A" - } - ], - "title": "Realtime verbruik", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] - }, - "unit": "currencyEUR" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 2, - "x": 9, - "y": 9 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"mG2\" and r._field == \"upstream_predicted_power\")\n |> last()\n |> map(fn: (r) => ({ r with _value: r._value * 0.25 }))\n |> yield(name: \"multiplied_value\")", - "refId": "A" - } - ], - "title": "Realtime kost", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] - }, - "unit": "m3/kW" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 11, - "y": 9 - }, - "id": 45, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"mG2\" and r._field == \"downstream_predicted_efficiency\")\n |> last()\n |> map(fn: (r) => ({ r with _value: r._value}))\n |> yield(name: \"multiplied_value\")", - "refId": "A" - } - ], - "title": "Flow / Power", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "cost / h", - "binary": { - "left": "upstream_predicted_power {geoLocation=\"undefined\", id=\"07ec60b7b7c17582\", model=\"undefined\", name=\"mG2\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "operator": "*", - "right": "0.25" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 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": "blue", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 14, - "y": 9 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => \n r._measurement == \"mG2\" and \n r._field == \"upstream_predicted_power\"\n )\n |> group()\n |> window(every: $__interval, period: $__interval)\n |> mean(column: \"_value\")\n |> duplicate(column: \"_start\", as: \"_time\")\n |> drop(columns: [\"_start\", \"_stop\"])\n |> yield(name: \"rolling_average_predicted_power\")\n", - "refId": "A" - } - ], - "title": "Verbruik", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 21, - "y": 9 - }, - "id": 43, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG2\" ) and ( r._field==\"absDistFromPeak\" ) )\n |> last()\n", - "refId": "A" - } - ], - "title": "Distance from group BEP", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 35, - "panels": [], - "title": "Verschillen", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 150 - }, - { - "color": "red", - "value": 180 - } - ] - }, - "unit": "m3/h" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 17 - }, - "id": 38, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) =>\n (r._measurement == \"mG2\" or r._measurement == \"mG1\") and \n r._field == \"downstream_predicted_flow\"\n )\n |> last()\n // Add a constant key so that both records share the same pivot key\n |> map(fn: (r) => ({ r with pivotKey: \"last\" }))\n // Drop _time to ensure both records are combined in the pivot\n |> drop(columns: [\"_time\"])\n |> group(columns: [\"pivotKey\"])\n // Pivot using the constant key, so that both mG2 and mG1 values appear in one row\n |> pivot(rowKey: [\"pivotKey\"], columnKey: [\"_measurement\"], valueColumn: \"_value\")\n // Compute the difference: mG2 minus mG1\n |> map(fn: (r) => ({ r with diff: r.mG1 - r.mG2 }))\n |> keep(columns: [\"diff\"])\n |> yield(name: \"difference\")", - "refId": "A" - } - ], - "title": "Realtime flow verschil", - "transformations": [ - { - "id": "calculateField", - "options": { - "alias": "cost / h", - "binary": { - "left": "upstream_predicted_power {geoLocation=\"undefined\", id=\"eb9bc2362e755b9e\", model=\"undefined\", name=\"mG1\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "operator": "*", - "right": "0.25" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true - } - } - ], - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 300, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 100 - }, - { - "color": "red", - "value": 180 - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 4, - "y": 17 - }, - "id": 29, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) =>\n (r._measurement == \"mG2\" or r._measurement == \"mG1\") and \n r._field == \"upstream_predicted_power\"\n )\n |> last()\n // Add a constant key so that both records share the same pivot key\n |> map(fn: (r) => ({ r with pivotKey: \"last\" }))\n // Drop _time to ensure both records are combined in the pivot\n |> drop(columns: [\"_time\"])\n |> group(columns: [\"pivotKey\"])\n // Pivot using the constant key, so that both mG2 and mG1 values appear in one row\n |> pivot(rowKey: [\"pivotKey\"], columnKey: [\"_measurement\"], valueColumn: \"_value\")\n // Compute the difference: mG2 minus mG1\n |> map(fn: (r) => ({ r with diff: r.mG1 - r.mG2 }))\n |> keep(columns: [\"diff\"])\n |> yield(name: \"difference\")\n", - "refId": "A" - } - ], - "title": "Realtime power verschil", - "type": "gauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "red", - "value": 50 - } - ] - }, - "unit": "Euro (€) / h" - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "diff upstream_predicted_power" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 9, - "y": 17 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "mG1 = from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => r._measurement == \"mG1\" and r._field == \"upstream_predicted_power\")\n |> last()\n |> map(fn: (r) => ({\n _time: now(), // set a common timestamp\n joinKey: \"last\", // add a constant key for joining\n mG1_Cost: float(v: r._value) * 0.25\n }))\n\nmG2 = from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => r._measurement == \"mG2\" and r._field == \"upstream_predicted_power\")\n |> last()\n |> map(fn: (r) => ({\n _time: now(), // set the same common timestamp\n joinKey: \"last\", // add the constant key for joining\n mG2_Cost: float(v: r._value) * 0.25\n }))\n\njoin(\n tables: {mG1: mG1, mG2: mG2},\n on: [\"joinKey\"],\n method: \"inner\"\n)\n |> map(fn: (r) => ({\n _time: r._time,\n diff: r.mG1_Cost - r.mG2_Cost\n }))\n |> yield(name: \"diff\")", - "refId": "A" - } - ], - "title": "Realtime verschil", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Over een tijdsperiode van 1 uur het rollend gemiddelde in euro/h", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "Euro (€) / h" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 8, - "x": 14, - "y": 17 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^scaled_difference$/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "// Process mG1: Aggregate at 1m, compute moving average, and scale\nmG1 = from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => r._measurement == \"mG1\" and r._field == \"upstream_predicted_power\")\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n |> movingAverage(n: 60)\n |> map(fn: (r) => ({\n _time: r._time,\n mG1_scaled: float(v: r._value)\n }))\n\n// Process mG2: Same processing as mG1\nmG2 = from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => r._measurement == \"mG2\" and r._field == \"upstream_predicted_power\")\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n |> movingAverage(n: 60)\n |> map(fn: (r) => ({\n _time: r._time,\n mG2_scaled: float(v: r._value)\n }))\n\n// Join the two streams on _time and compute the cost difference\njoin(\n tables: {mG1: mG1, mG2: mG2},\n on: [\"_time\"],\n method: \"inner\"\n)\n |> map(fn: (r) => ({\n _time: r._time,\n // Assuming 0.25 Euro per kWh:\n scaled_difference: (r.mG1_scaled - r.mG2_scaled) * 0.25\n }))\n |> yield(name: \"scaled_rolling_difference\")", - "refId": "A" - } - ], - "title": "Rollend gemiddeld verschil / h", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Rollend gemiddelde kost / h", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "max": 16, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "Euro (€) / h" - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 9, - "x": 0, - "y": 24 - }, - "id": 31, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "text" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => \n r._measurement == \"mG1\" and \n r._field == \"upstream_predicted_power\"\n )\n // Aggregate raw data to 1-minute intervals.\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n // Compute a 60-point moving average (rolling average over the last 60 minutes).\n |> movingAverage(n: 60)\n // Re-aggregate to 1-minute intervals (adjust if you meant 6m for 10 points per hour)\n |> aggregateWindow(every: 1m, fn: last, createEmpty: false)\n // Multiply each value by 0.25\n |> map(fn: (r) => ({\n _time: r._time,\n _value: r._value * 0.25\n }))\n |> yield(name: \"mG1\")\n", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -90m, stop: now())\r\n |> filter(fn: (r) => \r\n r._measurement == \"mG2\" and \r\n r._field == \"upstream_predicted_power\"\r\n )\r\n // Aggregate raw data to 1-minute intervals.\r\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\r\n // Compute a 60-point moving average (rolling average over the last 60 minutes).\r\n |> movingAverage(n: 60)\r\n // Re-aggregate to 1-minute intervals (adjust if you meant 6m for 10 points per hour)\r\n |> aggregateWindow(every: 1m, fn: last, createEmpty: false)\r\n // Multiply each value by 0.25\r\n |> map(fn: (r) => ({\r\n _time: r._time,\r\n _value: r._value * 0.25\r\n }))\r\n |> yield(name: \"mG2\")\r\n", - "refId": "B" - } - ], - "title": "Kosten Rollend gemiddelde / h", - "type": "bargauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Over een tijdsperiode van 1 uur het rollend gemiddelde in kWh", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 9, - "y": 24 - }, - "id": 41, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => \n r._measurement == \"mG1\" and \n r._field == \"upstream_predicted_power\"\n )\n // Aggregate raw data to 1-minute intervals.\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n // Compute a 60-point moving average (rolling average over the last 60 minutes).\n |> movingAverage(n: 60)\n // Re-aggregate to 6-minute intervals to consistently yield 60 data points per hour.\n |> aggregateWindow(every: 1m, fn: last, createEmpty: false)\n |> yield(name: \"rolling_average\")\n", - "refId": "A" - } - ], - "title": "mG1 Rollend gemiddeld verschil / kWh", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Het rollend gemiddelde * 8766 uur", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 20, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - }, - "unit": "currencyEUR" - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 6, - "x": 16, - "y": 24 - }, - "id": 33, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^scaled_difference$/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "// Process mG1: Filter, aggregate, compute moving average, and scale\nmG1 = from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => r._measurement == \"mG1\" and r._field == \"upstream_predicted_power\")\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n |> movingAverage(n: 60)\n |> map(fn: (r) => ({\n _time: r._time,\n mG1_scaled: float(v: r._value) * 8766.0\n }))\n\n// Process mG2: Filter, aggregate, compute moving average, and scale\nmG2 = from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => r._measurement == \"mG2\" and r._field == \"upstream_predicted_power\")\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n |> movingAverage(n: 60)\n |> map(fn: (r) => ({\n _time: r._time,\n mG2_scaled: float(v: r._value) * 8766.0\n }))\n\n// Join the two streams on _time and compute the difference\njoin(\n tables: {mG1: mG1, mG2: mG2},\n on: [\"_time\"],\n method: \"inner\"\n)\n |> map(fn: (r) => ({\n _time: r._time,\n scaled_difference: ( r.mG1_scaled - r.mG2_scaled ) * 0.25\n }))\n |> yield(name: \"scaled_rolling_difference\")\n\n\n\n\n\n", - "refId": "A" - } - ], - "title": "Projectie over 1 jaar", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Over een tijdsperiode van 1 uur het rollend gemiddelde in kWh", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 9, - "y": 31 - }, - "id": 40, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "vertical", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -90m, stop: now())\n |> filter(fn: (r) => \n r._measurement == \"mG2\" and \n r._field == \"upstream_predicted_power\"\n )\n // Aggregate raw data to 1-minute intervals.\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: false)\n // Compute a 60-point moving average (rolling average over the last 60 minutes).\n |> movingAverage(n: 60)\n // Re-aggregate to 6-minute intervals to consistently yield 60 data points per hour.\n |> aggregateWindow(every: 1m, fn: last, createEmpty: false)\n |> yield(name: \"rolling_average\")\n\n", - "refId": "A" - } - ], - "title": "MG2 Rollend gemiddeld verschil / kWh", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, - "id": 5, - "panels": [], - "title": "Measurements", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Flow / Power", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 24, - "x": 0, - "y": 39 - }, - "id": 17, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG1\" or r._measurement==\"mG2\" ) and ( r._field==\"downstream_measured_efficiency\" or r._field==\"downstream_predicted_efficiency\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Efficiency", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "diff {_field=\"upstream_predicted_power\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "custom.drawStyle", - "value": "points" - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 52 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG1\" or r._measurement==\"mG2\" ) and ( r._field==\"upstream_measured_power\" or r._field==\"upstream_predicted_power\" ) )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "mg1 = from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => \r\n r._measurement == \"mG1\" and \r\n (r._field == \"upstream_measured_power\" or r._field == \"upstream_predicted_power\")\r\n )\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)\r\n\r\nmg2 = from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => \r\n r._measurement == \"mG2\" and \r\n (r._field == \"upstream_measured_power\" or r._field == \"upstream_predicted_power\")\r\n )\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)\r\n\r\njoin(\r\n tables: {mg1: mg1, mg2: mg2},\r\n on: [\"_time\", \"_field\"],\r\n method: \"inner\"\r\n)\r\n|> map(fn: (r) => ({\r\n _time: r._time,\r\n _field: r._field,\r\n diff: r._value_mg1 - r._value_mg2\r\n}))", - "refId": "B" - } - ], - "title": "machineGroup power comparison", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 64 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"mG1\" or r._measurement==\"mG2\" ) and (r._field==\"downstream_predicted_flow\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Flow", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 75 - }, - "id": 10, - "panels": [], - "title": "Machine control", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 10 - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "m1 ctrl {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "m2 ctrl {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"f8a5f0524be2a754\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m2\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "m3 ctrl {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b7cee587e61eeef4\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m3\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "m1 ctrl {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 76 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.0.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) =>\n r._field == \"ctrl\" and \n (r._measurement == \"m1\" or \n r._measurement == \"m2\" or \n r._measurement == \"m3\" or \n r._measurement == \"m4\" or \n r._measurement == \"m5\" or \n r._measurement == \"m6\")\n )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "", - "refId": "B" - } - ], - "title": "Control", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 10 - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 12, - "x": 0, - "y": 87 - }, - "id": 18, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.0.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"m1\" or r._measurement==\"m2\" or r._measurement==\"m3\" or r._measurement==\"mG1\" ) and ( r._field==\"downstream_predicted_flow\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "mG1 flow", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 10 - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 12, - "x": 12, - "y": 87 - }, - "id": 20, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.0.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"m4\" or r._measurement==\"m5\" or r._measurement==\"m6\" or r._measurement==\"mG2\" ) and (r._field==\"downstream_predicted_flow\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "mG2 flow", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 10 - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "mG2 downstream_predicted_flow {geoLocation=\"undefined\", id=\"07ec60b7b7c17582\", model=\"undefined\", name=\"mG2\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}", - "mG1 downstream_predicted_flow {geoLocation=\"undefined\", id=\"eb9bc2362e755b9e\", model=\"undefined\", name=\"mG1\", role=\"GroupController\", softwareType=\"machineGroup\", subType=\"undefined\", supplier=\"undefined\", type=\"undefined\", unit=\"undefined\", uuid=\"undefined\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 99 - }, - "id": 21, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.0.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => ( r._measurement==\"m1\" or r._measurement==\"m2\" or r._measurement==\"m3\" or r._measurement==\"mG1\" ) and (r._field==\"downstream_predicted_flow\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn:(r) => ( r._measurement==\"m4\" or r._measurement==\"m5\" or r._measurement==\"m6\" or r._measurement==\"mG2\" ) and (r._field==\"downstream_predicted_flow\") )\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "B" - } - ], - "title": "mG1 and mG2 Flow", - "type": "timeseries" + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" } - ], - "refresh": "10s", - "schemaVersion": 39, - "tags": [], - "templating": { - "list": [ + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Realtime Machine Group", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 8, "x": 0, "y": 1 }, + "id": 2, + "targets": [ { - "current": { - "selected": false, - "text": "influxdb", - "value": "influxdb" - }, - "hide": 0, - "includeAll": false, - "label": "dbase", - "multi": false, - "name": "dbase", - "options": [ - { - "selected": true, - "text": "influxdb", - "value": "influxdb" - } - ], - "query": "influxdb", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": true, - "text": "> mG1", - "value": "mG1" - }, - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, - "name": "measurement", - "options": [ - { - "selected": false, - "text": "template", - "value": "template" - } - ], - "query": "template", - "queryValue": "mG1", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": true, - "text": "> lvl2", - "value": "lvl2" - }, - "hide": 0, - "includeAll": false, - "multi": false, - "name": "bucket", - "options": [ - { - "selected": false, - "text": "template", - "value": "template" - } - ], - "query": "template", - "queryValue": "lvl2", - "skipUrlSync": false, - "type": "custom" + "query": "from(bucket: \"${bucket}\")\n |> range(start: -7d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"mode\" or r._field==\"scaling\"))\n |> last()", + "refId": "A" } - ] + ], + "title": "Mode / Scaling (last)", + "type": "stat" }, - "time": { - "from": "now-30m", - "to": "now" + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 8, "x": 8, "y": 1 }, + "id": 3, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: -7d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"NCog\" or r._field==\"absDistFromPeak\" or r._field==\"relDistFromPeak\"))\n |> last()", + "refId": "A" + } + ], + "title": "Efficiency KPIs (last)", + "type": "stat" }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h" - ] - }, - "timezone": "browser", - "title": "MultipleMachineGroups", - "uid": "eefi4duhkar5sd", - "version": 94, - "weekStart": "" - } \ No newline at end of file + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 6 }, + "id": 4, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"downstream_predicted_flow\" or r._field==\"downstream_predicted_power\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Totals (flow / power)", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "machineGroup", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/measurement.json b/config/measurement.json index c565bad..7987a3f 100644 --- a/config/measurement.json +++ b/config/measurement.json @@ -3,971 +3,90 @@ "list": [ { "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, - "iconColor": "rgba(0,255,255,1)", + "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, - "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 14, + "id": null, "links": [], "panels": [ { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, - "panels": [], - "title": "Machine Overview", + "title": "Realtime Sensor", "type": "row" }, { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 1 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 16, "x": 0, "y": 1 }, "id": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 2, - "showHeader": false - }, - "pluginVersion": "11.2.0", + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"state\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"mAbs\" or r._field==\"mPercent\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", "refId": "A" } ], - "title": "Machine State", - "type": "table" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 1 - }, - "id": 4, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": false - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: -1y) // Adjust time range as needed\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"mode\")\n |> sort(columns: [\"_time\"], desc: true)\n |> limit(n: 1)", - "refId": "A" - } - ], - "title": "Machine Mode", - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 5 - }, - "id": 5, - "panels": [], - "title": "Measurements", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "displayName": "pressure", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"upstream_measured_pressure\" or r._field==\"upstream_predicted_pressure\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Upstream pressure", + "title": "Measured Value (mAbs / mPercent)", "type": "timeseries" }, { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 5, - "x": 6, - "y": 6 - }, - "id": 15, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 1 }, + "id": 3, + "options": { "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } }, "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"differential_measured_pressure\" )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", + "query": "from(bucket: \"${bucket}\")\n |> range(start: -7d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"mAbs\")\n |> last()", "refId": "A" } ], - "title": "Differential pressure", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 6, - "x": 11, - "y": 6 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"upstream_measured_power\" or r._field==\"upstream_predicted_power\" ) )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Power", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 7, - "x": 17, - "y": 6 - }, - "id": 14, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"downstream_measured_flow\" or r._field==\"downstream_predicted_flow\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Flow", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "dashed" - } - }, - "decimals": 2, - "displayName": "pressure", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1500 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 6, - "x": 0, - "y": 11 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"downstream_measured_pressure\" or r._field==\"downstream_predicted_pressure\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Downstream pressure", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Flow / Power", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 17, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and ( r._field==\"downstream_measured_efficiency\" or r._field==\"downstream_predicted_efficiency\") )\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Efficiency", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 29 - }, - "id": 10, - "panels": [], - "title": "Machine control", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 10 - }, - { - "color": "#EAB839", - "value": 20 - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "position {geoLocation_x=\"0\", geoLocation_y=\"0\", geoLocation_z=\"0\", id=\"b1226bbc99239bc5\", model=\"H05K-S03R+HGM1X-X280KO\", name=\"m1\", role=\"RotationalDeviceController\", softwareType=\"machine\", subType=\"centrifugal pumps\", supplier=\"hydrostal\", type=\"generic\", unit=\"m3/h\", uuid=\"null\"}" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 30 - }, - "id": 13, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.0.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and r._field==\"ctrl\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - } - ], - "title": "Control", - "type": "timeseries" + "title": "mAbs (last)", + "type": "stat" } ], - "refresh": "10s", "schemaVersion": 39, - "tags": [], + "tags": ["EVOLV", "measurement", "template"], "templating": { "list": [ { - "current": { - "selected": false, - "text": "influxdb", - "value": "influxdb" - }, - "hide": 0, - "includeAll": false, - "label": "dbase", - "multi": false, "name": "dbase", - "options": [ - { - "selected": true, - "text": "influxdb", - "value": "influxdb" - } - ], - "query": "influxdb", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 }, { - "current": { - "selected": false, - "text": "template", - "value": "template" - }, - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, "name": "measurement", - "options": [ - { - "selected": true, - "text": "template", - "value": "template" - } - ], + "type": "custom", "query": "template", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] }, { - "current": { - "selected": false, - "text": "template", - "value": "template" - }, - "hide": 0, - "includeAll": false, - "multi": false, "name": "bucket", - "options": [ - { - "selected": true, - "text": "template", - "value": "template" - } - ], - "query": "template", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] } ] }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h" - ] - }, - "timezone": "browser", + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", "title": "template", - "uid": "test", - "version": 8, - "weekStart": "" -} \ No newline at end of file + "uid": null, + "version": 1 +} + diff --git a/config/monster.json b/config/monster.json index af7b620..4df423e 100644 --- a/config/monster.json +++ b/config/monster.json @@ -3,10 +3,7 @@ "list": [ { "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -16,2667 +13,73 @@ ] }, "editable": true, - "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 4, + "id": null, "links": [], "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Realtime Sampling (Monster)", "type": "row" }, { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 8, "x": 0, "y": 1 }, "id": 2, - "panels": [], - "title": "Realtime values", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#818c99", - "value": null - } - ] - }, - "unit": "dateTimeAsSystem" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 20, - "x": 0, - "y": 1 - }, - "id": 37, - "options": { - "colorMode": "background_solid", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^nextDate \\{aquon_name=\"112100\", location=\"rwzi_dongemond\"\\}$/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"nextDate\" )\r\n |> last()", + "query": "from(bucket: \"${bucket}\")\n |> range(start: -30d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"running\" or r._field==\"pulse\"))\n |> last()", "refId": "A" } ], - "title": "Next sample", + "title": "Running / Pulse (last)", "type": "stat" }, { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#282e44", - "mode": "fixed" - }, - "mappings": [ - { - "options": { - "false": { - "color": "#552d2d", - "index": 0, - "text": "False" - }, - "true": { - "color": "#336533", - "index": 1, - "text": "True" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#818c99", - "value": null - } - ] - }, - "unit": "bool" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 20, - "x": 0, - "y": 5 - }, - "id": 6, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/.*/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -30d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"running\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Sampling active", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#818c99", - "value": null - } - ] - }, - "unit": "days" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 0, - "y": 9 - }, - "id": 8, - "options": { - "colorMode": "background_solid", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"daysPerYear\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Sampling days left", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#818c99", - "value": null - } - ] - }, - "unit": "dateTimeFromNow" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 5, - "y": 9 - }, - "id": 9, - "options": { - "colorMode": "background_solid", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "/^nextDate \\{aquon_name=\"112100\", location=\"rwzi_dongemond\"\\}$/", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"nextDate\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Timeleft before next sample", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#818c99", - "value": null - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 10, - "y": 9 - }, - "id": 10, - "options": { - "colorMode": "background_solid", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"timePassed\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Running time", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#818c99", - "value": null - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 5, - "x": 15, - "y": 9 - }, - "id": 11, - "options": { - "colorMode": "background_solid", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"timeLeft\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Time left", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "max": 19.7, - "min": 5, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "litre" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 0, - "y": 14 - }, - "id": 4, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"bucketVol\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Current bucket volume", - "transparent": true, - "type": "bargauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "max": 25, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "lengthmm" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 10, - "y": 14 - }, - "id": 13, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"sumRainNeg24\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Summed Actual -24h rain", - "transparent": true, - "type": "bargauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "max": 23, - "min": 5, - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "masskg" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 0, - "y": 17 - }, - "id": 30, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"bucketWeight\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Total weight", - "transparent": true, - "type": "bargauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "max": 25, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "lengthmm" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 10, - "y": 17 - }, - "id": 12, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 16, - "minVizWidth": 8, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"sumRainPos24\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Summed Predicted +24h rain", - "transparent": true, - "type": "bargauge" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 15, - "x": 0, - "y": 20 - }, - "id": 19, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"sumPuls\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Actual number of pulses", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 5, - "x": 15, - "y": 20 - }, - "id": 1, - "options": { - "colorMode": "background_solid", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"m3PerPuls\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "m3/puls", - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 0, - "y": 26 - }, - "id": 21, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"minPuls\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Minimum number of pulses", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#4f6483", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 5, - "y": 26 - }, - "id": 20, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"targetPuls\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Target number of pulses", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 10, - "y": 26 - }, - "id": 22, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"maxPuls\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Maximum number of pulses", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 0, - "y": 32 - }, - "id": 27, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"minVolume\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Minimum volume", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#4f6483", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 5, - "y": 32 - }, - "id": 28, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"targetVolume\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Target Volume", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Taking into account the own weight of the bucket", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 10, - "y": 32 - }, - "id": 29, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"maxVolume\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Maximum volume", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 15, - "y": 32 - }, - "id": 31, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -1y)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"emptyWeightBucket\" )\r\n |> last()", - "refId": "A" - } - ], - "title": "Weight of bucket", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 38 - }, + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 9, "w": 16, "x": 8, "y": 1 }, "id": 3, - "panels": [], - "title": "Historic values", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "fillOpacity": 80, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-yellow" - }, - { - "color": "semi-dark-green", - "value": 5 - }, - { - "color": "semi-dark-red", - "value": 15 - } - ] - }, - "unit": "litre" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 39 - }, - "id": 5, - "options": { - "barRadius": 0, - "barWidth": 0.9, - "fullHighlight": true, - "groupWidth": 0.7, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "always", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 90, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "11.2.0", + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "targets": [ { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"bucketVol\" )\r\n |> sample(n:5)", + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"bucketVol\" or r._field==\"sumPuls\" or r._field==\"q\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", "refId": "A" } ], - "title": "Historical bucket volume", - "type": "barchart" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "dashed" - } - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "flowcms" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 39 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"qm3sec\" )\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "lastValue = from(bucket: \"monster\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"Monsternamekast1\" and r._field == \"predM3PerSec\")\r\n |> last()\r\n |> findRecord(fn: (key) => true, idx: 0) // Get the last record\r\n\r\nfrom(bucket: \"monster\")\r\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"Monsternamekast1\" and r._field == \"predM3PerSec\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true) // Create regular time windows\r\n |> map(fn: (r) => ({\r\n _time: r._time,\r\n predM3PerSec: lastValue._value\r\n }))", - "refId": "B" - } - ], - "title": "Actual and predicted m3/s", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 1.5, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 48 - }, - "id": 32, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "right", - "showLegend": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"qm3sec\" )\r\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: true) // Optional: aggregate to 1 minute intervals first\r\n |> movingAverage(n: 60)\r\n |> sample(n:10)", - "refId": "A" - } - ], - "title": "m3/s moving average / h", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 1.5, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 48 - }, - "id": 35, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "right", - "showLegend": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"qm3sec\" )\r\n |> aggregateWindow(every: 1m, fn: mean, createEmpty: true)\r\n |> movingAverage(n: 180)\r\n |> sample(n:10)\r\n", - "refId": "A" - } - ], - "title": "m3/s moving average / 3h", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "fillOpacity": 87, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "fieldMinMax": false, - "mappings": [], - "max": 20, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "lengthmm" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "predFlow {aquon_name=\"112100\", location=\"rwzi_dongemond\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "m3" - }, - { - "id": "max", - "value": 130000 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "qm3sec {aquon_name=\"112100\", location=\"rwzi_dongemond\"}" - }, - "properties": [ - { - "id": "custom.axisPlacement", - "value": "right" - }, - { - "id": "unit", - "value": "m3" - }, - { - "id": "max" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 57 - }, - "id": 16, - "options": { - "barRadius": 0, - "barWidth": 1, - "fullHighlight": true, - "groupWidth": 0.72, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"sumRainPos24\" or r._measurement == \"${measurement}\"and r._field == \"sumRainNeg24\" )", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"predFlow\")", - "refId": "B" - } - ], - "title": "Rain -+24h", - "transparent": true, - "type": "barchart" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 1.5, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 57 - }, - "id": 33, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "right", - "showLegend": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"qm3sec\" )\r\n |> aggregateWindow(every: 1h, fn: mean, createEmpty: true) \r\n |> movingAverage(n: 24)", - "refId": "A" - } - ], - "title": "m3/s moving average / day", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 130000, - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "m3" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 66 - }, - "id": 14, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"m3Total\" )\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "A" - }, - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "from(bucket: \"monster\")\r\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"Monsternamekast1\" and r._field == \"predFlow\")", - "refId": "B" - } - ], - "title": "Predicted m3 total vs accumalated m3", - "transparent": true, - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "fillOpacity": 80, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 66 - }, - "id": 34, - "options": { - "barRadius": 0.05, - "barWidth": 1, - "fullHighlight": true, - "groupWidth": 0.7, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field ==\"m3Total\")\r\n |> timeShift(duration: -6h) \r\n |> window(every: 24h) \r\n |> last() \r\n |> filter(fn: (r) => r._value != 0)\r\n |> timeShift(duration: 6h) ", - "refId": "B" - } - ], - "title": "total m3 per day", - "type": "barchart" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 75 - }, - "id": 23, - "panels": [], - "title": "Past values", - "type": "row" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Before ending the cycle what was last known value.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "litre" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 0, - "y": 76 - }, - "id": 26, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"bucketVol\" )\r\n |> filter(fn: (r) => r._value > 0)\r\n |> last()", - "refId": "A" - } - ], - "title": "Last known bucket volume", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Before ending the cycle what was last known value.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 5, - "y": 76 - }, - "id": 36, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"m3PerPuls\" )\r\n |> filter(fn: (r) => r._value > 0)\r\n |> last()", - "refId": "A" - } - ], - "title": "Last known total m3/pulse", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Before ending the cycle what was last known value.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "m3" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 10, - "y": 76 - }, - "id": 25, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"m3Total\" )\r\n |> filter(fn: (r) => r._value > 0)\r\n |> last()", - "refId": "A" - } - ], - "title": "Last known total m3", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "Before ending the cycle what was last known value.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "#2b3146", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "m3" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 5, - "x": 15, - "y": 76 - }, - "id": 24, - "options": { - "colorMode": "background_solid", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: -60d)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"predFlow\" )\r\n |> filter(fn: (r) => r._value > 0)\r\n |> last()", - "refId": "A" - } - ], - "title": "Last known predicted flow over 24h", - "type": "stat" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 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" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 82 - }, - "id": 39, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "hide": false, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field ==\"m3Total\")\r\n\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: true)", - "refId": "B" - } - ], - "title": "total m3 per day", - "type": "timeseries" - }, - { - "datasource": { - "default": true, - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": 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" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 91 - }, - "id": 18, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.2.0", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cdzg44tv250jkd" - }, - "query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r._measurement == \"${measurement}\" and r._field == \"precipationRaw\" )\r\n |> filter(fn: (r) => r.latitude == 51.592 and r.longitude == 4.93)", - "refId": "A" - } - ], - "title": "Predicted m3 total vs accumalated m3", - "transparent": true, + "title": "Bucket / Pulses / Flow (q)", "type": "timeseries" } ], - "refresh": "30s", "schemaVersion": 39, - "tags": [], + "tags": ["EVOLV", "monster", "template"], "templating": { "list": [ { - "current": { - "selected": false, - "text": "influxdb", - "value": "influxdb" - }, - "hide": 0, - "includeAll": false, - "label": "dbase", - "multi": false, "name": "dbase", - "options": [ - { - "selected": true, - "text": "influxdb", - "value": "influxdb" - } - ], - "query": "influxdb", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 }, { - "current": { - "selected": false, - "text": "Monsternamekast1", - "value": "Monsternamekast1" - }, - "hide": 0, - "includeAll": false, - "label": "", - "multi": false, "name": "measurement", - "options": [ - { - "selected": true, - "text": "Monsternamekast1", - "value": "Monsternamekast1" - } - ], - "query": "Monsternamekast1", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] }, { - "current": { - "selected": false, - "text": "monster", - "value": "monster" - }, - "hide": 0, - "includeAll": false, - "multi": false, "name": "bucket", - "options": [ - { - "selected": true, - "text": "monster", - "value": "monster" - } - ], - "query": "monster", - "skipUrlSync": false, - "type": "custom" + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] } ] }, - "time": { - "from": "now-7d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d", - "2d", - "3d", - "4d", - "5d", - "6d", - "7d" - ] - }, - "timezone": "browser", - "title": "Monster", - "uid": "fdzjc5mslrpq8d", - "version": 139, - "weekStart": "" -} \ No newline at end of file + "time": { "from": "now-24h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/pumpingStation.json b/config/pumpingStation.json new file mode 100644 index 0000000..d53a801 --- /dev/null +++ b/config/pumpingStation.json @@ -0,0 +1,85 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Realtime Pumping Station", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 8, "x": 0, "y": 1 }, + "id": 2, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: -7d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"direction\" or r._field==\"flowSource\" or r._field==\"timeleft\"))\n |> last()", + "refId": "A" + } + ], + "title": "Direction / Source / Timeleft (last)", + "type": "stat" + }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 9, "w": 16, "x": 8, "y": 1 }, + "id": 3, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"level.measured.atequipment\" or r._field==\"level.predicted.atequipment\" or r._field==\"volume.predicted.atequipment\" or r._field==\"netFlowRate.predicted.atequipment\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Level / Volume / Net Flow", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "pumpingStation", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/reactor.json b/config/reactor.json new file mode 100644 index 0000000..06835c0 --- /dev/null +++ b/config/reactor.json @@ -0,0 +1,71 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Reactor (Simulation/Process)", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 1 }, + "id": 2, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\")\n |> filter(fn:(r) => r._field =~ /^(F|S_O|S_NH|S_NO|temperature)/)\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Core Process Signals (if logged)", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "reactor", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/settler.json b/config/settler.json new file mode 100644 index 0000000..61f8064 --- /dev/null +++ b/config/settler.json @@ -0,0 +1,71 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Settler (Simulation/Process)", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 1 }, + "id": 2, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\")\n |> filter(fn:(r) => r._field =~ /^(F_in|F_eff|F_so|F_sr|C_TS)/)\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Flows / Solids (if logged)", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "settler", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/valve.json b/config/valve.json new file mode 100644 index 0000000..b78a808 --- /dev/null +++ b/config/valve.json @@ -0,0 +1,85 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Realtime Valve", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 8, "x": 0, "y": 1 }, + "id": 2, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: -30d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"state\" or r._field==\"mode\" or r._field==\"percentageOpen\"))\n |> last()", + "refId": "A" + } + ], + "title": "State / Mode / %Open (last)", + "type": "stat" + }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 9, "w": 16, "x": 8, "y": 1 }, + "id": 3, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"downstream_predicted_flow\" or r._field==\"downstream_measured_flow\" or r._field==\"delta_predicted_pressure\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Flow + ΔP", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "valve", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/config/valveGroupControl.json b/config/valveGroupControl.json new file mode 100644 index 0000000..acc1e8e --- /dev/null +++ b/config/valveGroupControl.json @@ -0,0 +1,85 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 1, "title": "Realtime Valve Group", "type": "row" }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "gridPos": { "h": 5, "w": 8, "x": 0, "y": 1 }, + "id": 2, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: -30d)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"mode\" or r._field==\"maxDeltaP\"))\n |> last()", + "refId": "A" + } + ], + "title": "Mode / maxΔP (last)", + "type": "stat" + }, + { + "datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" }, + "fieldConfig": { "defaults": { "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 9, "w": 16, "x": 8, "y": 1 }, + "id": 3, + "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, + "targets": [ + { + "query": "from(bucket: \"${bucket}\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn:(r) => r._measurement==\"${measurement}\" and (r._field==\"atequipment_measured_flow\" or r._field==\"atequipment_predicted_flow\" or r._field==\"maxDeltaP\"))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)", + "refId": "A" + } + ], + "title": "Flow + maxΔP", + "type": "timeseries" + } + ], + "schemaVersion": 39, + "tags": ["EVOLV", "valveGroupControl", "template"], + "templating": { + "list": [ + { + "name": "dbase", + "type": "custom", + "label": "dbase", + "query": "cdzg44tv250jkd", + "current": { "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": false }, + "options": [{ "text": "cdzg44tv250jkd", "value": "cdzg44tv250jkd", "selected": true }], + "hide": 2 + }, + { + "name": "measurement", + "type": "custom", + "query": "template", + "current": { "text": "template", "value": "template", "selected": false }, + "options": [{ "text": "template", "value": "template", "selected": true }] + }, + { + "name": "bucket", + "type": "custom", + "query": "lvl2", + "current": { "text": "lvl2", "value": "lvl2", "selected": false }, + "options": [{ "text": "lvl2", "value": "lvl2", "selected": true }] + } + ] + }, + "time": { "from": "now-6h", "to": "now" }, + "timezone": "", + "title": "template", + "uid": null, + "version": 1 +} + diff --git a/dashboardapi.html b/dashboardapi.html index dcdebc8..539c58e 100644 --- a/dashboardapi.html +++ b/dashboardapi.html @@ -1,134 +1,88 @@ - + - //import * as menuUtils from "/generalfunctions/helper/menuUtils.js"; + \ No newline at end of file + diff --git a/dashboardapi.js b/dashboardapi.js index e10747a..06d71cd 100644 --- a/dashboardapi.js +++ b/dashboardapi.js @@ -1,108 +1,41 @@ +const fs = require('node:fs'); +const path = require('node:path'); + +const nameOfNode = 'dashboardapi'; +const nodeClass = require('./src/nodeClass.js'); +const { MenuManager } = require('generalFunctions'); + module.exports = function (RED) { - function dashboardapi(config) { - // create node + RED.nodes.registerType(nameOfNode, function (config) { RED.nodes.createNode(this, config); + this.nodeClass = new nodeClass(config, RED, this, nameOfNode); + }); - //call this => node so whenver you want to call a node function type node and the function behind it - var node = this; + const menuMgr = new MenuManager(); + RED.httpAdmin.get(`/${nameOfNode}/menu.js`, (req, res) => { try { - //fetch obj - const Dashboardapi = require("./dependencies/dashboardapi/dashboardapi_class"); - - //load user defined config in the node-red UI - const dConfig = { - general: { - name: config.name, - id: node.id, - logging: { - logLevel: config.logLevel, - enabled: config.enableLog, - }, - }, - grafanaConnector: { - host: config.host, - port: config.port, - bearerToken: config.bearerToken, - }, - }; - - //make new measurement on creation to work with. - const d = new Dashboardapi(dConfig); - - // put m on node memory as source - node.source = d; - - function updateNodeStatus(val) { - if (val && val.grafanaResponse) { - // Check for a successful response from the Grafana API call - if (val.grafanaResponse.status === 200) { - node.status({ - fill: "green", - shape: "dot", - text: "Grafana API: Success", - }); - node.log("Grafana API call completed successfully."); - } else { - node.status({ - fill: "red", - shape: "ring", - text: "Grafana API: Error", - }); - node.error( - "Grafana API call failed with status: " + - val.grafanaResponse.status - ); - } - } - } - - //-------------------------------------------------------------------->>what to do on input - node.on("input", async function (msg, send, done) { - try { - switch(msg.topic) { - //on start make dashboard - case 'registerChild': - - const childId = msg.payload; - const childObj = RED.nodes.getNode(childId); - if (!childObj || !childObj.source) { - throw new Error("Missing or invalid child node"); - } - const child = childObj.source; - - msg.payload = await d.generateDashB(child.config); - - msg.topic = "create"; - msg.headers = { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - 'Authorization': 'Bearer glsa_gI7fOMEd844p1gZt9iaDeEFpeYtejRj7_cf1c41f8'// + config.bearerToken - }; - - console.log(`Child registered: ${childId}`); - send(msg); - - break; - } - - done(); - } catch (err) { - node.status({ fill: "red", shape: "ring", text: "Bad request data" }); - node.error("Bad request data: " + err.message, msg); - done(err); - } - }); - - // tidy up any async code here - shutdown connections and so on. - node.on("close", function () { - - }); - - } catch (e) { - console.log(e); + const script = menuMgr.createEndpoint(nameOfNode, ['logger']); + res.type('application/javascript').send(script); + } catch (err) { + res.status(500).send(`// Error generating menu: ${err.message}`); } - } + }); - RED.nodes.registerType("dashboardapi", dashboardapi); + // Provide config metadata for the editor (local, no dependency on generalFunctions configs). + RED.httpAdmin.get(`/${nameOfNode}/configData.js`, (req, res) => { + try { + const configPath = path.join(__dirname, 'dependencies', 'dashboardapi', 'dashboardapiConfig.json'); + const json = JSON.parse(fs.readFileSync(configPath, 'utf8')); + const script = ` + window.EVOLV = window.EVOLV || {}; + window.EVOLV.nodes = window.EVOLV.nodes || {}; + window.EVOLV.nodes.${nameOfNode} = window.EVOLV.nodes.${nameOfNode} || {}; + window.EVOLV.nodes.${nameOfNode}.config = ${JSON.stringify(json, null, 2)}; + `; + res.type('application/javascript').send(script); + } catch (err) { + res.status(500).send(`// Error generating configData: ${err.message}`); + } + }); }; diff --git a/package.json b/package.json new file mode 100644 index 0000000..b914aab --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "dashboardAPI", + "version": "1.0.0", + "description": "EVOLV Grafana dashboard generator (Node-RED node).", + "main": "dashboardapi.js", + "scripts": { + "test": "node --test test/*.test.js" + }, + "keywords": [ + "dashboard", + "grafana", + "node-red", + "EVOLV" + ], + "author": "EVOLV", + "license": "SEE LICENSE", + "dependencies": { + "generalFunctions": "git+https://gitea.centraal.wbd-rd.nl/RnD/generalFunctions.git" + }, + "node-red": { + "nodes": { + "dashboardapi": "dashboardapi.js" + } + } +} + diff --git a/src/nodeClass.js b/src/nodeClass.js new file mode 100644 index 0000000..2b6c648 --- /dev/null +++ b/src/nodeClass.js @@ -0,0 +1,103 @@ +const { outputUtils } = require('generalFunctions'); +const Specific = require('./specificClass'); + +class nodeClass { + constructor(uiConfig, RED, nodeInstance, nameOfNode) { + this.node = nodeInstance; + this.RED = RED; + this.name = nameOfNode; + this.source = null; + this.config = null; + + this._loadConfig(uiConfig); + this._setupSpecificClass(); + this._attachInputHandler(); + this._attachCloseHandler(); + } + + _loadConfig(uiConfig) { + this.config = { + general: { + name: uiConfig.name || this.name, + logging: { + enabled: uiConfig.enableLog, + logLevel: uiConfig.logLevel || 'info', + }, + }, + grafanaConnector: { + protocol: uiConfig.protocol || 'http', + host: uiConfig.host || 'localhost', + port: Number(uiConfig.port || 3000), + bearerToken: uiConfig.bearerToken || '', + }, + }; + + this._output = new outputUtils(); + } + + _setupSpecificClass() { + this.source = new Specific(this.config); + this.node.source = this.source; + } + + _attachInputHandler() { + this.node.on('input', async (msg, send, done) => { + try { + if (msg.topic !== 'registerChild') { + done(); + return; + } + + const childId = msg.payload; + const childObj = this.RED.nodes.getNode(childId); + const childSource = childObj?.source; + if (!childSource?.config) { + throw new Error(`Missing child source/config for id=${childId}`); + } + + const dashboards = this.source.generateDashboardsForGraph(childSource, { + includeChildren: Boolean(msg.includeChildren ?? true), + }); + + const url = this.source.grafanaUpsertUrl(); + const headers = { + Accept: 'application/json', + 'Content-Type': 'application/json', + }; + if (this.config.grafanaConnector.bearerToken) { + headers.Authorization = `Bearer ${this.config.grafanaConnector.bearerToken}`; + } + + for (const dash of dashboards) { + const payload = this.source.buildUpsertRequest({ dashboard: dash.dashboard, folderId: 0, overwrite: true }); + send({ + topic: 'grafana.dashboard.upsert', + url, + method: 'POST', + headers, + payload, + meta: { + nodeId: dash.nodeId, + softwareType: dash.softwareType, + uid: dash.uid, + title: dash.title, + }, + }); + } + + done(); + } catch (error) { + this.node.status({ fill: 'red', shape: 'ring', text: 'dashboardapi error' }); + this.node.error(error?.message || error, msg); + done(error); + } + }); + } + + _attachCloseHandler() { + this.node.on('close', (done) => done()); + } +} + +module.exports = nodeClass; + diff --git a/src/specificClass.js b/src/specificClass.js new file mode 100644 index 0000000..54d392e --- /dev/null +++ b/src/specificClass.js @@ -0,0 +1,195 @@ +const crypto = require('node:crypto'); +const fs = require('node:fs'); +const path = require('node:path'); + +const { logger } = require('generalFunctions'); + +function stableUid(input) { + const digest = crypto.createHash('sha1').update(String(input)).digest('hex'); + return digest.slice(0, 12); +} + +function slugify(input) { + return String(input || '') + .trim() + .toLowerCase() + .replace(/[^a-z0-9]+/g, '-') + .replace(/(^-|-$)/g, '') + .slice(0, 60); +} + +function defaultBucketForPosition(positionVsParent) { + const pos = String(positionVsParent || '').toLowerCase(); + if (pos === 'upstream') return 'lvl1'; + if (pos === 'downstream') return 'lvl3'; + return 'lvl2'; +} + +function updateTemplatingVar(dashboard, varName, value) { + const list = dashboard?.templating?.list; + if (!Array.isArray(list)) return; + + const variable = list.find((v) => v && v.name === varName); + if (!variable) return; + + variable.current = variable.current || {}; + variable.current.text = value; + variable.current.value = value; + + if (Array.isArray(variable.options) && variable.options.length > 0) { + variable.options[0] = variable.options[0] || {}; + variable.options[0].text = value; + variable.options[0].value = value; + } + + variable.query = value; +} + +class DashboardApi { + constructor(config = {}) { + this.config = { + general: { + name: config?.general?.name || 'dashboardapi', + logging: { + enabled: Boolean(config?.general?.logging?.enabled), + logLevel: config?.general?.logging?.logLevel || 'info', + }, + }, + grafanaConnector: { + protocol: config?.grafanaConnector?.protocol || 'http', + host: config?.grafanaConnector?.host || 'localhost', + port: Number(config?.grafanaConnector?.port || 3000), + bearerToken: config?.grafanaConnector?.bearerToken || '', + }, + bucketMap: config?.bucketMap || {}, + }; + + this.logger = new logger( + this.config.general.logging.enabled, + this.config.general.logging.logLevel, + this.config.general.name + ); + } + + _templatesDir() { + return path.join(__dirname, '..', 'config'); + } + + _templateFileForSoftwareType(softwareType) { + const st = String(softwareType || '').trim(); + const candidates = [ + `${st}.json`, + `${st.toLowerCase()}.json`, + st === 'machineGroupControl' ? 'machineGroup.json' : null, + ].filter(Boolean); + + for (const filename of candidates) { + const fullPath = path.join(this._templatesDir(), filename); + if (fs.existsSync(fullPath)) return fullPath; + } + + throw new Error(`No dashboard template found for softwareType=${st}`); + } + + loadTemplate(softwareType) { + const templatePath = this._templateFileForSoftwareType(softwareType); + const raw = fs.readFileSync(templatePath, 'utf8'); + return JSON.parse(raw); + } + + grafanaUpsertUrl() { + const { protocol, host, port } = this.config.grafanaConnector; + return `${protocol}://${host}:${port}/api/dashboards/db`; + } + + buildDashboard({ nodeConfig, positionVsParent }) { + const softwareType = + nodeConfig?.functionality?.softwareType || + nodeConfig?.functionality?.software_type || + 'measurement'; + const nodeId = nodeConfig?.general?.id || nodeConfig?.general?.name || softwareType; + const measurementName = `${softwareType}_${nodeId}`; + const title = nodeConfig?.general?.name || String(nodeId); + + const dashboard = this.loadTemplate(softwareType); + const uid = stableUid(`${softwareType}:${nodeId}`); + + dashboard.id = null; + dashboard.uid = uid; + dashboard.title = title; + dashboard.tags = Array.from( + new Set([...(dashboard.tags || []), 'EVOLV', softwareType, String(positionVsParent || '')].filter(Boolean)) + ); + + const bucket = + this.config.bucketMap[String(positionVsParent)] || defaultBucketForPosition(positionVsParent); + + updateTemplatingVar(dashboard, 'measurement', measurementName); + updateTemplatingVar(dashboard, 'bucket', bucket); + + return { dashboard, uid, title, softwareType, nodeId, measurementName }; + } + + buildUpsertRequest({ dashboard, folderId = 0, overwrite = true }) { + return { dashboard, folderId, overwrite }; + } + + extractChildren(nodeSource) { + const out = []; + const reg = nodeSource?.childRegistrationUtils?.registeredChildren; + if (reg && typeof reg.values === 'function') { + for (const entry of reg.values()) { + const child = entry?.child; + if (!child?.config) continue; + out.push({ childSource: child, positionVsParent: entry?.position || child.positionVsParent }); + } + return out; + } + return out; + } + + generateDashboardsForGraph(rootSource, { includeChildren = true } = {}) { + if (!rootSource?.config) { + throw new Error('generateDashboardsForGraph requires a node source with `.config`'); + } + + const rootPosition = rootSource?.positionVsParent || rootSource?.config?.functionality?.positionVsParent; + const rootDash = this.buildDashboard({ nodeConfig: rootSource.config, positionVsParent: rootPosition }); + + const results = [rootDash]; + + if (!includeChildren) return results; + + const children = this.extractChildren(rootSource); + for (const { childSource, positionVsParent } of children) { + const childDash = this.buildDashboard({ nodeConfig: childSource.config, positionVsParent }); + results.push(childDash); + } + + // Add links from the root dashboard to children dashboards (when possible) + if (children.length > 0) { + rootDash.dashboard.links = Array.isArray(rootDash.dashboard.links) ? rootDash.dashboard.links : []; + for (const { childSource } of children) { + const childConfig = childSource.config; + const childSoftwareType = childConfig?.functionality?.softwareType || 'measurement'; + const childNodeId = childConfig?.general?.id || childConfig?.general?.name || childSoftwareType; + const childUid = stableUid(`${childSoftwareType}:${childNodeId}`); + const childTitle = childConfig?.general?.name || String(childNodeId); + + rootDash.dashboard.links.push({ + type: 'link', + title: childTitle, + url: `/d/${childUid}/${slugify(childTitle)}`, + tags: [], + targetBlank: false, + keepTime: true, + keepVariables: true, + }); + } + } + + return results; + } +} + +module.exports = DashboardApi; diff --git a/test/dashboardapi.test.js b/test/dashboardapi.test.js new file mode 100644 index 0000000..1ea6e0d --- /dev/null +++ b/test/dashboardapi.test.js @@ -0,0 +1,82 @@ +const test = require('node:test'); +const assert = require('node:assert/strict'); + +const DashboardApi = require('../src/specificClass'); + +function makeNodeSource({ id, name, softwareType, positionVsParent, children = [] }) { + const registeredChildren = new Map(); + for (const child of children) { + registeredChildren.set(child.config.general.id, { + child, + softwareType: child.config.functionality.softwareType, + position: child.positionVsParent || child.config.functionality.positionVsParent, + registeredAt: Date.now(), + }); + } + + return { + config: { + general: { id, name }, + functionality: { softwareType, positionVsParent }, + }, + positionVsParent, + childRegistrationUtils: { registeredChildren }, + }; +} + +test('buildDashboard sets id=null, stable uid, title, measurement and bucket vars', () => { + const api = new DashboardApi({ + general: { name: 'dashboardapi-test', logging: { enabled: false, logLevel: 'error' } }, + grafanaConnector: { protocol: 'http', host: 'localhost', port: 3000, bearerToken: '' }, + }); + + const nodeSource = makeNodeSource({ + id: 'm-1', + name: 'PT-1', + softwareType: 'measurement', + positionVsParent: 'downstream', + }); + + const dash = api.buildDashboard({ nodeConfig: nodeSource.config, positionVsParent: 'downstream' }); + + assert.equal(dash.dashboard.id, null); + assert.equal(dash.uid.length, 12); + assert.equal(dash.dashboard.uid, dash.uid); + assert.equal(dash.dashboard.title, 'PT-1'); + + const templ = dash.dashboard.templating.list; + const measurement = templ.find((v) => v.name === 'measurement'); + const bucket = templ.find((v) => v.name === 'bucket'); + + assert.equal(measurement.current.value, 'measurement_m-1'); + assert.equal(bucket.current.value, 'lvl3'); +}); + +test('generateDashboardsForGraph returns root + direct child dashboards and adds links', () => { + const api = new DashboardApi({ + general: { name: 'dashboardapi-test', logging: { enabled: false, logLevel: 'error' } }, + grafanaConnector: { protocol: 'http', host: 'localhost', port: 3000, bearerToken: '' }, + }); + + const child = makeNodeSource({ + id: 'c-1', + name: 'ChildSensor', + softwareType: 'measurement', + positionVsParent: 'upstream', + }); + + const root = makeNodeSource({ + id: 'p-1', + name: 'ParentMachine', + softwareType: 'machine', + positionVsParent: 'atEquipment', + children: [child], + }); + + const results = api.generateDashboardsForGraph(root, { includeChildren: true }); + assert.equal(results.length, 2); + + const rootDash = results[0]; + assert.ok(Array.isArray(rootDash.dashboard.links)); + assert.ok(rootDash.dashboard.links.some((l) => l.url && l.url.includes('/d/'))); +});