fix(teslamate) fix questions and minor updates (#22330)

**Description**
Attempts to fix the issue with questions.yml
container image and dashboard updates
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning
- [x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):` or `chore(chart-name):`

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Jamie
2024-05-22 03:12:13 -04:00
committed by GitHub
parent 1b9aeaba2e
commit add66b0a6a
23 changed files with 6767 additions and 3194 deletions

View File

@@ -30,11 +30,11 @@ maintainers:
- name: TrueCharts
email: info@truecharts.org
url: https://truecharts.org
name: TeslaMate
name: teslamate
sources:
- https://github.com/teslamate-org/teslamate
- https://docs.teslamate.org/docs/installation/docker
- https://github.com/truecharts/charts/tree/master/charts/incubator/TeslaMate
- https://hub.docker.com/r/teslamate/teslamate
type: application
version: 1.0.4
version: 1.0.5

View File

@@ -52,6 +52,7 @@
"type": "grafana",
"uid": "-- Grafana --"
},
"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",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@@ -353,7 +354,7 @@
"x": 12,
"y": 0
},
"id": 32,
"id": 37,
"options": {
"colorMode": "value",
"graphMode": "none",
@@ -410,7 +411,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;",
"rawSql": "SELECT ROUND(convert_km((max(end_km) - min(start_km))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nFROM drives WHERE car_id = $car_id;",
"refId": "Mileage",
"select": [
[
@@ -453,12 +454,13 @@
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "select ROUND(convert_km(ROUND(odometer::numeric,0), '$length_unit'),0) || ' $length_unit' as \"Odometer\"\nfrom positions \nwhere car_id = $car_id\norder by date desc \nlimit 1;",
"rawSql": "SELECT ROUND(convert_km(max(end_km)::numeric, '$length_unit'),0) || ' $length_unit' as \"Odometer\"\nFROM drives WHERE car_id = $car_id;",
"refId": "Odometer",
"select": [
[
@@ -468,6 +470,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "cars",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
@@ -894,6 +913,84 @@
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\r\n\tCOUNT(*) AS \"Total charges\"\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\tcar_id = $car_id AND charge_energy_added > 0.01\r\n\t",
"refId": "Total charges",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n\tfloor(sum(charge_energy_added) / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END) AS \"Charging cycles\"\nFROM charging_processes WHERE car_id = $car_id AND charge_energy_added > 0.01",
"refId": "Charging cycles",
"select": [
[
{
"params": ["start_km"],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
@@ -971,84 +1068,6 @@
"limit": 50
}
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\r\n\tCOUNT(*) AS \"Total charges\"\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\tcar_id = $car_id AND charge_energy_added > 0.01\r\n\t",
"refId": "Total charges",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n\tfloor(sum(charge_energy_added) / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END) AS \"Charging cycles\"\nFROM charging_processes WHERE car_id = $car_id AND charge_energy_added > 0.01",
"refId": "Charging cycles",
"select": [
[
{
"params": ["start_km"],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
@@ -1123,7 +1142,7 @@
},
"gridPos": {
"h": 2,
"w": 6,
"w": 4,
"x": 6,
"y": 9
},
@@ -1195,6 +1214,112 @@
"title": "Current SOC",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "This is the Derived Rated Efficiency that TeslaMate calculates based on battery charges. \nThis information can be seen in more detail on the \"Efficiency\" dashboard.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byRegexp",
"options": "/.*_km/"
},
"properties": [
{
"id": "unit",
"value": "Wh/km"
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": "/.*_mi/"
},
"properties": [
{
"id": "unit",
"value": "Wh/mi"
}
]
}
]
},
"gridPos": {
"h": 4,
"w": 2,
"x": 10,
"y": 9
},
"id": 32,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "/.*/",
"values": false
},
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT ('$aux'::json -> 'RatedEfficiency')::text::float * \r\n CASE \r\n WHEN '$length_unit' = 'km' THEN 10\r\n WHEN '$length_unit' = 'mi' THEN 16.0934 \r\n END AS efficiency_$length_unit",
"refId": "Looged",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Efficiency",
"type": "stat"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
@@ -1236,7 +1361,7 @@
},
"gridPos": {
"h": 2,
"w": 6,
"w": 4,
"x": 6,
"y": 11
},
@@ -1699,6 +1824,6 @@
"timezone": "browser",
"title": "Battery Health",
"uid": "jchmRiqUfXgTM",
"version": 16,
"version": 18,
"weekStart": ""
}

View File

@@ -1,9 +1,37 @@
{
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.4.0"
},
{
"type": "datasource",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"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",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@@ -21,7 +49,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"iteration": 1642763869363,
"id": null,
"links": [
{
"icon": "dashboard",
@@ -56,6 +84,10 @@
"type": "row"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"color": {
@@ -63,7 +95,10 @@
},
"custom": {
"align": "auto",
"displayMode": "auto"
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"decimals": 2,
"displayName": "",
@@ -244,8 +279,10 @@
"value": 1
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.align"
@@ -446,8 +483,10 @@
"value": 1
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.align"
@@ -529,6 +568,32 @@
{
"id": "custom.width",
"value": 80
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
},
{
"color": "super-light-green",
"value": 50
},
{
"color": "super-light-red",
"value": 68
}
]
}
}
]
},
@@ -571,14 +636,18 @@
},
{
"id": "unit",
"value": "none"
"value": "lengthmi"
},
{
"id": "custom.align"
},
{
"id": "custom.width",
"value": 100
"value": 80
},
{
"id": "decimals",
"value": 0
}
]
},
@@ -784,9 +853,10 @@
"y": 1
},
"id": 6,
"links": [],
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": ["sum"],
"show": false
@@ -799,10 +869,14 @@
}
]
},
"pluginVersion": "8.3.4",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
@@ -817,6 +891,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"timeColumn": "time",
"where": [
{
@@ -827,7 +918,6 @@
]
}
],
"datasource": "TeslaMate",
"title": "Charges",
"transformations": [
{
@@ -840,7 +930,10 @@
"type": "table"
},
{
"datasource": "TeslaMate",
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"color": {
@@ -875,13 +968,12 @@
"overrides": []
},
"gridPos": {
"h": 2,
"w": 8,
"h": 4,
"w": 6,
"x": 0,
"y": 20
},
"id": 10,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -893,9 +985,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.3.4",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "time_series",
@@ -921,7 +1015,11 @@
"params": [],
"type": "macro"
}
]
],
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
}
}
],
"title": "Energy added",
@@ -929,7 +1027,10 @@
"type": "stat"
},
{
"datasource": "TeslaMate",
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"color": {
@@ -964,13 +1065,12 @@
"overrides": []
},
"gridPos": {
"h": 2,
"w": 8,
"x": 8,
"h": 4,
"w": 6,
"x": 6,
"y": 20
},
"id": 12,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -982,9 +1082,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.3.4",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "time_series",
@@ -1010,7 +1112,11 @@
"params": [],
"type": "macro"
}
]
],
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
}
}
],
"title": "Energy used",
@@ -1018,7 +1124,10 @@
"type": "stat"
},
{
"datasource": "TeslaMate",
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"color": {
@@ -1054,13 +1163,12 @@
"overrides": []
},
"gridPos": {
"h": 2,
"w": 8,
"x": 16,
"h": 4,
"w": 5,
"x": 12,
"y": 20
},
"id": 13,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -1072,9 +1180,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.3.4",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "time_series",
@@ -1100,7 +1210,11 @@
"params": [],
"type": "macro"
}
]
],
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
}
}
],
"title": "Cost",
@@ -1108,18 +1222,16 @@
"type": "stat"
}
],
"schemaVersion": 36,
"style": "dark",
"schemaVersion": 39,
"tags": ["tesla"],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "All",
"value": "$__all"
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
"hide": 2,
"includeAll": true,
@@ -1138,12 +1250,11 @@
"useTags": false
},
{
"current": {
"selected": false,
"text": "km",
"value": "km"
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "select unit_of_length from settings limit 1;",
"hide": 2,
"includeAll": false,
@@ -1162,12 +1273,11 @@
"useTags": false
},
{
"current": {
"selected": false,
"text": "C",
"value": "C"
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "select unit_of_temperature from settings limit 1;",
"hide": 2,
"includeAll": false,
@@ -1186,12 +1296,11 @@
"useTags": false
},
{
"current": {
"selected": false,
"text": "ideal",
"value": "ideal"
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "select preferred_range from settings limit 1;",
"hide": 2,
"includeAll": false,
@@ -1209,12 +1318,11 @@
"useTags": false
},
{
"current": {
"selected": false,
"text": "http://localhost:4000",
"value": "http://localhost:4000"
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "select base_url from settings limit 1;",
"hide": 2,
"includeAll": false,
@@ -1233,12 +1341,11 @@
},
{
"allValue": "-1",
"current": {
"selected": false,
"text": ["All"],
"value": ["$__all"]
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;",
"hide": 0,
"includeAll": true,
@@ -1330,6 +1437,6 @@
"timezone": "",
"title": "Charges",
"uid": "TSmNYvRRk",
"version": 4,
"version": 5,
"weekStart": ""
}

View File

@@ -22,7 +22,6 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"iteration": 1658137661652,
"links": [
{
"icon": "dashboard",
@@ -82,7 +81,6 @@
"y": 1
},
"id": 8,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -97,9 +95,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -156,7 +156,6 @@
"y": 1
},
"id": 10,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -171,9 +170,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -226,12 +227,11 @@
},
"gridPos": {
"h": 3,
"w": 4,
"w": 3,
"x": 10,
"y": 1
},
"id": 14,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -246,9 +246,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
@@ -302,12 +304,11 @@
},
"gridPos": {
"h": 3,
"w": 4,
"x": 14,
"w": 3,
"x": 13,
"y": 1
},
"id": 27,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -322,11 +323,15 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
@@ -341,6 +346,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "addresses",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
@@ -377,8 +399,8 @@
},
"gridPos": {
"h": 3,
"w": 3,
"x": 18,
"w": 2,
"x": 16,
"y": 1
},
"id": 26,
@@ -392,9 +414,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -449,8 +473,8 @@
},
"gridPos": {
"h": 3,
"w": 3,
"x": 21,
"w": 2,
"x": 18,
"y": 1
},
"id": 31,
@@ -464,17 +488,38 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT (\n SELECT sum(cost)\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n) / (\n SELECT sum(greatest(charge_energy_added, charge_energy_used))\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n)",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
@@ -490,6 +535,177 @@
"title": "Average Cost per kWh",
"type": "stat"
},
{
"datasource": "TeslaMate",
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d8d9da",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 2,
"x": 20,
"y": 1
},
"id": 33,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n cp.cost,\n cp.end_date,\n cp.car_id,\n cp.charge_energy_added,\n cp.charge_energy_used,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC'\n\t\t\t\t ELSE 'AC'\n\t\tEND AS current\n\tFROM charging_processes cp\n RIGHT JOIN charges ON cp.id = charges.charging_process_id\n WHERE\n\t cp.car_id = $car_id\n\t AND $__timeFilter(end_date)\n GROUP BY 1\n)\nSELECT (\n SELECT \n sum(cost)\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'DC'\n)/(\n SELECT sum(greatest(charge_energy_added, charge_energy_used))\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'DC'\n )",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "DC Avg Cost per kWh",
"type": "stat"
},
{
"datasource": "TeslaMate",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d8d9da",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 2,
"x": 22,
"y": 1
},
"id": 32,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n cp.cost,\n cp.end_date,\n cp.car_id,\n cp.charge_energy_added,\n cp.charge_energy_used,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC'\n\t\t\t\t ELSE 'AC'\n\t\tEND AS current\n\tFROM charging_processes cp\n RIGHT JOIN charges ON cp.id = charges.charging_process_id\n WHERE\n\t cp.car_id = $car_id\n\t AND $__timeFilter(end_date)\n GROUP BY 1\n)\nSELECT (\n SELECT \n sum(cost)\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'AC'\n)/(\n SELECT sum(greatest(charge_energy_added, charge_energy_used))\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'AC'\n )",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "AC Avg Cost per kWh",
"type": "stat"
},
{
"cards": {},
"color": {
@@ -502,6 +718,21 @@
},
"dataFormat": "timeseries",
"datasource": "TeslaMate",
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
@@ -515,6 +746,52 @@
"legend": {
"show": false
},
"options": {
"calculate": true,
"calculation": {
"yBuckets": {
"mode": "size",
"value": "10.00001"
}
},
"cellGap": 2,
"cellValues": {},
"color": {
"exponent": 0.5,
"fill": "#b4ff00",
"min": 0,
"mode": "opacity",
"reverse": false,
"scale": "exponential",
"scheme": "Oranges",
"steps": 128
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": false
},
"rowsFrame": {
"layout": "auto"
},
"showValue": "never",
"tooltip": {
"mode": "single",
"showColorScale": false,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"max": "100",
"reverse": false,
"unit": "short"
}
},
"pluginVersion": "10.4.0",
"reverseYBuckets": false,
"targets": [
{
@@ -571,6 +848,9 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@@ -582,6 +862,7 @@
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
@@ -672,8 +953,9 @@
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "multi",
@@ -772,7 +1054,6 @@
"y": 10
},
"id": 18,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": ["name"],
@@ -780,6 +1061,7 @@
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"values": ["value", "percent"]
},
"pieType": "pie",
@@ -964,7 +1246,7 @@
"zoom": 15
}
},
"pluginVersion": "10.2.0",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
@@ -1073,7 +1355,6 @@
"y": 10
},
"id": 20,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": ["name"],
@@ -1081,6 +1362,7 @@
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"values": ["value", "percent"]
},
"pieType": "pie",
@@ -1158,7 +1440,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1194,7 +1477,6 @@
"y": 23
},
"id": 29,
"links": [],
"options": {
"dims": {
"exclude": ["charging_process_id"],
@@ -1310,7 +1592,6 @@
}
],
"title": "DC Charging Curve",
"transformations": [],
"type": "xychart"
},
{
@@ -1319,7 +1600,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1327,8 +1610,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
}
@@ -1349,8 +1631,10 @@
"value": "SOC"
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "unit",
@@ -1369,8 +1653,11 @@
"value": "# of Charges"
},
{
"id": "custom.displayMode",
"value": "gradient-gauge"
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "gauge"
}
},
{
"id": "max"
@@ -1390,7 +1677,6 @@
"y": 39
},
"id": 2,
"links": [],
"options": {
"footer": {
"fields": "",
@@ -1436,7 +1722,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1444,8 +1732,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@@ -1475,8 +1762,7 @@
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
"color": "red"
},
{
"color": "#EAB839",
@@ -1490,8 +1776,10 @@
}
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.width",
@@ -1510,8 +1798,11 @@
"value": "# of Discharges"
},
{
"id": "custom.displayMode",
"value": "gradient-gauge"
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "gauge"
}
},
{
"id": "min",
@@ -1528,7 +1819,6 @@
"y": 39
},
"id": 13,
"links": [],
"options": {
"footer": {
"fields": "",
@@ -1574,7 +1864,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1582,8 +1874,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@@ -1678,7 +1969,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1686,8 +1979,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@@ -1784,8 +2076,7 @@
}
],
"refresh": false,
"schemaVersion": 36,
"style": "dark",
"schemaVersion": 39,
"tags": ["tesla"],
"templating": {
"list": [
@@ -1895,6 +2186,6 @@
"timezone": "",
"title": "Charging Stats - LFP",
"uid": "UcjFKmUtpt",
"version": 1,
"version": 2,
"weekStart": ""
}

View File

@@ -22,7 +22,6 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"iteration": 1658137661652,
"links": [
{
"icon": "dashboard",
@@ -82,7 +81,6 @@
"y": 1
},
"id": 8,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -97,9 +95,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -156,7 +156,6 @@
"y": 1
},
"id": 10,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -171,9 +170,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -226,12 +227,11 @@
},
"gridPos": {
"h": 3,
"w": 4,
"w": 3,
"x": 10,
"y": 1
},
"id": 14,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -246,9 +246,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
@@ -302,12 +304,11 @@
},
"gridPos": {
"h": 3,
"w": 4,
"x": 14,
"w": 3,
"x": 13,
"y": 1
},
"id": 27,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -322,9 +323,11 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -377,8 +380,8 @@
},
"gridPos": {
"h": 3,
"w": 3,
"x": 18,
"w": 2,
"x": 16,
"y": 1
},
"id": 26,
@@ -392,9 +395,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -449,8 +454,8 @@
},
"gridPos": {
"h": 3,
"w": 3,
"x": 21,
"w": 2,
"x": 18,
"y": 1
},
"id": 31,
@@ -464,9 +469,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.6",
"pluginVersion": "10.4.0",
"targets": [
{
"format": "table",
@@ -490,6 +497,176 @@
"title": "Average Cost per kWh",
"type": "stat"
},
{
"datasource": "TeslaMate",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d8d9da",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 2,
"x": 20,
"y": 1
},
"id": 32,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n cp.cost,\n cp.end_date,\n cp.car_id,\n cp.charge_energy_added,\n cp.charge_energy_used,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC'\n\t\t\t\t ELSE 'AC'\n\t\tEND AS current\n\tFROM charging_processes cp\n RIGHT JOIN charges ON cp.id = charges.charging_process_id\n WHERE\n\t cp.car_id = $car_id\n\t AND $__timeFilter(end_date)\n GROUP BY 1\n)\nSELECT (\n SELECT \n sum(cost)\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'DC'\n)/(\n SELECT sum(greatest(charge_energy_added, charge_energy_used))\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'DC'\n )",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "DC Avg Cost per kWh",
"type": "stat"
},
{
"datasource": "TeslaMate",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d8d9da",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 2,
"x": 22,
"y": 1
},
"id": 33,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n cp.cost,\n cp.end_date,\n cp.car_id,\n cp.charge_energy_added,\n cp.charge_energy_used,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC'\n\t\t\t\t ELSE 'AC'\n\t\tEND AS current\n\tFROM charging_processes cp\n RIGHT JOIN charges ON cp.id = charges.charging_process_id\n WHERE\n\t cp.car_id = $car_id\n\t AND $__timeFilter(end_date)\n GROUP BY 1\n)\nSELECT (\n SELECT \n sum(cost)\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'AC'\n)/(\n SELECT sum(greatest(charge_energy_added, charge_energy_used))\n FROM data\n WHERE $__timeFilter(end_date) AND car_id = $car_id AND current = 'AC'\n )",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"title": "AC Avg Cost per kWh",
"type": "stat"
},
{
"cards": {},
"color": {
@@ -502,6 +679,21 @@
},
"dataFormat": "timeseries",
"datasource": "TeslaMate",
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
@@ -515,6 +707,52 @@
"legend": {
"show": false
},
"options": {
"calculate": true,
"calculation": {
"yBuckets": {
"mode": "size",
"value": "10.00001"
}
},
"cellGap": 2,
"cellValues": {},
"color": {
"exponent": 0.5,
"fill": "#b4ff00",
"min": 0,
"mode": "opacity",
"reverse": false,
"scale": "exponential",
"scheme": "Oranges",
"steps": 128
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": false
},
"rowsFrame": {
"layout": "auto"
},
"showValue": "never",
"tooltip": {
"mode": "single",
"showColorScale": false,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"max": "100",
"reverse": false,
"unit": "short"
}
},
"pluginVersion": "10.4.0",
"reverseYBuckets": false,
"targets": [
{
@@ -571,6 +809,9 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
@@ -582,6 +823,7 @@
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
@@ -672,8 +914,9 @@
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "multi",
@@ -772,7 +1015,6 @@
"y": 10
},
"id": 18,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": ["name"],
@@ -780,6 +1022,7 @@
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"values": ["value", "percent"]
},
"pieType": "pie",
@@ -964,7 +1207,7 @@
"zoom": 15
}
},
"pluginVersion": "10.2.0",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": "TeslaMate",
@@ -1073,7 +1316,6 @@
"y": 10
},
"id": 20,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": ["name"],
@@ -1081,6 +1323,7 @@
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": true,
"values": ["value", "percent"]
},
"pieType": "pie",
@@ -1158,7 +1401,8 @@
"mode": "absolute",
"steps": [
{
"color": "green"
"color": "green",
"value": null
},
{
"color": "red",
@@ -1194,7 +1438,6 @@
"y": 23
},
"id": 29,
"links": [],
"options": {
"dims": {
"exclude": ["charging_process_id"],
@@ -1310,7 +1553,6 @@
}
],
"title": "DC Charging Curve",
"transformations": [],
"type": "xychart"
},
{
@@ -1319,7 +1561,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1327,8 +1571,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
}
]
}
@@ -1349,8 +1592,10 @@
"value": "SOC"
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "thresholds",
@@ -1358,8 +1603,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "yellow",
@@ -1389,8 +1633,11 @@
"value": "# of Charges"
},
{
"id": "custom.displayMode",
"value": "gradient-gauge"
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "gauge"
}
},
{
"id": "max"
@@ -1410,7 +1657,6 @@
"y": 39
},
"id": 2,
"links": [],
"options": {
"footer": {
"fields": "",
@@ -1456,7 +1702,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1464,8 +1712,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@@ -1495,8 +1742,7 @@
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
"color": "red"
},
{
"color": "#EAB839",
@@ -1510,8 +1756,10 @@
}
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.width",
@@ -1530,8 +1778,11 @@
"value": "# of Discharges"
},
{
"id": "custom.displayMode",
"value": "gradient-gauge"
"id": "custom.cellOptions",
"value": {
"mode": "gradient",
"type": "gauge"
}
},
{
"id": "min",
@@ -1548,7 +1799,6 @@
"y": 39
},
"id": 13,
"links": [],
"options": {
"footer": {
"fields": "",
@@ -1594,7 +1844,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1602,8 +1854,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@@ -1698,7 +1949,9 @@
"defaults": {
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
@@ -1706,8 +1959,7 @@
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
"color": "green"
},
{
"color": "red",
@@ -1804,8 +2056,7 @@
}
],
"refresh": false,
"schemaVersion": 36,
"style": "dark",
"schemaVersion": 39,
"tags": ["tesla"],
"templating": {
"list": [
@@ -1915,6 +2166,6 @@
"timezone": "",
"title": "Charging Stats",
"uid": "-pkIkhmRz",
"version": 1,
"version": 5,
"weekStart": ""
}

View File

@@ -129,6 +129,18 @@
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*_mi"
},
"properties": [
{
"id": "unit",
"value": "mi"
}
]
},
{
"matcher": {
"id": "byName",
@@ -157,18 +169,6 @@
}
]
},
{
"matcher": {
"id": "byRegexp",
"options": ".*_mi"
},
"properties": [
{
"id": "unit",
"value": "mi"
}
]
},
{
"matcher": {
"id": "byRegexp",

View File

@@ -21,7 +21,7 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"iteration": 1642773094879,
"iteration": 1642773094880,
"links": [
{
"icon": "dashboard",
@@ -158,6 +158,10 @@
}
]
}
},
{
"id": "max",
"value": 1
}
]
},
@@ -427,6 +431,32 @@
{
"id": "unit",
"value": "fahrenheit"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
},
{
"color": "super-light-green",
"value": 50
},
{
"color": "super-light-red",
"value": 68
}
]
}
}
]
},
@@ -491,7 +521,7 @@
}
]
},
"pluginVersion": "8.3.4",
"pluginVersion": "10.4.1",
"repeatDirection": "h",
"targets": [
{
@@ -499,7 +529,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\nSELECT\n duration_min > 1 AND\n distance > 1 AND\n ( \n start_position.usable_battery_level IS NULL OR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) AS is_sufficiently_precise,\n NULLIF(GREATEST(start_ideal_range_km - end_ideal_range_km, 0), 0) AS range_diff,\n -- with Postgres 12:\n -- date_trunc('$period', start_date::TIMESTAMP WITHOUT TIME ZONE, '$timezone') as local_period,\n date_trunc('$period', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period,\n drives.*\nFROM drives\n LEFT JOIN positions start_position ON start_position_id = start_position.id\n LEFT JOIN positions end_position ON end_position_id = end_position.id)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('$period', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('$period', local_period + ('1 ' || '$period')::INTERVAL))*1000 AS date_to,\n CASE '$period'\n WHEN 'month' THEN to_char(local_period, 'YYYY Month')\n WHEN 'year' THEN to_char(local_period, 'YYYY')\n WHEN 'week' THEN 'week ' || to_char(local_period, 'WW') || ' starting ' || to_char(local_period, 'YYYY-MM-DD')\n ELSE to_char(local_period, 'YYYY-MM-DD')\n END AS display,\n local_period AS date,\n sum(duration_min)*60 AS sum_duration_h, \n convert_km(max(end_km)::integer - min(start_km)::integer, '$length_unit') AS sum_distance_$length_unit,\n convert_celsius(avg(outside_temp_avg), '$temp_unit') AS avg_outside_temp_$temp_unit,\n count(*) AS cnt,\n sum(distance)/sum(range_diff) AS efficiency\nFROM data WHERE\n car_id = $car_id AND\n $__timeFilter(start_date)\nGROUP BY date\nORDER BY date",
"rawSql": "WITH data AS (\nSELECT\n duration_min > 1 AND\n distance > 1 AND\n ( \n start_position.usable_battery_level IS NULL OR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) AS is_sufficiently_precise,\n NULLIF(GREATEST(start_ideal_range_km - end_ideal_range_km, 0), 0) AS range_diff,\n date_trunc('$period', TIMEZONE('$__timezone', TIMEZONE('UTC', start_date))) as date,\n drives.*\nFROM drives\n LEFT JOIN positions start_position ON start_position_id = start_position.id\n LEFT JOIN positions end_position ON end_position_id = end_position.id)\nSELECT\n EXTRACT(EPOCH FROM TIMEZONE('$__timezone', date))*1000 AS date_from,\n EXTRACT(EPOCH FROM (TIMEZONE('$__timezone', date) + ('1 ' || '$period')::INTERVAL))*1000 AS date_to,\n CASE '$period'\n WHEN 'month' THEN to_char(date, 'YYYY Month')\n WHEN 'year' THEN to_char(date, 'YYYY')\n WHEN 'week' THEN 'week ' || to_char(date, 'WW') || ' starting ' || to_char(date, 'YYYY-MM-DD')\n ELSE to_char(date, 'YYYY-MM-DD')\n END AS display,\n TIMEZONE('$__timezone', date) AS date,\n sum(duration_min)*60 AS sum_duration_h, \n convert_km(max(end_km)::integer - min(start_km)::integer, '$length_unit') AS sum_distance_$length_unit,\n convert_celsius(avg(outside_temp_avg), '$temp_unit') AS avg_outside_temp_$temp_unit,\n count(*) AS cnt,\n sum(distance)/sum(range_diff) AS efficiency\nFROM data WHERE\n car_id = $car_id AND\n $__timeFilter(start_date)\nGROUP BY date\nORDER BY date",
"refId": "A",
"select": [
[
@@ -525,7 +555,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\n SELECT\n charging_processes.*,\n -- with Postgres 12:\n -- date_trunc('$period', start_date::TIMESTAMP WITHOUT TIME ZONE, '$timezone') as local_period\n date_trunc('$period', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM charging_processes)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('$period', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('$period', local_period + ('1 ' || '$period')::INTERVAL))*1000 AS date_to,\n CASE '$period'\n WHEN 'month' THEN to_char(local_period, 'YYYY Month')\n WHEN 'year' THEN to_char(local_period, 'YYYY')\n WHEN 'week' THEN 'week ' || to_char(local_period, 'WW') || ' starting ' || to_char(local_period, 'YYYY-MM-DD')\n ELSE to_char(local_period, 'YYYY-MM-DD')\n END AS display,\n local_period AS date,\n sum(greatest(charge_energy_added,charge_energy_used)) AS sum_consumption_kwh,\n sum(greatest(charge_energy_added,charge_energy_used)) / count(*) AS avg_consumption_kwh,\n sum(cost) AS cost_charges,\n count(*) AS cnt_charges\nFROM data WHERE\n car_id = $car_id AND\n $__timeFilter(start_date) AND\n (charge_energy_added IS NULL OR charge_energy_added > 0.1)\nGROUP BY date\nORDER BY date",
"rawSql": "WITH data AS (\n SELECT\n charging_processes.*,\n \tdate_trunc('$period', TIMEZONE('$__timezone', TIMEZONE('UTC', start_date))) as date\n FROM charging_processes)\nSELECT\n EXTRACT(EPOCH FROM TIMEZONE('$__timezone', date))*1000 AS date_from,\n EXTRACT(EPOCH FROM (TIMEZONE('$__timezone', date) + ('1 ' || '$period')::INTERVAL))*1000 AS date_to,\n CASE '$period'\n WHEN 'month' THEN to_char(date, 'YYYY Month')\n WHEN 'year' THEN to_char(date, 'YYYY')\n WHEN 'week' THEN 'week ' || to_char(date, 'WW') || ' starting ' || to_char(date, 'YYYY-MM-DD')\n ELSE to_char(date, 'YYYY-MM-DD')\n END AS display,\n TIMEZONE('$__timezone', date) AS date,\n sum(greatest(charge_energy_added,charge_energy_used)) AS sum_consumption_kwh,\n sum(greatest(charge_energy_added,charge_energy_used)) / count(*) AS avg_consumption_kwh,\n sum(cost) AS cost_charges,\n count(*) AS cnt_charges\nFROM data WHERE\n car_id = $car_id AND\n $__timeFilter(start_date) AND\n (charge_energy_added IS NULL OR charge_energy_added > 0.1)\nGROUP BY date\nORDER BY date",
"refId": "B",
"select": [
[
@@ -550,7 +580,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH data AS (\n SELECT\n drives.*,\n -- with Postgres 12:\n -- date_trunc('$period', start_date::TIMESTAMP WITHOUT TIME ZONE, '$timezone') as local_period\n date_trunc('$period', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM drives)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('$period', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('$period', local_period + ('1 ' || '$period')::INTERVAL))*1000 AS date_to,\n CASE '$period'\n WHEN 'month' THEN to_char(local_period, 'YYYY Month')\n WHEN 'year' THEN to_char(local_period, 'YYYY')\n WHEN 'week' THEN 'week ' || to_char(local_period, 'WW') || ' starting ' || to_char(local_period, 'YYYY-MM-DD')\n ELSE to_char(local_period, 'YYYY-MM-DD')\n END AS display,\n local_period AS date,\n sum(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0) * car.efficiency * 1000) / \n convert_km(sum(distance)::numeric, '$length_unit') as efficiency_net_$length_unit\nFROM data\nJOIN cars car ON car.id = car_id\nWHERE\n car_id = $car_id AND\n $__timeFilter(start_date)\nGROUP BY date\nORDER BY date",
"rawSql": "WITH data AS (\n SELECT\n drives.*,\n date_trunc('$period', TIMEZONE('$__timezone', TIMEZONE('UTC', start_date))) as date\n FROM drives)\nSELECT\n EXTRACT(EPOCH FROM TIMEZONE('$__timezone', date))*1000 AS date_from,\n EXTRACT(EPOCH FROM (TIMEZONE('$__timezone', date) + ('1 ' || '$period')::INTERVAL))*1000 AS date_to,\n CASE '$period'\n WHEN 'month' THEN to_char(date, 'YYYY Month')\n WHEN 'year' THEN to_char(date, 'YYYY')\n WHEN 'week' THEN 'week ' || to_char(date, 'WW') || ' starting ' || to_char(date, 'YYYY-MM-DD')\n ELSE to_char(date, 'YYYY-MM-DD')\n END AS display,\n TIMEZONE('$__timezone', date) AS date,\n sum(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0) * car.efficiency * 1000) / \n convert_km(sum(distance)::numeric, '$length_unit') as efficiency_net_$length_unit\nFROM data\nJOIN cars car ON car.id = car_id\nWHERE\n car_id = $car_id AND\n $__timeFilter(start_date)\nGROUP BY date\nORDER BY date",
"refId": "C",
"select": [
[
@@ -713,6 +743,7 @@
"avg_cost_mi": 20,
"avg_cost_kwh": 11,
"avg_outside_temp_c": 5,
"avg_outside_temp_f": 5,
"cnt": 6,
"cnt_charges": 11,
"cost_charges": 10,
@@ -756,7 +787,7 @@
}
],
"refresh": false,
"schemaVersion": 36,
"schemaVersion": 39,
"style": "dark",
"tags": ["tesla"],
"templating": {
@@ -899,30 +930,7 @@
{
"current": {
"selected": false,
"text": "Europe/Berlin",
"value": "Europe/Berlin"
},
"datasource": "TeslaMate",
"definition": "select current_setting('TIMEZONE'), name from pg_timezone_names where abbrev ~ '^[a-zA-Z]{3,4}$' and name not like 'posix%' order by 2;",
"hide": 0,
"includeAll": false,
"label": "Time zone",
"multi": false,
"name": "timezone",
"options": [],
"query": "select current_setting('TIMEZONE'), name from pg_timezone_names where abbrev ~ '^[a-zA-Z]{3,4}$' and name not like 'posix%' order by 2;",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {
"selected": false,
"text": "http://localhost:4000",
"value": "http://localhost:4000"
},
@@ -965,7 +973,7 @@
},
"timezone": "browser",
"title": "Statistics",
"uid": "1EZnXszMk",
"version": 1,
"uid": "1EZnXszMl",
"version": 2,
"weekStart": ""
}

View File

@@ -11,13 +11,19 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.1.2"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "postgres",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
}
],
"annotations": {
@@ -30,6 +36,7 @@
},
"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",
"type": "dashboard"
@@ -81,7 +88,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -116,13 +123,14 @@
"y": 1
},
"id": 2,
"links": [],
"maxDataPoints": 10000000,
"options": {
"basemap": {
"config": {},
"config": {
"server": "streets"
},
"name": "Layer 0",
"type": "osm-standard"
"type": "esri-xyz"
},
"controls": {
"mouseWheelZoom": true,
@@ -181,7 +189,7 @@
}
],
"tooltip": {
"mode": "details"
"mode": "none"
},
"view": {
"allLayers": true,
@@ -191,18 +199,18 @@
"zoom": 15
}
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\n to_timestamp(floor((extract('epoch' FROM date) / 60)) * 60) AT TIME ZONE 'UTC' AS time,\n avg(latitude) as latitude,\n avg(longitude) as longitude\nFROM\n positions\nWHERE\n car_id = $car_id\nAND\n $__timeFilter(date)\nGROUP BY\n 1\nORDER BY\n 1\nASC",
"rawSql": "SELECT\n date_trunc('minute', date) as time,\n avg(latitude) as latitude,\n avg(longitude) as longitude\nFROM\n positions\nWHERE\n car_id = $car_id AND $__timeFilter(date)\nGROUP BY 1\nORDER BY 1",
"refId": "Positions",
"sql": {
"columns": [
@@ -222,20 +230,426 @@
}
}
],
"title": "MAP",
"type": "geomap"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 5,
"x": 0,
"y": 22
},
"id": 5,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "/.*/",
"values": false
},
"showPercentChange": false,
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT ROUND(convert_km((max(end_km) - min(start_km))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Distance Traveled\"\nFROM drives WHERE car_id = $car_id AND $__timeFilter(start_date)",
"refId": "distance traveled",
"select": [
[
{
"params": ["efficiency"],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "cars",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"type": "stat"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "light-yellow",
"value": null
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Total energy added"
},
"properties": [
{
"id": "unit",
"value": "kwatth"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Total energy used"
},
"properties": [
{
"id": "unit",
"value": "kwatth"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Charge Efficiency"
},
"properties": [
{
"id": "unit",
"value": "percent"
}
]
}
]
},
"gridPos": {
"h": 2,
"w": 14,
"x": 5,
"y": 22
},
"id": 6,
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": ["mean"]
},
"graphMode": "none",
"justifyMode": "center",
"orientation": "vertical",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showPercentChange": false,
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n\tsum(charge_energy_added) as \"Total energy added\"\nFROM\n\tcharging_processes\nWHERE\n\tcar_id = $car_id AND $__timeFilter(start_date) AND charge_energy_added > 0.01",
"refId": "Total energy added",
"select": [
[
{
"params": ["efficiency"],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "cars",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\r\n\tSUM(charge_energy_used) AS \"Total energy used\"\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\tcar_id = $car_id AND $__timeFilter(start_date) AND charge_energy_added > 0.01\r\n",
"refId": "Total energy used",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT\r\n\tSUM(charge_energy_added) * 100 / SUM(charge_energy_used) AS \"Charge Efficiency\"\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\tcar_id = $car_id AND $__timeFilter(start_date) AND charge_energy_added > 0.01\r\n",
"refId": "Charge Efficiency",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"type": "stat"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
"fieldConfig": {
"defaults": {
"decimals": 2,
"displayName": "Cost",
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#c7d0d9",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 5,
"x": 19,
"y": 22
},
"id": 7,
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": ["lastNotNull"]
},
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": true
},
"showPercentChange": false,
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "select sum(cost) as \"Cost\" from charging_processes where $__timeFilter(start_date) AND car_id = $car_id;",
"refId": "A",
"select": [
[
{
"params": ["latitude"],
"type": "column"
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "addresses",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"type": "stat"
}
],
"refresh": false,
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": ["tesla"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
@@ -256,12 +670,11 @@
"useTags": false
},
{
"current": {
"selected": false,
"text": "http://localhost:4000",
"value": "http://localhost:4000"
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"datasource": "TeslaMate",
"definition": "select base_url from settings limit 1;",
"hide": 2,
"includeAll": false,
@@ -278,6 +691,21 @@
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"current": {},
"definition": "SELECT unit_of_length FROM settings LIMIT 1",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "length_unit",
"options": [],
"query": "SELECT unit_of_length FROM settings LIMIT 1",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
@@ -313,6 +741,6 @@
"timezone": "",
"title": "Visited",
"uid": "RG_DxSmgk",
"version": 11,
"version": 12,
"weekStart": ""
}

View File

@@ -423,7 +423,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;",
"rawSql": "SELECT ROUND(convert_km((max(end_km) - min(start_km))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nFROM drives WHERE car_id = $car_id;",
"refId": "Mileage",
"select": [
[
@@ -472,7 +472,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT ROUND(convert_km(max(odometer)::numeric, '$length_unit'),0) || ' $length_unit' as \"Odometer\"\nfrom positions where car_id = $car_id;",
"rawSql": "SELECT ROUND(convert_km(max(end_km)::numeric, '$length_unit'),0) || ' $length_unit' as \"Odometer\"\nFROM drives WHERE car_id = $car_id;",
"refId": "Odometer",
"select": [
[
@@ -1836,6 +1836,6 @@
"timezone": "browser",
"title": "Battery Health V2",
"uid": "jchmRiqUfXgRx",
"version": 23,
"version": 24,
"weekStart": ""
}

View File

@@ -1,15 +1,15 @@
{
"__elements": [],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "8.5.15"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "postgres",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
@@ -31,9 +31,9 @@
{
"builtIn": 1,
"datasource": "-- Grafana --",
"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",
"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": {
@@ -50,7 +50,6 @@
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"iteration": 1686816148286,
"links": [
{
"icon": "dashboard",
@@ -84,7 +83,7 @@
"panels": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "Browse your charges by Geofence, Location, Type, Cost and Duration in order to have an accurate Total of kWh added and their respective costs",
@@ -95,7 +94,9 @@
},
"custom": {
"align": "center",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"filterable": false,
"inspect": false,
"minWidth": 150
@@ -276,8 +277,10 @@
"value": 1
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.align"
@@ -478,8 +481,10 @@
"value": 1
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.align"
@@ -518,11 +523,11 @@
"properties": [
{
"id": "displayName",
"value": "km / h"
"value": "Range added"
},
{
"id": "unit",
"value": "lengthkm"
"value": "velocitykmh"
},
{
"id": "custom.align"
@@ -533,7 +538,7 @@
},
{
"id": "custom.minWidth",
"value": 70
"value": 120
}
]
},
@@ -561,6 +566,32 @@
{
"id": "custom.minWidth",
"value": 70
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
},
{
"color": "super-light-green",
"value": 50
},
{
"color": "super-light-red",
"value": 68
}
]
}
}
]
},
@@ -599,18 +630,22 @@
"properties": [
{
"id": "displayName",
"value": "mi / h"
"value": "Range added"
},
{
"id": "unit",
"value": "none"
"value": "velocitymph"
},
{
"id": "custom.align"
},
{
"id": "decimals",
"value": 0
},
{
"id": "custom.minWidth",
"value": 70
"value": 120
}
]
},
@@ -687,8 +722,11 @@
"value": 0
},
{
"id": "custom.displayMode",
"value": "basic"
"id": "custom.cellOptions",
"value": {
"mode": "basic",
"type": "gauge"
}
},
{
"id": "color",
@@ -795,12 +833,16 @@
"value": "Type"
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "custom.displayMode",
"value": "color-text"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "color",
@@ -824,9 +866,10 @@
"y": 0
},
"id": 6,
"links": [],
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": ["sum"],
"show": false
@@ -834,11 +877,11 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "8.5.15",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -866,7 +909,6 @@
}
],
"title": "Charges: $charge_type",
"transformations": [],
"type": "table"
},
{
@@ -914,7 +956,6 @@
"y": 21
},
"id": 10,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -926,9 +967,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.15",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
@@ -998,7 +1041,6 @@
"y": 21
},
"id": 12,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -1010,9 +1052,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.15",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
@@ -1083,7 +1127,6 @@
"y": 21
},
"id": 14,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -1095,9 +1138,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.15",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
@@ -1169,7 +1214,6 @@
"y": 21
},
"id": 15,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -1181,9 +1225,11 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "8.5.15",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
@@ -1210,15 +1256,14 @@
}
],
"refresh": "",
"schemaVersion": 36,
"style": "dark",
"schemaVersion": 39,
"tags": ["TeslamateCustomDashboards"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
@@ -1241,7 +1286,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_length from settings limit 1;",
@@ -1264,7 +1309,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_temperature from settings limit 1;",
@@ -1287,7 +1332,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select preferred_range from settings limit 1;",
@@ -1309,7 +1354,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select base_url from settings limit 1;",
@@ -1332,7 +1377,7 @@
"allValue": "-1",
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;",
@@ -1376,7 +1421,7 @@
{
"allValue": "",
"current": {
"selected": true,
"selected": false,
"text": ["All"],
"value": ["$__all"]
},
@@ -1481,6 +1526,6 @@
"timezone": "",
"title": "Browse Charges",
"uid": "jchmTSmNYvRRk",
"version": 4,
"version": 5,
"weekStart": ""
}

View File

@@ -44,9 +44,9 @@
"$$hashKey": "object:75",
"builtIn": 1,
"datasource": "-- Grafana --",
"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",
"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": {
@@ -2543,7 +2543,7 @@
},
{
"id": "custom.align",
"value": "right"
"value": "center"
}
]
},
@@ -2565,7 +2565,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
}
]
},
@@ -2603,7 +2603,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
},
{
"id": "custom.cellOptions",
@@ -2669,7 +2669,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
}
]
},
@@ -2689,7 +2689,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
},
{
"id": "custom.cellOptions",
@@ -2733,7 +2733,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
}
]
},
@@ -2753,11 +2753,11 @@
},
{
"id": "custom.width",
"value": 200
"value": 203
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
}
]
},
@@ -2796,7 +2796,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
}
]
},
@@ -2816,7 +2816,7 @@
},
{
"id": "custom.width",
"value": 200
"value": 203
},
{
"id": "noValue",
@@ -2838,7 +2838,7 @@
},
{
"id": "custom.align",
"value": "auto"
"value": "center"
}
]
},
@@ -2848,13 +2848,39 @@
"options": "/avg_outside_temp_f/"
},
"properties": [
{
"id": "unit",
"value": "fahrenheit"
},
{
"id": "displayName",
"value": "Temperature"
},
{
"id": "unit",
"value": "fahrenheit"
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
},
{
"id": "thresholds",
"value": {
"mode": "absolute",
"steps": [
{
"color": "super-light-blue",
"value": null
},
{
"color": "super-light-green",
"value": 50
},
{
"color": "super-light-red",
"value": 68
}
]
}
},
{
"id": "custom.align",
@@ -3094,6 +3120,7 @@
"indexByName": {
"avg_consumption_kwh": 8,
"avg_outside_temp_c": 3,
"avg_outside_temp_f": 3,
"cnt_charges": 7,
"cost_charges": 5,
"date": 1,
@@ -3105,7 +3132,8 @@
"efficiency_charged_net_km_temp": 13,
"efficiency_net_km": 9,
"sum_consumption_kwh": 6,
"sum_distance_km": 2
"sum_distance_km": 2,
"sum_distance_mi": 2
},
"renameByName": {
"avg_consumption_kwh": "Avg charged",
@@ -3265,13 +3293,13 @@
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "WITH data AS (\n\tSELECT c.charging_process_id \n\tFROM charges c\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\n\tWHERE \n\t\tcp.car_id = $car_id AND NOT c.fast_charger_present\n GROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) , 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.cost IS NOT NULL\n AND cp.id IN (data.charging_process_id);",
"definition": "WITH data AS (\n\tSELECT c.charging_process_id \n\tFROM charges c\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\n\tWHERE \n\t\tcp.car_id = $car_id AND c.charger_voltage != 2\n AND c.fast_charger_present IS NOT true\n GROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) , 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.cost IS NOT NULL\n AND cp.id IN (data.charging_process_id);",
"hide": 2,
"includeAll": false,
"multi": false,
"name": "ACCost",
"options": [],
"query": "WITH data AS (\n\tSELECT c.charging_process_id \n\tFROM charges c\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\n\tWHERE \n\t\tcp.car_id = $car_id AND NOT c.fast_charger_present\n GROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) , 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.cost IS NOT NULL\n AND cp.id IN (data.charging_process_id);",
"query": "WITH data AS (\n\tSELECT c.charging_process_id \n\tFROM charges c\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\n\tWHERE \n\t\tcp.car_id = $car_id AND c.charger_voltage != 2\n AND c.fast_charger_present IS NOT true\n GROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) , 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.cost IS NOT NULL\n AND cp.id IN (data.charging_process_id);",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
@@ -3303,13 +3331,14 @@
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\nfrom positions where car_id = $car_id AND $__timeFilter(date)",
"definition": "SELECT ROUND(convert_km((max(end_km) - min(start_km))::numeric, '$length_unit'),0) as \"Mileage\"\nFROM drives WHERE car_id = $car_id AND $__timeFilter(end_date)",
"error": {},
"hide": 2,
"includeAll": false,
"multi": false,
"name": "distance_driven",
"options": [],
"query": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\nfrom positions where car_id = $car_id AND $__timeFilter(date)",
"query": "SELECT ROUND(convert_km((max(end_km) - min(start_km))::numeric, '$length_unit'),0) as \"Mileage\"\nFROM drives WHERE car_id = $car_id AND $__timeFilter(end_date)",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
@@ -3399,6 +3428,6 @@
"timezone": "",
"title": "Charging Costs Stats",
"uid": "jchmDdLe5uFVk",
"version": 16,
"version": 18,
"weekStart": ""
}

View File

@@ -5,11 +5,11 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.1.2"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "postgres",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
@@ -29,9 +29,9 @@
"type": "datasource",
"uid": "grafana"
},
"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",
"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": {
@@ -81,7 +81,7 @@
"panels": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "This dashboard has a table with all the trips you've made between charges sessions, so you can browse the longest or shortest mileage you travel.\n\nYou may also take a look to a specific trip from the initial charge session (before the trip) to the end of the of the charge session (after the trip), through the link in the first column that will take you to the Trips dashboard.",
@@ -206,6 +206,22 @@
{
"id": "custom.minWidth",
"value": 200
},
{
"id": "custom.cellOptions",
"value": {
"type": "gauge"
}
},
{
"id": "color",
"value": {
"mode": "continuous-BlPu"
}
},
{
"id": "max",
"value": 400
}
]
},
@@ -416,7 +432,7 @@
{
"matcher": {
"id": "byName",
"options": "outside_temp_f"
"options": "avg_temp_f"
},
"properties": [
{
@@ -556,7 +572,6 @@
"y": 0
},
"id": 2,
"links": [],
"options": {
"cellHeight": "sm",
"footer": {
@@ -568,12 +583,12 @@
"showHeader": true,
"sortBy": []
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"alias": "",
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
@@ -620,20 +635,18 @@
}
],
"title": "Long Trips",
"transformations": [],
"type": "table"
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": ["TeslamateCustomDashboards"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC",
@@ -653,7 +666,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT unit_of_length FROM settings limit 1",
@@ -676,7 +689,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT base_url FROM settings LIMIT 1",
@@ -698,6 +711,10 @@
},
{
"current": {},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT preferred_range FROM settings LIMIT 1",
"hide": 2,
"includeAll": false,
@@ -714,7 +731,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT unit_of_temperature FROM settings LIMIT 1",
@@ -805,6 +822,6 @@
"timezone": "",
"title": "Continuous Trips",
"uid": "jchmY8upc6ZRk",
"version": 5,
"version": 7,
"weekStart": ""
}

View File

@@ -17,7 +17,13 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.1.2"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
{
"type": "panel",
@@ -25,12 +31,6 @@
"name": "Pie chart",
"version": ""
},
{
"type": "datasource",
"id": "postgres",
"name": "PostgreSQL",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
@@ -53,9 +53,9 @@
"type": "datasource",
"uid": "grafana"
},
"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",
"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": {
@@ -105,7 +105,7 @@
"panels": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "Only distinguishes between online, offline and asleep.",
@@ -132,7 +132,6 @@
"y": 0
},
"id": 6,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -147,13 +146,15 @@
"fields": "/^state$/",
"values": true
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -187,7 +188,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "This dasboard is just to see the current state of the car with the last data recorded by TeslaMate.\n\nAdditionally, you can see the states stats of the selected period.",
@@ -215,7 +216,6 @@
"y": 0
},
"id": 2,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -230,13 +230,15 @@
"fields": "/^time$/",
"values": true
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -270,7 +272,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
@@ -333,7 +335,6 @@
"y": 0
},
"id": 69,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -348,13 +349,15 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "time_series",
@@ -386,7 +389,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
@@ -449,7 +452,6 @@
"y": 0
},
"id": 70,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -464,13 +466,15 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -502,7 +506,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -551,6 +555,8 @@
},
"id": 85,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": ["mean"],
@@ -558,13 +564,14 @@
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -592,7 +599,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
@@ -620,7 +627,6 @@
"y": 0
},
"id": 71,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -635,13 +641,15 @@
"fields": "",
"values": true
},
"textMode": "value_and_name"
"showPercentChange": false,
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -675,7 +683,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -711,7 +719,6 @@
"y": 3
},
"id": 86,
"links": [],
"maxDataPoints": 50000,
"options": {
"basemap": {
@@ -786,12 +793,12 @@
"zoom": 15
}
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"alias": "",
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
@@ -869,7 +876,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -902,6 +909,8 @@
},
"id": 59,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": ["firstNotNull"],
@@ -909,13 +918,14 @@
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -949,7 +959,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -982,6 +992,8 @@
},
"id": 63,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": ["firstNotNull"],
@@ -989,13 +1001,14 @@
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1029,7 +1042,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1062,6 +1075,8 @@
},
"id": 61,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": ["firstNotNull"],
@@ -1069,13 +1084,14 @@
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1109,7 +1125,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1149,14 +1165,16 @@
"fields": "/^coalesce$/",
"values": false
},
"showPercentChange": false,
"text": {},
"textMode": "value"
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1188,7 +1206,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1203,56 +1221,103 @@
"viz": false
}
},
"mappings": [
{
"options": {
"0": {
"color": "super-light-blue",
"index": 0,
"text": "online"
},
"1": {
"color": "purple",
"index": 1,
"text": "driving"
},
"2": {
"color": "yellow",
"index": 2,
"text": "charging"
},
"3": {
"color": "super-light-orange",
"index": 3,
"text": "offline"
},
"4": {
"color": "green",
"index": 4,
"text": "asleep"
},
"5": {
"color": "super-light-blue",
"index": 5,
"text": "online"
},
"6": {
"color": "red",
"index": 6,
"text": "updating"
},
"null": {
"index": 7,
"text": "N/A"
}
},
"type": "value"
}
],
"fieldMinMax": false,
"mappings": [],
"noValue": "0",
"unit": "dtdhms"
},
"overrides": []
"overrides": [
{
"matcher": {
"id": "byName",
"options": "offline"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "super-light-orange",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "online"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#6ed0e0",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "driving"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-purple",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "charging"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-yellow",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "updating"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "asleep"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "green",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 9,
@@ -1284,9 +1349,10 @@
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
@@ -1301,6 +1367,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "cars",
"timeColumn": "inserted_at",
"timeColumnType": "timestamp",
@@ -1318,7 +1401,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1391,13 +1474,15 @@
"fields": "",
"values": false
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1429,7 +1514,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1489,13 +1574,15 @@
"fields": "/^version$/",
"values": true
},
"textMode": "value"
"showPercentChange": false,
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1529,7 +1616,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1641,7 +1728,7 @@
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1674,16 +1761,14 @@
"type": "state-timeline"
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": ["TeslamateCustomDashboards"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
@@ -1706,7 +1791,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select base_url from settings limit 1;",
@@ -1729,7 +1814,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_length from settings limit 1;",
@@ -1748,7 +1833,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_temperature from settings limit 1;",
@@ -1767,7 +1852,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select preferred_range from settings limit 1;",
@@ -1786,7 +1871,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_pressure from settings limit 1;",
@@ -1836,6 +1921,6 @@
"timezone": "",
"title": "Current State",
"uid": "jchmo4BNRkZz",
"version": 11,
"version": 12,
"weekStart": ""
}

View File

@@ -5,11 +5,11 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.1.2"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "postgres",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
@@ -44,9 +44,9 @@
"$$hashKey": "object:75",
"builtIn": 1,
"datasource": "-- Grafana --",
"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",
"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": {
@@ -96,15 +96,16 @@
"panels": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-RdYlGr"
"mode": "continuous-GrYlRd"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
@@ -165,7 +166,6 @@
"y": 0
},
"id": 32,
"links": [],
"options": {
"legend": {
"calcs": [],
@@ -210,7 +210,7 @@
{
"alias": "",
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
@@ -257,7 +257,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -292,7 +292,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -337,11 +337,11 @@
},
"showHeader": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -374,7 +374,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -417,7 +417,6 @@
"y": 16
},
"id": 35,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -429,13 +428,15 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -465,13 +466,12 @@
}
],
"title": "Avg. Energy Added",
"transformations": [],
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -514,7 +514,6 @@
"y": 16
},
"id": 36,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -526,13 +525,15 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -562,13 +563,12 @@
}
],
"title": "Avg. Energy Used",
"transformations": [],
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -611,7 +611,6 @@
"y": 16
},
"id": 34,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -623,13 +622,15 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -659,13 +660,12 @@
}
],
"title": "Avg. Time",
"transformations": [],
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -707,7 +707,6 @@
"y": 16
},
"id": 37,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -719,13 +718,15 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -755,13 +756,12 @@
}
],
"title": "Avg. Cost",
"transformations": [],
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -803,7 +803,6 @@
"y": 16
},
"id": 38,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
@@ -815,13 +814,15 @@
"fields": "",
"values": false
},
"textMode": "auto"
"showPercentChange": false,
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -851,12 +852,11 @@
}
],
"title": "Avg. Cost per kWh",
"transformations": [],
"transparent": true,
"type": "stat"
},
{
"collapsed": true,
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
@@ -864,78 +864,76 @@
"y": 20
},
"id": 42,
"panels": [
{
"datasource": {
"type": "postgres",
"uid": "TeslaMate"
},
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 21
},
"id": 40,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "#### DC Charing curves by Carrier\n\nTo analyse data with this dashboard, it's important that you \nhave Geo-Fences added related with the name of the carrier\nyou have recharged your car, or you may want to edit \nperiodically the **name** field of the **addresses** table,\nso that it contains its name. \n\nFor example, if **Teslamate** geolocates the name as \n*\"Esso Purley Way\"* you may modify it to \n*\"Esso Purley Way - IONITY\"* or *\"IONITY Esso Purley Way\"*, \nthen you can filter using\nthe textbox above as **IONITY** to show all the charging curves\nof all charging sessions at that carrier.",
"mode": "markdown"
},
"pluginVersion": "10.1.2",
"targets": [
{
"datasource": {
"type": "postgres",
"uid": "TeslaMate"
},
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": false,
"rawSql": "SELECT\n start_date AS \"time\",\n start_km\nFROM drives\nWHERE\n $__timeFilter(start_date)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": ["start_km"],
"type": "column"
}
]
],
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"type": "text"
}
],
"panels": [],
"title": "Help",
"type": "row"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 21
},
"id": 40,
"options": {
"code": {
"language": "plaintext",
"showLineNumbers": false,
"showMiniMap": false
},
"content": "#### DC Charing curves by Carrier\n\nTo analyse data with this dashboard, it's important that you \nhave Geo-Fences added related with the name of the carrier\nyou have recharged your car, or you may want to edit \nperiodically the **name** field of the **addresses** table,\nso that it contains its name. \n\nFor example, if **Teslamate** geolocates the name as \n*\"Esso Purley Way\"* you may modify it to \n*\"Esso Purley Way - IONITY\"* or *\"IONITY Esso Purley Way\"*, \nthen you can filter using\nthe textbox above as **IONITY** to show all the charging curves\nof all charging sessions at that carrier.",
"mode": "markdown"
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": false,
"rawSql": "SELECT\n start_date AS \"time\",\n start_km\nFROM drives\nWHERE\n $__timeFilter(start_date)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": ["start_km"],
"type": "column"
}
]
],
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"type": "text"
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": ["TeslamateCustomDashboards"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
@@ -958,7 +956,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select base_url from settings limit 1;",
@@ -1021,6 +1019,6 @@
"timezone": "",
"title": "DC Charging Curves by Carrier",
"uid": "jchmXpkcccIkh",
"version": 6,
"version": 7,
"weekStart": ""
}

View File

@@ -1140,7 +1140,7 @@
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT '2024.04.02' AS \"Current Version\"",
"rawSql": "SELECT '2024.04.17' AS \"Current Version\"",
"refId": "DashboardVersion",
"sql": {
"columns": [

View File

@@ -11,11 +11,11 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.1.2"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "postgres",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
@@ -31,9 +31,9 @@
{
"builtIn": 1,
"datasource": "-- Grafana --",
"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",
"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": {
@@ -97,7 +97,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
@@ -329,12 +329,12 @@
}
]
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"repeatDirection": "h",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -491,7 +491,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "With this dashboard you may analize your mileage and number of drives by year, month, week or day.\n\nThe dashboard shows a table with the selected period, time driven, distance, number of drives and efficiency then a bar chart to have a better look for comparison.",
@@ -501,6 +501,7 @@
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
@@ -621,9 +622,10 @@
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
@@ -638,6 +640,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
@@ -656,7 +675,12 @@
"id": "filterFieldsByName",
"options": {
"include": {
"names": ["sum_distance_km", "cnt", "Period"]
"names": [
"Period",
"sum_distance_mi",
"cnt",
"sum_distance_km"
]
}
}
}
@@ -665,15 +689,14 @@
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": ["TeslamateCustomDashboards"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
@@ -696,7 +719,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_length from settings limit 1;",
@@ -719,7 +742,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select base_url from settings limit 1;",
@@ -741,7 +764,7 @@
},
{
"current": {
"selected": true,
"selected": false,
"text": "month",
"value": "month"
},
@@ -811,6 +834,6 @@
"timezone": "",
"title": "Mileage Stats",
"uid": "jchmNjtMTFx",
"version": 4,
"version": 5,
"weekStart": ""
}

View File

@@ -11,11 +11,11 @@
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.1.2"
"version": "10.4.0"
},
{
"type": "datasource",
"id": "postgres",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
@@ -41,9 +41,9 @@
"type": "datasource",
"uid": "grafana"
},
"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",
"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": {
@@ -93,7 +93,7 @@
"panels": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "This dashboard is meant to analize a drive based on a date you select, then you can pass the pointer over the lines in graph to see data details and a blue point in the map tranking the route. With this option you can analized a specific point location in the map, to see the speed, power, SOC, elevation and if battery heater was on.\n\nBe aware that the drive you select in the dropdown list from the top could be outside the time range of the Timeline graph, if its the case you have to click on the \"Zoom to data\" button on the graph in order to update it.\n\nTip: On Grafana you can press \"h\" to get a keyboard shortcuts if you want to change the current Zoom out time range or use the mouse to select/change the time range.",
@@ -103,10 +103,11 @@
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisBorderShow": false,
"axisCenteredZero": true,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"axisPlacement": "left",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
@@ -117,7 +118,7 @@
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineInterpolation": "smooth",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
@@ -175,18 +176,6 @@
}
]
},
{
"matcher": {
"id": "byName",
"options": "elevation_m"
},
"properties": [
{
"id": "displayName",
"value": "Elevation (m)"
}
]
},
{
"matcher": {
"id": "byName",
@@ -220,6 +209,13 @@
{
"id": "displayName",
"value": "SOC (%)"
},
{
"id": "color",
"value": {
"fixedColor": "purple",
"mode": "fixed"
}
}
]
},
@@ -238,36 +234,6 @@
}
]
},
{
"matcher": {
"id": "byName",
"options": "Elevation"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "#ccccdc",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Elevation (m)"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "text",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
@@ -285,93 +251,48 @@
},
{
"matcher": {
"id": "byName",
"options": "Rated Efficiency (kWh/100km)"
"id": "byRegexp",
"options": "/elevation_*/"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-green",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "SOC (%)"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-purple",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Speed (km/h)"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-blue",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "speed_kmh"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-blue",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Elevation"
},
"properties": [
{
"id": "decimals",
"value": 0
"id": "displayName",
"value": "Elevation"
},
{
"id": "min",
"value": 0
"id": "color",
"value": {
"fixedColor": "text",
"mode": "fixed"
}
},
{
"id": "custom.axisPlacement",
"value": "right"
}
]
},
{
"matcher": {
"id": "byName",
"options": "Elevation (m)"
"options": "elevation_ft"
},
"properties": [
{
"id": "decimals",
"value": 0
},
"id": "unit",
"value": "lengthft"
}
]
},
{
"matcher": {
"id": "byName",
"options": "elevation_m"
},
"properties": [
{
"id": "min",
"value": 0
"id": "unit",
"value": "lengthm"
}
]
}
@@ -385,7 +306,6 @@
},
"hideTimeOverride": false,
"id": 8,
"links": [],
"options": {
"legend": {
"calcs": [],
@@ -403,9 +323,10 @@
{
"alias": "",
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "time_series",
"group": [],
"hide": false,
@@ -421,6 +342,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "charging",
"timeColumn": "Datum",
"timeColumnType": "timestamp",
@@ -438,14 +376,14 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "red",
"mode": "thresholds"
"mode": "fixed"
},
"custom": {
"hideFrom": {
@@ -474,13 +412,14 @@
"y": 0
},
"id": 18,
"links": [],
"maxDataPoints": 50000,
"options": {
"basemap": {
"config": {},
"config": {
"server": "streets"
},
"name": "Layer 0",
"type": "osm-standard"
"type": "esri-xyz"
},
"controls": {
"mouseWheelZoom": true,
@@ -513,7 +452,7 @@
},
"symbol": {
"field": "",
"fixed": "",
"fixed": "img/icons/marker/triangle.svg",
"mode": "fixed"
},
"symbolAlign": {
@@ -539,7 +478,7 @@
}
],
"tooltip": {
"mode": "details"
"mode": "none"
},
"view": {
"allLayers": true,
@@ -549,12 +488,12 @@
"zoom": 15
}
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"alias": "",
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
@@ -632,7 +571,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
@@ -695,6 +634,22 @@
"value": "Wh/km"
}
]
},
{
"matcher": {
"id": "byName",
"options": "mi"
},
"properties": [
{
"id": "displayName",
"value": "Consumption"
},
{
"id": "unit",
"value": "Wh/mi"
}
]
}
]
},
@@ -705,7 +660,6 @@
"y": 17
},
"id": 14,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -717,16 +671,18 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {
"titleSize": 16
},
"textMode": "value_and_name"
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -734,7 +690,7 @@
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT ((DATE_PART('day', end_date - start_date) * 24 + \n DATE_PART('hour', end_date - start_date)) * 60 +\n DATE_PART('minute', end_date - start_date)) * 60 +\n DATE_PART('second', end_date - start_date) as sec_diff\nFROM drives\nWHERE drives.id = $journey;",
"refId": "A",
"refId": "Duration",
"select": [
[
{
@@ -756,16 +712,17 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "select\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency) *1000 /\n\t convert_km(distance::numeric, '$length_unit') as \"$length_unit\"\nfrom drives d\nJOIN cars car ON car.id = car_id\nwhere d.id = $journey;",
"refId": "Distance",
"refId": "Consumption",
"select": [
[
{
@@ -774,6 +731,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
@@ -790,7 +764,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"description": "",
@@ -860,7 +834,7 @@
"properties": [
{
"id": "unit",
"value": "velocitymih"
"value": "velocitymph"
},
{
"id": "displayName",
@@ -893,7 +867,6 @@
"y": 17
},
"id": 12,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -905,16 +878,18 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {
"titleSize": 16
},
"textMode": "auto"
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -922,7 +897,7 @@
"metricColumn": "none",
"rawQuery": true,
"rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $journey;",
"refId": "A",
"refId": "Distance",
"select": [
[
{
@@ -944,7 +919,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -953,7 +928,7 @@
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n\tAVG(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h\nFROM\n\tpositions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)",
"refId": "B",
"refId": "Speed",
"select": [
[
{
@@ -978,7 +953,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1016,7 +991,6 @@
"y": 17
},
"id": 16,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
@@ -1028,16 +1002,18 @@
"fields": "",
"values": false
},
"showPercentChange": false,
"text": {
"titleSize": 16
},
"textMode": "value"
"textMode": "value",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"format": "table",
@@ -1071,7 +1047,7 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"fieldConfig": {
@@ -1109,23 +1085,26 @@
"fields": "/.*/",
"values": false
},
"showPercentChange": false,
"text": {
"titleSize": 16
},
"textMode": "value_and_name"
"textMode": "value_and_name",
"wideLayout": true
},
"pluginVersion": "10.1.2",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH height as (SELECT\n\televation-LAG(elevation,1) over ( order BY\n\tdate ASC ) as diff\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND (date BETWEEN (SELECT start_date FROM drives WHERE id = $journey) AND (SELECT end_date FROM drives WHERE id = $journey))\nORDER BY\n\tdate ASC\n\t)\nselect convert_m(sum(diff), '$alternative_length_unit') || ' $alternative_length_unit' as \"Up\" from height where diff > 0",
"rawSql": "WITH height as (SELECT\n\televation-LAG(elevation,1) over ( order BY\n\tdate ASC ) as diff\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND (date BETWEEN (SELECT start_date FROM drives WHERE id = $journey) AND (SELECT end_date FROM drives WHERE id = $journey))\nORDER BY\n\tdate ASC\n\t)\nselect ROUND(convert_m(sum(diff), '$alternative_length_unit')::numeric,0) || ' $alternative_length_unit' as \"Up\" from height where diff > 0",
"refId": "A",
"select": [
[
@@ -1135,6 +1114,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
@@ -1148,15 +1144,16 @@
},
{
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"editorMode": "code",
"format": "table",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "WITH height as (SELECT\n\televation-LAG(elevation,1) over ( order BY\n\tdate ASC ) as diff\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND (date BETWEEN (SELECT start_date FROM drives WHERE id = $journey) AND (SELECT end_date FROM drives WHERE id = $journey))\nORDER BY\n\tdate ASC\n\t)\n\t\n\t\nselect convert_m(sum(diff), '$alternative_length_unit') || ' $alternative_length_unit' as \"Down\" from height where diff < 0",
"rawSql": "WITH height as (SELECT\n\televation-LAG(elevation,1) over ( order BY\n\tdate ASC ) as diff\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND (date BETWEEN (SELECT start_date FROM drives WHERE id = $journey) AND (SELECT end_date FROM drives WHERE id = $journey))\nORDER BY\n\tdate ASC\n\t)\n\t\n\t\nselect ROUND(convert_m(sum(diff), '$alternative_length_unit')::numeric,0) || ' $alternative_length_unit' as \"Down\" from height where diff < 0",
"refId": "B",
"select": [
[
@@ -1166,6 +1163,23 @@
}
]
],
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "drives",
"timeColumn": "start_date",
"timeColumnType": "timestamp",
@@ -1183,15 +1197,14 @@
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"schemaVersion": 39,
"tags": ["TeslamateCustomDashboards"],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select unit_of_length from settings limit 1;",
@@ -1210,7 +1223,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;",
@@ -1229,7 +1242,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;",
@@ -1252,7 +1265,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;",
@@ -1271,7 +1284,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "(SELECT TO_CHAR(start_date, 'MM') as month FROM drives WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1)\nUNION ALL\n(SELECT TO_CHAR(start_date, 'MM') as month FROM drives WHERE car_id = $car_id AND TO_CHAR(start_date, 'YYYY') = '$Year'\nGROUP BY 1\nORDER BY 1);",
@@ -1290,7 +1303,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "(SELECT TO_CHAR(start_date, 'DD') as day FROM drives WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1)\nUNION ALL\n(SELECT TO_CHAR(start_date, 'DD') as day FROM drives \nWHERE car_id = $car_id AND TO_CHAR(start_date, 'YYYY') = '$Year' AND TO_CHAR(start_date, 'MM') = '$Month'\nGROUP BY 1 ORDER BY 1);",
@@ -1309,7 +1322,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "WITH data AS (\n SELECT\n drives.id as drive_id,\n start_date,\n COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city)) AS start_address,\n COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city)) AS end_address\n FROM drives\n LEFT JOIN addresses start_address ON start_address_id = start_address.id\n LEFT JOIN addresses end_address ON end_address_id = end_address.id\n LEFT JOIN positions start_position ON start_position_id = start_position.id\n LEFT JOIN positions end_position ON end_position_id = end_position.id\n LEFT JOIN geofences start_geofence ON start_geofence_id = start_geofence.id\n LEFT JOIN geofences end_geofence ON end_geofence_id = end_geofence.id\n LEFT JOIN cars car ON car.id = drives.car_id\n WHERE drives.car_id = $car_id AND start_date::date = '$Year-$Month-$Day' AND distance > 0 \n ORDER BY start_date DESC\n)\nSELECT\n 'route=\"' || to_char(start_date:: timestamp, 'YYYY-MM-DD') || ' ' || start_address || ' ---> ' || end_address || '\" id=\"' || drive_id || '\"'AS journey\nFROM data;",
@@ -1329,7 +1342,7 @@
{
"current": {},
"datasource": {
"type": "postgres",
"type": "grafana-postgresql-datasource",
"uid": "TeslaMate"
},
"definition": "select preferred_range from settings limit 1;",
@@ -1348,8 +1361,8 @@
]
},
"time": {
"from": "2023-11-28T12:32:29.961Z",
"to": "2023-11-28T12:40:33.863Z"
"from": "now-15m",
"to": "now"
},
"timepicker": {
"hidden": true,
@@ -1358,6 +1371,6 @@
"timezone": "",
"title": "Tracking Drives",
"uid": "jchmX8upc6ZRk",
"version": 3,
"version": 6,
"weekStart": ""
}

View File

@@ -10,50 +10,50 @@ questions:
# Include{replicas1}
# Include{podSpec}
# Include{containerMain}
- variable: env
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: DISABLE_MQTT
label: "Mqtt Disabled"
description: "Disables the MQTT feature if true"
schema:
type: boolean
default: true
- variable: MQTT_HOST
label: "Mqtt Host"
description: "Hostname of the broker."
schema:
type: string
default: ""
show_if: [["DISABLE_MQTT", "=", false]]
- variable: MQTT_PORT
label: "Mqtt Port"
schema:
type: int
default: 1883
show_if: [["DISABLE_MQTT", "=", false]]
- variable: MQTT_USERNAME
label: "Mqtt Username"
description: "Username of the broker."
schema:
type: string
default: ""
show_if: [["DISABLE_MQTT", "=", false]]
- variable: MQTT_PASSWORD
label: "Mqtt Password"
description: "Password of the broker."
schema:
type: string
private: true
show_if: [["DISABLE_MQTT", "=", false]]
# Include{containerBasic}
# Include{containerAdvanced}
# Include{containerConfig}
# Include{podOptions}
- variable: env
group: "App Configuration"
label: "Image Environment"
schema:
additional_attrs: true
type: dict
attrs:
- variable: DISABLE_MQTT
label: "Mqtt Disabled"
description: "Disables the MQTT feature if true"
schema:
type: boolean
default: true
- variable: MQTT_HOST
label: "Mqtt Host"
description: "Hostname of the broker."
schema:
type: string
default: ""
show_if: [["DISABLE_MQTT", "=", false]]
- variable: MQTT_PORT
label: "Mqtt Port"
schema:
type: int
default: 1883
show_if: [["DISABLE_MQTT", "=", false]]
- variable: MQTT_USERNAME
label: "Mqtt Username"
description: "Username of the broker."
schema:
type: string
default: ""
show_if: [["DISABLE_MQTT", "=", false]]
- variable: MQTT_PASSWORD
label: "Mqtt Password"
description: "Password of the broker."
schema:
type: string
private: true
show_if: [["DISABLE_MQTT", "=", false]]
# Include{serviceRoot}
- variable: main
label: "Main Service"
@@ -80,8 +80,6 @@ questions:
# Include{externalInterfaces}
# Include{serviceList}
# Include{persistenceRoot}
# Include{persistenceBasic}
# Include{persistenceList}
# Include{ingressRoot}
- variable: main
@@ -116,11 +114,10 @@ questions:
type: int
default: 568
# Include{resources}
# Include{metrics}
# Include{prometheusRule}
# Include{postgresql}
# Include{advanced}
# Include{addons}
# Include{codeserver}
# Include{netshoot}
# Include{vpn}
# Include{netshoot}
# Include{documentation}

View File

@@ -1,7 +1,7 @@
image:
repository: teslamate/teslamate
pullPolicy: IfNotPresent
tag: 1.28.5@sha256:aa3f37ecccc7ea77fa1e259391c8f2a05533e208228a42ebb4dbe560828db057
tag: 1.29.1@sha256:7c833ef13585b46339b778bb974fa6ea0f908cb7b9d1a62b41aef694bfdb9ca0
securityContext:
container: