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..c972d05 --- /dev/null +++ b/grafana/dashboards/Das Telemetry Base Dashboard-1763418239880.json @@ -0,0 +1,1383 @@ +{ + "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": 2, + "panels": [], + "title": "Range and Efficiency", + "type": "row" + }, + { + "datasource": { + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" + }, + "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": 8, + "w": 6, + "x": 0, + "y": 1 + }, + "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": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" + }, + "refId": "A", + "topic": "packet" + } + ], + "title": "Pack State Of Charge", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "PackStateOfCharge" + } + ], + "keepTime": false, + "replace": true, + "source": "Battery" + } + } + ], + "type": "gauge" + }, + { + "datasource": { + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "PackCurrent" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": true, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 6, + "y": 1 + }, + "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": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" + }, + "refId": "A", + "topic": "packet" + } + ], + "title": "Packet (History)", + "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" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "kwatth" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 9 + }, + "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.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": [ + { + "datasource": { + "type": "golioth-websocket-datasource", + "uid": "bf4fqic90e41se" + }, + "fields": [ + { + "jsonPath": "$.data.data", + "language": "jsonpath", + "name": "" + } + ], + "path": "", + "refId": "A", + "withStreaming": true + } + ], + "title": "Lap Time", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "lapTime" + } + ], + "keepTime": false, + "replace": false, + "source": "data" + } + } + ], + "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": "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" + } + }, + "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": 33 + }, + "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": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" + }, + "refId": "A", + "topic": "packet" + } + ], + "title": "Driving Behavior", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "Acceleration" + }, + { + "path": "BrakeSwitchDigital" + }, + { + "path": "LeftSignalStatus" + }, + { + "path": "RightSignalStatus" + } + ], + "keepTime": false, + "replace": false, + "source": "B3" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" + }, + "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": 33 + }, + "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": "grafana-mqtt-datasource", + "uid": "P51B197A508373975" + }, + "refId": "A", + "topic": "packet" + } + ], + "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" + }, + { + "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": "lengthkm" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 41 + }, + "id": 15, + "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 Distance", + "transformations": [ + { + "id": "extractFields", + "options": { + "delimiter": ",", + "format": "json", + "jsonPaths": [ + { + "path": "distance" + } + ], + "replace": true, + "source": "data" + } + } + ], + "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": 8 +} \ 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