871 lines
33 KiB
JSON
871 lines
33 KiB
JSON
|
{
|
||
|
"__elements": {},
|
||
|
"__requires": [
|
||
|
{
|
||
|
"type": "panel",
|
||
|
"id": "barchart",
|
||
|
"name": "Bar chart",
|
||
|
"version": ""
|
||
|
},
|
||
|
{
|
||
|
"type": "grafana",
|
||
|
"id": "grafana",
|
||
|
"name": "Grafana",
|
||
|
"version": "10.1.2"
|
||
|
},
|
||
|
{
|
||
|
"type": "panel",
|
||
|
"id": "piechart",
|
||
|
"name": "Pie chart",
|
||
|
"version": ""
|
||
|
},
|
||
|
{
|
||
|
"type": "datasource",
|
||
|
"id": "postgres",
|
||
|
"name": "PostgreSQL",
|
||
|
"version": "1.0.0"
|
||
|
},
|
||
|
{
|
||
|
"type": "panel",
|
||
|
"id": "xychart",
|
||
|
"name": "XY Chart",
|
||
|
"version": ""
|
||
|
}
|
||
|
],
|
||
|
"annotations": {
|
||
|
"list": [
|
||
|
{
|
||
|
"$$hashKey": "object:75",
|
||
|
"builtIn": 1,
|
||
|
"datasource": "-- Grafana --",
|
||
|
"enable": true,
|
||
|
"hide": true,
|
||
|
"definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc",
|
||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||
|
"name": "Annotations & Alerts",
|
||
|
"target": {
|
||
|
"limit": 100,
|
||
|
"matchAny": false,
|
||
|
"tags": [],
|
||
|
"type": "dashboard"
|
||
|
},
|
||
|
"type": "dashboard"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"editable": true,
|
||
|
"fiscalYearStartMonth": 0,
|
||
|
"graphTooltip": 1,
|
||
|
"id": null,
|
||
|
"links": [
|
||
|
{
|
||
|
"icon": "dashboard",
|
||
|
"tags": [],
|
||
|
"title": "TeslaMate",
|
||
|
"tooltip": "",
|
||
|
"type": "link",
|
||
|
"url": "[[base_url:raw]]"
|
||
|
},
|
||
|
{
|
||
|
"asDropdown": true,
|
||
|
"icon": "external link",
|
||
|
"tags": ["tesla"],
|
||
|
"title": "Dashboards",
|
||
|
"type": "dashboards"
|
||
|
},
|
||
|
{
|
||
|
"asDropdown": true,
|
||
|
"icon": "external link",
|
||
|
"includeVars": false,
|
||
|
"keepTime": false,
|
||
|
"tags": ["TeslamateCustomDashboards"],
|
||
|
"targetBlank": false,
|
||
|
"title": "Custom Dashboards",
|
||
|
"tooltip": "",
|
||
|
"type": "dashboards",
|
||
|
"url": ""
|
||
|
}
|
||
|
],
|
||
|
"liveNow": false,
|
||
|
"panels": [
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "continuous-YlRd",
|
||
|
"seriesBy": "last"
|
||
|
},
|
||
|
"custom": {
|
||
|
"axisCenteredZero": false,
|
||
|
"axisColorMode": "text",
|
||
|
"axisLabel": "",
|
||
|
"axisPlacement": "auto",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"pointSize": {
|
||
|
"fixed": 10
|
||
|
},
|
||
|
"scaleDistribution": {
|
||
|
"type": "linear"
|
||
|
},
|
||
|
"show": "points"
|
||
|
},
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
},
|
||
|
{
|
||
|
"color": "red",
|
||
|
"value": 80
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"overrides": [
|
||
|
{
|
||
|
"matcher": {
|
||
|
"id": "byFrameRefID",
|
||
|
"options": "A"
|
||
|
},
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": "links",
|
||
|
"value": [
|
||
|
{
|
||
|
"targetBlank": true,
|
||
|
"title": "Show charge details",
|
||
|
"url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 14,
|
||
|
"w": 12,
|
||
|
"x": 0,
|
||
|
"y": 0
|
||
|
},
|
||
|
"id": 29,
|
||
|
"links": [],
|
||
|
"options": {
|
||
|
"legend": {
|
||
|
"calcs": [],
|
||
|
"displayMode": "list",
|
||
|
"placement": "bottom",
|
||
|
"showLegend": true
|
||
|
},
|
||
|
"series": [
|
||
|
{
|
||
|
"pointColor": {
|
||
|
"field": "Power [kW]",
|
||
|
"fixed": "super-light-yellow"
|
||
|
},
|
||
|
"pointSize": {
|
||
|
"fixed": 2,
|
||
|
"max": 100,
|
||
|
"min": 1
|
||
|
},
|
||
|
"x": "SOC [%]",
|
||
|
"y": "Power [kW]"
|
||
|
},
|
||
|
{
|
||
|
"pointColor": {
|
||
|
"field": "B - SOC [%]"
|
||
|
},
|
||
|
"pointSize": {
|
||
|
"fixed": 12,
|
||
|
"max": 100,
|
||
|
"min": 1
|
||
|
},
|
||
|
"x": "B - SOC [%]",
|
||
|
"y": "B - Avg Power [kW]"
|
||
|
}
|
||
|
],
|
||
|
"seriesMapping": "manual",
|
||
|
"tooltip": {
|
||
|
"mode": "single",
|
||
|
"sort": "none"
|
||
|
}
|
||
|
},
|
||
|
"pluginVersion": "7.5.11",
|
||
|
"targets": [
|
||
|
{
|
||
|
"alias": "",
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"editorMode": "code",
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"hide": false,
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": ["value"],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"sql": {
|
||
|
"columns": [
|
||
|
{
|
||
|
"parameters": [],
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"groupBy": [
|
||
|
{
|
||
|
"property": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"type": "groupBy"
|
||
|
}
|
||
|
],
|
||
|
"limit": 50
|
||
|
},
|
||
|
"timeColumn": "time",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"hide": false,
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \nGROUP BY battery_level",
|
||
|
"refId": "B",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": ["efficiency"],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "cars",
|
||
|
"timeColumn": "inserted_at",
|
||
|
"timeColumnType": "timestamp",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"title": "Supercharger Charging Curve",
|
||
|
"type": "xychart"
|
||
|
},
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "continuous-YlRd"
|
||
|
},
|
||
|
"custom": {
|
||
|
"axisCenteredZero": false,
|
||
|
"axisColorMode": "text",
|
||
|
"axisLabel": "",
|
||
|
"axisPlacement": "auto",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"pointSize": {
|
||
|
"fixed": 3
|
||
|
},
|
||
|
"scaleDistribution": {
|
||
|
"type": "linear"
|
||
|
},
|
||
|
"show": "points"
|
||
|
},
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
},
|
||
|
{
|
||
|
"color": "red",
|
||
|
"value": 80
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"overrides": [
|
||
|
{
|
||
|
"matcher": {
|
||
|
"id": "byFrameRefID",
|
||
|
"options": "A"
|
||
|
},
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": "links",
|
||
|
"value": [
|
||
|
{
|
||
|
"targetBlank": true,
|
||
|
"title": "Show charge details",
|
||
|
"url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 14,
|
||
|
"w": 12,
|
||
|
"x": 12,
|
||
|
"y": 0
|
||
|
},
|
||
|
"id": 32,
|
||
|
"links": [],
|
||
|
"options": {
|
||
|
"legend": {
|
||
|
"calcs": [],
|
||
|
"displayMode": "list",
|
||
|
"placement": "bottom",
|
||
|
"showLegend": true
|
||
|
},
|
||
|
"series": [
|
||
|
{
|
||
|
"pointColor": {
|
||
|
"field": "Power [kW]"
|
||
|
},
|
||
|
"pointSize": {
|
||
|
"fixed": 2,
|
||
|
"max": 100,
|
||
|
"min": 1
|
||
|
},
|
||
|
"x": "SOC [%]",
|
||
|
"y": "Power [kW]"
|
||
|
},
|
||
|
{
|
||
|
"pointColor": {
|
||
|
"field": "B - Avg Power [kW]"
|
||
|
},
|
||
|
"pointSize": {
|
||
|
"fixed": 10,
|
||
|
"max": 100,
|
||
|
"min": 1
|
||
|
},
|
||
|
"x": "B - SOC [%]",
|
||
|
"y": "B - Avg Power [kW]"
|
||
|
}
|
||
|
],
|
||
|
"seriesMapping": "manual",
|
||
|
"tooltip": {
|
||
|
"mode": "single",
|
||
|
"sort": "none"
|
||
|
}
|
||
|
},
|
||
|
"pluginVersion": "7.5.11",
|
||
|
"targets": [
|
||
|
{
|
||
|
"alias": "",
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"editorMode": "code",
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"hide": false,
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": ["value"],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"sql": {
|
||
|
"columns": [
|
||
|
{
|
||
|
"parameters": [],
|
||
|
"type": "function"
|
||
|
}
|
||
|
],
|
||
|
"groupBy": [
|
||
|
{
|
||
|
"property": {
|
||
|
"type": "string"
|
||
|
},
|
||
|
"type": "groupBy"
|
||
|
}
|
||
|
],
|
||
|
"limit": 50
|
||
|
},
|
||
|
"timeColumn": "time",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"hide": false,
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \nGROUP BY battery_level",
|
||
|
"refId": "B",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": ["efficiency"],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "cars",
|
||
|
"timeColumn": "inserted_at",
|
||
|
"timeColumnType": "timestamp",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"title": "Other DC Charging Curve",
|
||
|
"type": "xychart"
|
||
|
},
|
||
|
{
|
||
|
"collapsed": false,
|
||
|
"gridPos": {
|
||
|
"h": 1,
|
||
|
"w": 24,
|
||
|
"x": 0,
|
||
|
"y": 14
|
||
|
},
|
||
|
"id": 40,
|
||
|
"panels": [],
|
||
|
"title": "Fast Charging Sessions",
|
||
|
"type": "row"
|
||
|
},
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"description": "This dashboard is meant to have a look of the charging curve sessions on Tesla Supercharges or other Fast Charging Station.\n\nAlso, you can see number of fast charging sessions you've done on each type of chargers and the count of max power (kW) reached on a session.",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "palette-classic"
|
||
|
},
|
||
|
"custom": {
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
}
|
||
|
},
|
||
|
"mappings": []
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 9,
|
||
|
"w": 4,
|
||
|
"x": 0,
|
||
|
"y": 15
|
||
|
},
|
||
|
"id": 38,
|
||
|
"options": {
|
||
|
"displayLabels": ["value", "percent"],
|
||
|
"legend": {
|
||
|
"displayMode": "list",
|
||
|
"placement": "bottom",
|
||
|
"showLegend": true
|
||
|
},
|
||
|
"pieType": "pie",
|
||
|
"reduceOptions": {
|
||
|
"calcs": ["lastNotNull"],
|
||
|
"fields": "",
|
||
|
"values": true
|
||
|
},
|
||
|
"tooltip": {
|
||
|
"mode": "single",
|
||
|
"sort": "none"
|
||
|
}
|
||
|
},
|
||
|
"targets": [
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "WITH charges_summary AS (\n SELECT\n cp.id,\n COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.road, addr.house_number), '')), addr.city)) AS location,\n COUNT(c.charging_process_id)\n FROM\n charging_processes cp\n LEFT JOIN \n addresses addr ON addr.id = address_id\n LEFT JOIN\n geofences geo ON geo.id = geofence_id\n LEFT JOIN\n charges c ON cp.id = c.charging_process_id\n WHERE\n $__timeFilter(date) AND\n cp.car_id = $car_id AND cp.charge_energy_added > 0.01 AND c.fast_charger_present \n GROUP BY 1, 2\n)\nSELECT \n CASE\n WHEN location ILIKE '%supercharger%' THEN 'Tesla Supercharger'\n ELSE 'Other DC Stations' END AS location,\n COUNT(location) AS n\nFROM charges_summary\nGROUP BY 1",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": ["start_km"],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "drives",
|
||
|
"timeColumn": "start_date",
|
||
|
"timeColumnType": "timestamp",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"type": "piechart"
|
||
|
},
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "continuous-greens"
|
||
|
},
|
||
|
"custom": {
|
||
|
"axisCenteredZero": false,
|
||
|
"axisColorMode": "text",
|
||
|
"axisLabel": "",
|
||
|
"axisPlacement": "auto",
|
||
|
"axisSoftMin": 0,
|
||
|
"fillOpacity": 90,
|
||
|
"gradientMode": "scheme",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"lineWidth": 1,
|
||
|
"scaleDistribution": {
|
||
|
"type": "linear"
|
||
|
},
|
||
|
"thresholdsStyle": {
|
||
|
"mode": "off"
|
||
|
}
|
||
|
},
|
||
|
"mappings": [],
|
||
|
"noValue": "0",
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "super-light-green",
|
||
|
"value": null
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"overrides": [
|
||
|
{
|
||
|
"matcher": {
|
||
|
"id": "byName",
|
||
|
"options": "n"
|
||
|
},
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": "displayName",
|
||
|
"value": "Number of times"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"matcher": {
|
||
|
"id": "byName",
|
||
|
"options": "Power [kW]"
|
||
|
},
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": "unit",
|
||
|
"value": "kwatt"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 9,
|
||
|
"w": 20,
|
||
|
"x": 4,
|
||
|
"y": 15
|
||
|
},
|
||
|
"id": 34,
|
||
|
"links": [],
|
||
|
"options": {
|
||
|
"barRadius": 0,
|
||
|
"barWidth": 0.97,
|
||
|
"fullHighlight": false,
|
||
|
"groupWidth": 0,
|
||
|
"legend": {
|
||
|
"calcs": [],
|
||
|
"displayMode": "list",
|
||
|
"placement": "bottom",
|
||
|
"showLegend": false
|
||
|
},
|
||
|
"orientation": "auto",
|
||
|
"showValue": "auto",
|
||
|
"stacking": "none",
|
||
|
"tooltip": {
|
||
|
"mode": "single",
|
||
|
"sort": "none"
|
||
|
},
|
||
|
"xField": "Power [kW]",
|
||
|
"xTickLabelRotation": 0,
|
||
|
"xTickLabelSpacing": 0
|
||
|
},
|
||
|
"pluginVersion": "8.5.15",
|
||
|
"targets": [
|
||
|
{
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "WITH power_summary AS (\n SELECT ROUND(MAX(charges.charger_power) / 5, 0) * 5 AS \"power\"\n FROM charging_processes\n LEFT JOIN charges ON charging_processes.id = charges.charging_process_id\n WHERE $__timeFilter(date) AND charging_processes.car_id = $car_id AND charging_processes.charge_energy_added > 0.01 AND charges.fast_charger_present\n GROUP BY charging_processes.id\n)\nSELECT power_summary.power AS \"Power [kW]\", COUNT(power_summary.power) AS n\nFROM power_summary\nWHERE power_summary.power >= $filter_power_from AND power_summary.power <= $filter_power_to\nGROUP BY 1\nORDER BY 1 DESC\n",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": ["value"],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"timeColumn": "time",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"title": "Max Power",
|
||
|
"type": "barchart"
|
||
|
}
|
||
|
],
|
||
|
"refresh": "",
|
||
|
"schemaVersion": 38,
|
||
|
"style": "dark",
|
||
|
"tags": ["TeslamateCustomDashboards"],
|
||
|
"templating": {
|
||
|
"list": [
|
||
|
{
|
||
|
"current": {},
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
|
||
|
"hide": 0,
|
||
|
"includeAll": false,
|
||
|
"label": "Car",
|
||
|
"multi": false,
|
||
|
"name": "car_id",
|
||
|
"options": [],
|
||
|
"query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
|
||
|
"refresh": 1,
|
||
|
"regex": "",
|
||
|
"skipUrlSync": false,
|
||
|
"sort": 0,
|
||
|
"tagValuesQuery": "",
|
||
|
"tagsQuery": "",
|
||
|
"type": "query",
|
||
|
"useTags": false
|
||
|
},
|
||
|
{
|
||
|
"current": {},
|
||
|
"datasource": {
|
||
|
"type": "postgres",
|
||
|
"uid": "TeslaMate"
|
||
|
},
|
||
|
"definition": "select base_url from settings limit 1;",
|
||
|
"hide": 2,
|
||
|
"includeAll": false,
|
||
|
"label": "",
|
||
|
"multi": false,
|
||
|
"name": "base_url",
|
||
|
"options": [],
|
||
|
"query": "select base_url from settings limit 1;",
|
||
|
"refresh": 1,
|
||
|
"regex": "",
|
||
|
"skipUrlSync": false,
|
||
|
"sort": 0,
|
||
|
"tagValuesQuery": "",
|
||
|
"tagsQuery": "",
|
||
|
"type": "query",
|
||
|
"useTags": false
|
||
|
},
|
||
|
{
|
||
|
"current": {
|
||
|
"selected": false,
|
||
|
"text": "0",
|
||
|
"value": "0"
|
||
|
},
|
||
|
"hide": 0,
|
||
|
"label": "Power >=",
|
||
|
"name": "filter_power_from",
|
||
|
"options": [
|
||
|
{
|
||
|
"selected": true,
|
||
|
"text": "0",
|
||
|
"value": "0"
|
||
|
}
|
||
|
],
|
||
|
"query": "0",
|
||
|
"skipUrlSync": false,
|
||
|
"type": "textbox"
|
||
|
},
|
||
|
{
|
||
|
"current": {
|
||
|
"selected": false,
|
||
|
"text": "260",
|
||
|
"value": "260"
|
||
|
},
|
||
|
"hide": 0,
|
||
|
"label": "Power <=",
|
||
|
"name": "filter_power_to",
|
||
|
"options": [
|
||
|
{
|
||
|
"selected": true,
|
||
|
"text": "260",
|
||
|
"value": "260"
|
||
|
}
|
||
|
],
|
||
|
"query": "260",
|
||
|
"skipUrlSync": false,
|
||
|
"type": "textbox"
|
||
|
},
|
||
|
{
|
||
|
"current": {
|
||
|
"selected": false,
|
||
|
"text": "0",
|
||
|
"value": "0"
|
||
|
},
|
||
|
"hide": 0,
|
||
|
"label": "SOC >=",
|
||
|
"name": "filter_soc_from",
|
||
|
"options": [
|
||
|
{
|
||
|
"selected": true,
|
||
|
"text": "0",
|
||
|
"value": "0"
|
||
|
}
|
||
|
],
|
||
|
"query": "0",
|
||
|
"skipUrlSync": false,
|
||
|
"type": "textbox"
|
||
|
},
|
||
|
{
|
||
|
"current": {
|
||
|
"selected": false,
|
||
|
"text": "100",
|
||
|
"value": "100"
|
||
|
},
|
||
|
"hide": 0,
|
||
|
"label": "SOC <=",
|
||
|
"name": "filter_soc_to",
|
||
|
"options": [
|
||
|
{
|
||
|
"selected": true,
|
||
|
"text": "100",
|
||
|
"value": "100"
|
||
|
}
|
||
|
],
|
||
|
"query": "100",
|
||
|
"skipUrlSync": false,
|
||
|
"type": "textbox"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"time": {
|
||
|
"from": "now-1M",
|
||
|
"to": "now"
|
||
|
},
|
||
|
"timepicker": {
|
||
|
"time_options": [
|
||
|
"5m",
|
||
|
"15m",
|
||
|
"1h",
|
||
|
"6h",
|
||
|
"12h",
|
||
|
"24h",
|
||
|
"2d",
|
||
|
"7d",
|
||
|
"30d"
|
||
|
]
|
||
|
},
|
||
|
"timezone": "",
|
||
|
"title": "Charging Curve Stats",
|
||
|
"uid": "jchmXpkIkhmRz",
|
||
|
"version": 9,
|
||
|
"weekStart": ""
|
||
|
}
|