Grafana Meter Template
"annotations": [ { "kind": "AnnotationQuery", "spec": { "builtIn": true, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "query": { "datasource": { "name": "-- Grafana --" }, "group": "grafana", "kind": "DataQuery", "spec": {}, "version": "v0" } } } ], "cursorSync": "Tooltip", "editable": true, "elements": { "panel-4": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "grafanacloud-logs" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "code", "expr": "{source=\"withthegrid-teleport\"} | assetIdentifier = `$assetIdentifier` | baseType = `meterPower`", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [ { "group": "extractFields", "kind": "Transformation", "spec": { "options": { "delimiter": ",", "format": "json", "jsonPaths": [ { "alias": "measuredAt", "path": "measuredAt" }, { "alias": "Total Active Power", "path": "activePower.sum" } ], "replace": true, "source": "Line" } } }, { "group": "convertFieldType", "kind": "Transformation", "spec": { "options": { "conversions": [ { "destinationType": "time", "targetField": "measuredAt" }, { "destinationType": "number", "targetField": "Total Active Power" } ], "fields": {} } } }, { "group": "prepareTimeSeries", "kind": "Transformation", "spec": { "options": { "format": "multi" } } } ] } }, "description": "Bidirectional power meter. Positive = Export to Grid, Negative = Import from Grid.", "id": 4, "links": [], "title": "Grid Import / Export Power", "vizConfig": { "group": "timeseries", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": true, "drawStyle": "line", "fillOpacity": 15, "lineWidth": 2, "showPoints": "auto" }, "unit": "watt" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi" } } }, "version": "13.2.0-28666480772" } } }, "panel-5": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "grafanacloud-logs" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "code", "expr": "{source=\"withthegrid-teleport\"} | assetIdentifier = `$assetIdentifier` | baseType = `meterPower`", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [ { "group": "extractFields", "kind": "Transformation", "spec": { "options": { "delimiter": ",", "format": "json", "jsonPaths": [ { "alias": "measuredAt", "path": "measuredAt" }, { "alias": "Phase L1", "path": "voltage.phase.l1" }, { "alias": "Phase L2", "path": "voltage.phase.l2" }, { "alias": "Phase L3", "path": "voltage.phase.l3" } ], "replace": true, "source": "Line" } } }, { "group": "convertFieldType", "kind": "Transformation", "spec": { "options": { "conversions": [ { "destinationType": "time", "targetField": "measuredAt" }, { "destinationType": "number", "targetField": "Phase L1" }, { "destinationType": "number", "targetField": "Phase L2" }, { "destinationType": "number", "targetField": "Phase L3" } ], "fields": {} } } }, { "group": "prepareTimeSeries", "kind": "Transformation", "spec": { "options": { "format": "multi" } } } ] } }, "description": "Grid voltage across all three phases.", "id": 5, "links": [], "title": "Grid Voltage", "vizConfig": { "group": "timeseries", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1 }, "unit": "volt" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi" } } }, "version": "13.2.0-28666480772" } } }, "panel-6": { "kind": "Panel", "spec": { "data": { "kind": "QueryGroup", "spec": { "queries": [ { "kind": "PanelQuery", "spec": { "hidden": false, "query": { "datasource": { "name": "grafanacloud-logs" }, "group": "loki", "kind": "DataQuery", "spec": { "direction": "backward", "editorMode": "code", "expr": "{source=\"withthegrid-teleport\"} | assetIdentifier = `$assetIdentifier` | baseType = `meterPower`", "queryType": "range" }, "version": "v0" }, "refId": "A" } } ], "queryOptions": {}, "transformations": [ { "group": "extractFields", "kind": "Transformation", "spec": { "options": { "delimiter": ",", "format": "json", "jsonPaths": [ { "alias": "measuredAt", "path": "measuredAt" }, { "alias": "Frequency", "path": "frequency" } ], "replace": true, "source": "Line" } } }, { "group": "convertFieldType", "kind": "Transformation", "spec": { "options": { "conversions": [ { "destinationType": "time", "targetField": "measuredAt" }, { "destinationType": "number", "targetField": "Frequency" } ], "fields": {} } } }, { "group": "prepareTimeSeries", "kind": "Transformation", "spec": { "options": { "format": "multi" } } } ] } }, "description": "AC Grid Frequency.", "id": 6, "links": [], "title": "Grid Frequency", "vizConfig": { "group": "timeseries", "kind": "VizConfig", "spec": { "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 2 }, "unit": "hertz" }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi" } } }, "version": "13.2.0-28666480772" } } } }, "layout": { "kind": "GridLayout", "spec": { "items": [ { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-4" }, "height": 12, "width": 24, "x": 0, "y": 0 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-5" }, "height": 10, "width": 12, "x": 0, "y": 12 } }, { "kind": "GridLayoutItem", "spec": { "element": { "kind": "ElementReference", "name": "panel-6" }, "height": 10, "width": 12, "x": 12, "y": 12 } } ] } }, "links": [], "liveNow": false, "preload": false, "tags": [], "timeSettings": { "autoRefresh": "", "autoRefreshIntervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "fiscalYearStartMonth": 0, "from": "now-6h", "hideTimepicker": false, "timezone": "browser", "to": "now" }, "title": "Grid / Meter Overview", "variables": [ { "kind": "CustomVariable", "spec": { "allowCustomValue": false, "current": { "text": "janitza-UMG806-12345", "value": "janitza-UMG806-12345" }, "hide": "dontHide", "includeAll": false, "multi": false, "name": "assetIdentifier", "options": [], "query": "janitza-UMG806-12345", "skipUrlSync": false, "valuesFormat": "csv" } } ]}