From a699e454b1b3dc860df3a0345bee4ae9b7793a03 Mon Sep 17 00:00:00 2001 From: Dastine Date: Mon, 17 Nov 2025 17:36:08 -0700 Subject: [PATCH 1/2] Add Websocket Demo Dashboard and configure WebSocket API datasource --- ...elemetry Base Dashboard-1763418239880.json | 926 ++++++++++++++++++ .../provisioning/datasources/datasources.yaml | 7 + 2 files changed, 933 insertions(+) create mode 100644 grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json diff --git a/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json b/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json new file mode 100644 index 0000000..2760233 --- /dev/null +++ b/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json @@ -0,0 +1,926 @@ +{ + "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, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 2, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 8, + "panels": [], + "title": "Driving Behavior and Safety", + "type": "row" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "RightSignalStatus" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": true, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.TimeStamp", + "language": "jsonpath", + "name": "", + "type": "time" + }, + { + "jsonPath": "$.data.B3", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Driving Behavior", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "Acceleration" + }, + { + "path": "BrakeSwitchDigital" + }, + { + "path": "LeftSignalStatus" + }, + { + "path": "RightSignalStatus" + } + ], + "source": "B3" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "description": "Critical system errors or safety trips within the battery management system.", + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "MalfunctionIndicatorActive" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": true, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.TimeStamp", + "language": "jsonpath", + "name": "", + "type": "time" + }, + { + "jsonPath": "$.data.ProximitySensors", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Safety", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "ProximitySensor1" + } + ], + "source": "ProximitySensors" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "ProtectionTrip" + } + ], + "source": "MBMS" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "MalfunctionIndicatorActive" + } + ], + "source": "Battery" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "Error" + } + ], + "source": "Contactor" + } + } + ], + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 2, + "panels": [], + "title": "Range and Efficiency", + "type": "row" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "FanSpeed" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [] + } + ] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 3, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": true, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.TimeStamp", + "language": "jsonpath", + "name": "", + "type": "time" + }, + { + "jsonPath": "$.data.Battery", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "PackStateOfCharge", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "PackStateOfCharge" + } + ], + "keepTime": false, + "replace": true, + "source": "Battery" + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "PackVoltage" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": true, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 18, + "x": 6, + "y": 10 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.TimeStamp", + "language": "jsonpath", + "name": "", + "type": "time" + }, + { + "jsonPath": "$.data.Battery", + "language": "jsonpath", + "name": "" + }, + { + "jsonPath": "$.data.B3", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Battery", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "PackVoltage" + }, + { + "path": "PackCurrent" + }, + { + "alias": "PackStateOfCharge (SOC)", + "path": "PackStateOfCharge" + }, + { + "alias": "PackAmphours (Ah)", + "path": "PackAmphours" + } + ], + "keepTime": false, + "replace": false, + "source": "Battery" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "RegenBraking" + } + ], + "keepTime": false, + "replace": false, + "source": "B3" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "fahrenheit" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 6, + "y": 17 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.TimeStamp", + "language": "jsonpath", + "name": "", + "type": "time" + }, + { + "jsonPath": "$.data.Battery", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Average Temperature", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "AverageTemperature" + } + ], + "replace": true, + "source": "Battery" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "description": "Multiply PackVoltage by PackCurrent at each moment", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 15, + "y": 17 + }, + "id": 11, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.TimeStamp", + "language": "jsonpath", + "name": "", + "type": "time" + }, + { + "jsonPath": "$.data.Battery", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Total Energy Consumption", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "PackVoltage" + }, + { + "path": "PackCurrent" + } + ], + "source": "Battery" + } + }, + { + "id": "calculateField", + "options": { + "binary": { + "left": { + "matcher": { + "id": "byName", + "options": "PackVoltage" + } + }, + "operator": "*", + "right": { + "matcher": { + "id": "byName", + "options": "PackCurrent" + } + } + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": true + } + } + ], + "type": "stat" + } + ], + "preload": false, + "refresh": "1m", + "schemaVersion": 42, + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Das Telemetry Base Dashboard", + "uid": "40c53014-a3c2-47e8-8c8b-3ce15a6ecc61", + "version": 3 +} \ No newline at end of file diff --git a/grafana/provisioning/datasources/datasources.yaml b/grafana/provisioning/datasources/datasources.yaml index d9f19bc..ef4ca9e 100644 --- a/grafana/provisioning/datasources/datasources.yaml +++ b/grafana/provisioning/datasources/datasources.yaml @@ -11,6 +11,13 @@ datasources: jsonData: username: ${MQTT_USERNAME} uri: host.docker.internal:1883 + + - name: WebSocket API + type: golioth-websocket-datasource + editable: true + isDefault: false + jsonData: + host: ws://host.docker.internal:3001/grafana-ws # - name: Postgres # type: postgres From a88f524623b7a192dc0a4bc0568123f47e03da4e Mon Sep 17 00:00:00 2001 From: Dastine Date: Sat, 22 Nov 2025 14:17:05 -0700 Subject: [PATCH 2/2] Refactor dashboard to use Grafana MQTT datasource and WebSocket datasource --- ...elemetry Base Dashboard-1763418239880.json | 1131 ++++++++++++----- 1 file changed, 794 insertions(+), 337 deletions(-) diff --git a/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json b/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json index 2760233..c972d05 100644 --- a/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json +++ b/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json @@ -29,54 +29,20 @@ "x": 0, "y": 0 }, - "id": 8, + "id": 2, "panels": [], - "title": "Driving Behavior and Safety", + "title": "Range and Efficiency", "type": "row" }, { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, "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", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "mode": "thresholds" }, "mappings": [], "thresholds": { @@ -101,71 +67,50 @@ "options": { "mode": "exclude", "names": [ - "RightSignalStatus" + "FanSpeed" ], "prefix": "All except:", "readOnly": true } }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": true, - "viz": true - } - } - ] + "properties": [] } ] }, "gridPos": { "h": 8, - "w": 12, + "w": 6, "x": 0, "y": 1 }, - "id": 7, + "id": 3, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } + "showThresholdLabels": true, + "showThresholdMarkers": true, + "sizing": "auto" }, "pluginVersion": "12.2.0", "targets": [ { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, - "fields": [ - { - "jsonPath": "$.data.TimeStamp", - "language": "jsonpath", - "name": "", - "type": "time" - }, - { - "jsonPath": "$.data.B3", - "language": "jsonpath", - "name": "" - } - ], - "path": "", "refId": "A", - "withStreaming": true + "topic": "packet" } ], - "title": "Driving Behavior", + "title": "Pack State Of Charge", "transformations": [ { "id": "extractFields", @@ -174,30 +119,22 @@ "format": "json", "jsonPaths": [ { - "path": "Acceleration" - }, - { - "path": "BrakeSwitchDigital" - }, - { - "path": "LeftSignalStatus" - }, - { - "path": "RightSignalStatus" + "path": "PackStateOfCharge" } ], - "source": "B3" + "keepTime": false, + "replace": true, + "source": "Battery" } } ], - "type": "timeseries" + "type": "gauge" }, { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, - "description": "Critical system errors or safety trips within the battery management system.", "fieldConfig": { "defaults": { "color": { @@ -260,7 +197,7 @@ "options": { "mode": "exclude", "names": [ - "MalfunctionIndicatorActive" + "PackCurrent" ], "prefix": "All except:", "readOnly": true @@ -282,10 +219,10 @@ "gridPos": { "h": 8, "w": 12, - "x": 12, + "x": 6, "y": 1 }, - "id": 9, + "id": 1, "options": { "legend": { "calcs": [], @@ -303,28 +240,14 @@ "targets": [ { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, - "fields": [ - { - "jsonPath": "$.data.TimeStamp", - "language": "jsonpath", - "name": "", - "type": "time" - }, - { - "jsonPath": "$.data.ProximitySensors", - "language": "jsonpath", - "name": "" - } - ], - "path": "", "refId": "A", - "withStreaming": true + "topic": "packet" } ], - "title": "Safety", + "title": "Packet (History)", "transformations": [ { "id": "extractFields", @@ -333,35 +256,22 @@ "format": "json", "jsonPaths": [ { - "path": "ProximitySensor1" - } - ], - "source": "ProximitySensors" - } - }, - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ + "path": "PackVoltage" + }, { - "path": "ProtectionTrip" - } - ], - "source": "MBMS" - } - }, - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ + "path": "PackCurrent" + }, { - "path": "MalfunctionIndicatorActive" + "alias": "PackStateOfCharge (SOC)", + "path": "PackStateOfCharge" + }, + { + "alias": "PackAmphours (Ah)", + "path": "PackAmphours" } ], + "keepTime": false, + "replace": false, "source": "Battery" } }, @@ -372,33 +282,23 @@ "format": "json", "jsonPaths": [ { - "path": "Error" + "path": "RegenBraking" } ], - "source": "Contactor" + "keepTime": false, + "replace": false, + "source": "B3" } } ], "type": "timeseries" }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 2, - "panels": [], - "title": "Range and Efficiency", - "type": "row" - }, { "datasource": { "type": "golioth-websocket-datasource", "uid": "bf4fqic90e41se" }, + "description": "", "fieldConfig": { "defaults": { "color": { @@ -417,37 +317,24 @@ "value": 80 } ] - } + }, + "unit": "kwatth" }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "FanSpeed" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [] - } - ] + "overrides": [] }, "gridPos": { - "h": 7, + "h": 8, "w": 6, "x": 0, - "y": 10 + "y": 9 }, - "id": 3, + "id": 11, "options": { - "minVizHeight": 75, - "minVizWidth": 75, + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -455,9 +342,563 @@ "fields": "", "values": false }, - "showThresholdLabels": true, - "showThresholdMarkers": true, - "sizing": "auto" + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Energy Consumed", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "energyConsumed" + } + ], + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Total Power In", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "totalPowerIn" + } + ], + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "amph" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 7, + "x": 12, + "y": 9 + }, + "id": 10, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Average Pack Current", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "averagePackCurrent" + } + ], + "replace": true, + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatt" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 13 + }, + "id": 14, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Total Power Out", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "totalPowerOut" + } + ], + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 17 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Battery Seconds Remaining", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "batterySecondsRemaining" + } + ], + "replace": true, + "source": "data" + } + } + ], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 16, + "panels": [], + "title": "Speed & Performance", + "type": "row" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "velocitykmh" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 25 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": true, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.2.0", + "targets": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Average Speed", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "averageSpeed" + } + ], + "source": "data" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "fieldMinMax": false, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dtdurations" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 25 + }, + "id": 18, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, "pluginVersion": "12.2.0", "targets": [ @@ -468,13 +909,7 @@ }, "fields": [ { - "jsonPath": "$.data.TimeStamp", - "language": "jsonpath", - "name": "", - "type": "time" - }, - { - "jsonPath": "$.data.Battery", + "jsonPath": "$.data.data", "language": "jsonpath", "name": "" } @@ -484,7 +919,7 @@ "withStreaming": true } ], - "title": "PackStateOfCharge", + "title": "Lap Time", "transformations": [ { "id": "extractFields", @@ -493,21 +928,34 @@ "format": "json", "jsonPaths": [ { - "path": "PackStateOfCharge" + "path": "lapTime" } ], "keepTime": false, - "replace": true, - "source": "Battery" + "replace": false, + "source": "data" } } ], - "type": "gauge" + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 8, + "panels": [], + "title": "Driving Behavior and Safety", + "type": "row" }, { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, "fieldConfig": { "defaults": { @@ -571,7 +1019,7 @@ "options": { "mode": "exclude", "names": [ - "PackVoltage" + "RightSignalStatus" ], "prefix": "All except:", "readOnly": true @@ -591,12 +1039,12 @@ ] }, "gridPos": { - "h": 7, - "w": 18, - "x": 6, - "y": 10 + "h": 8, + "w": 12, + "x": 0, + "y": 33 }, - "id": 1, + "id": 7, "options": { "legend": { "calcs": [], @@ -614,33 +1062,14 @@ "targets": [ { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, - "fields": [ - { - "jsonPath": "$.data.TimeStamp", - "language": "jsonpath", - "name": "", - "type": "time" - }, - { - "jsonPath": "$.data.Battery", - "language": "jsonpath", - "name": "" - }, - { - "jsonPath": "$.data.B3", - "language": "jsonpath", - "name": "" - } - ], - "path": "", "refId": "A", - "withStreaming": true + "topic": "packet" } ], - "title": "Battery", + "title": "Driving Behavior", "transformations": [ { "id": "extractFields", @@ -649,33 +1078,16 @@ "format": "json", "jsonPaths": [ { - "path": "PackVoltage" + "path": "Acceleration" }, { - "path": "PackCurrent" + "path": "BrakeSwitchDigital" }, { - "alias": "PackStateOfCharge (SOC)", - "path": "PackStateOfCharge" + "path": "LeftSignalStatus" }, { - "alias": "PackAmphours (Ah)", - "path": "PackAmphours" - } - ], - "keepTime": false, - "replace": false, - "source": "Battery" - } - }, - { - "id": "extractFields", - "options": { - "delimiter": ",", - "format": "json", - "jsonPaths": [ - { - "path": "RegenBraking" + "path": "RightSignalStatus" } ], "keepTime": false, @@ -688,13 +1100,48 @@ }, { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, + "description": "Critical system errors or safety trips within the battery management system.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "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", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, "mappings": [], "thresholds": { @@ -709,61 +1156,67 @@ "value": 80 } ] - }, - "unit": "fahrenheit" + } }, - "overrides": [] + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "MalfunctionIndicatorActive" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": true, + "viz": true + } + } + ] + } + ] }, "gridPos": { - "h": 6, - "w": 9, - "x": 6, - "y": 17 + "h": 8, + "w": 12, + "x": 12, + "y": 33 }, - "id": 10, + "id": 9, "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "showPercentChange": true, - "textMode": "auto", - "wideLayout": true + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, "pluginVersion": "12.2.0", "targets": [ { "datasource": { - "type": "golioth-websocket-datasource", - "uid": "bf4fqic90e41se" + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" }, - "fields": [ - { - "jsonPath": "$.data.TimeStamp", - "language": "jsonpath", - "name": "", - "type": "time" - }, - { - "jsonPath": "$.data.Battery", - "language": "jsonpath", - "name": "" - } - ], - "path": "", "refId": "A", - "withStreaming": true + "topic": "packet" } ], - "title": "Average Temperature", + "title": "Safety", "transformations": [ { "id": "extractFields", @@ -772,22 +1225,59 @@ "format": "json", "jsonPaths": [ { - "path": "AverageTemperature" + "path": "ProximitySensor1" + } + ], + "source": "ProximitySensors" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "ProtectionTrip" + } + ], + "source": "MBMS" + } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "MalfunctionIndicatorActive" } ], - "replace": true, "source": "Battery" } + }, + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "Error" + } + ], + "source": "Contactor" + } } ], - "type": "stat" + "type": "timeseries" }, { "datasource": { "type": "golioth-websocket-datasource", "uid": "bf4fqic90e41se" }, - "description": "Multiply PackVoltage by PackCurrent at each moment", "fieldConfig": { "defaults": { "color": { @@ -807,17 +1297,17 @@ } ] }, - "unit": "kwatth" + "unit": "lengthkm" }, "overrides": [] }, "gridPos": { "h": 6, - "w": 9, - "x": 15, - "y": 17 + "w": 6, + "x": 0, + "y": 41 }, - "id": 11, + "id": 15, "options": { "colorMode": "value", "graphMode": "area", @@ -844,13 +1334,7 @@ }, "fields": [ { - "jsonPath": "$.data.TimeStamp", - "language": "jsonpath", - "name": "", - "type": "time" - }, - { - "jsonPath": "$.data.Battery", + "jsonPath": "$.data.data", "language": "jsonpath", "name": "" } @@ -860,7 +1344,7 @@ "withStreaming": true } ], - "title": "Total Energy Consumption", + "title": "Total Distance", "transformations": [ { "id": "extractFields", @@ -869,38 +1353,11 @@ "format": "json", "jsonPaths": [ { - "path": "PackVoltage" - }, - { - "path": "PackCurrent" + "path": "distance" } ], - "source": "Battery" - } - }, - { - "id": "calculateField", - "options": { - "binary": { - "left": { - "matcher": { - "id": "byName", - "options": "PackVoltage" - } - }, - "operator": "*", - "right": { - "matcher": { - "id": "byName", - "options": "PackCurrent" - } - } - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": true + "replace": true, + "source": "data" } } ], @@ -922,5 +1379,5 @@ "timezone": "browser", "title": "Das Telemetry Base Dashboard", "uid": "40c53014-a3c2-47e8-8c8b-3ce15a6ecc61", - "version": 3 + "version": 8 } \ No newline at end of file