Skip to content

Commit f3d0dbd

Browse files
committed
Added "Initial SOC" panel, included SOC in "Charge detail" panel
1 parent c7a5fad commit f3d0dbd

2 files changed

Lines changed: 162 additions & 14 deletions

File tree

dashboards/current-charge-view.json

Lines changed: 162 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"fiscalYearStartMonth": 0,
5858
"graphTooltip": 1,
5959
"id": null,
60-
"iteration": 1673191705661,
60+
"iteration": 1673539449476,
6161
"links": [
6262
{
6363
"icon": "dashboard",
@@ -331,6 +331,117 @@
331331
"title": "Energy added",
332332
"type": "bargauge"
333333
},
334+
{
335+
"datasource": "TeslaMate",
336+
"fieldConfig": {
337+
"defaults": {
338+
"color": {
339+
"fixedColor": "light-green",
340+
"mode": "thresholds"
341+
},
342+
"decimals": 0,
343+
"mappings": [],
344+
"thresholds": {
345+
"mode": "absolute",
346+
"steps": [
347+
{
348+
"color": "#e24d42",
349+
"value": null
350+
},
351+
{
352+
"color": "#EAB839",
353+
"value": 10
354+
},
355+
{
356+
"color": "green",
357+
"value": 30
358+
},
359+
{
360+
"color": "#EF843C",
361+
"value": 90
362+
},
363+
{
364+
"color": "#E24D42",
365+
"value": 100
366+
}
367+
]
368+
},
369+
"unit": "percent"
370+
},
371+
"overrides": []
372+
},
373+
"gridPos": {
374+
"h": 3,
375+
"w": 2,
376+
"x": 10,
377+
"y": 1
378+
},
379+
"id": 40,
380+
"options": {
381+
"colorMode": "value",
382+
"graphMode": "none",
383+
"justifyMode": "auto",
384+
"orientation": "auto",
385+
"reduceOptions": {
386+
"calcs": [
387+
"first"
388+
],
389+
"fields": "",
390+
"values": true
391+
},
392+
"text": {},
393+
"textMode": "auto"
394+
},
395+
"pluginVersion": "8.5.6",
396+
"targets": [
397+
{
398+
"alias": "Real",
399+
"datasource": "TeslaMate",
400+
"format": "table",
401+
"group": [],
402+
"groupBy": [],
403+
"hide": false,
404+
"measurement": "km",
405+
"metricColumn": "none",
406+
"orderByTime": "ASC",
407+
"policy": "default",
408+
"query": "SELECT last(\"value\") FROM \"km\" WHERE (\"entity_id\" = 'ovms_v_b_range_ideal') ",
409+
"rawQuery": true,
410+
"rawSql": " SELECT battery_level as \"Initial SOC\" FROM charges \n\twhere charging_process_id=$charging_processes\n\tORDER BY DATE ASC\n \tLIMIT 1",
411+
"refId": "Inital SOC",
412+
"resultFormat": "time_series",
413+
"select": [
414+
[
415+
{
416+
"params": [
417+
"start_km"
418+
],
419+
"type": "column"
420+
}
421+
]
422+
],
423+
"table": "drives",
424+
"tags": [
425+
{
426+
"key": "entity_id",
427+
"operator": "=",
428+
"value": "ovms_v_b_range_ideal"
429+
}
430+
],
431+
"timeColumn": "start_date",
432+
"timeColumnType": "timestamp",
433+
"where": [
434+
{
435+
"name": "$__timeFilter",
436+
"params": [],
437+
"type": "macro"
438+
}
439+
]
440+
}
441+
],
442+
"title": "Initial SOC",
443+
"type": "stat"
444+
},
334445
{
335446
"datasource": "TeslaMate",
336447
"fieldConfig": {
@@ -368,8 +479,8 @@
368479
},
369480
"gridPos": {
370481
"h": 3,
371-
"w": 4,
372-
"x": 10,
482+
"w": 3,
483+
"x": 12,
373484
"y": 1
374485
},
375486
"id": 29,
@@ -443,7 +554,7 @@
443554
]
444555
}
445556
],
446-
"title": "Total charging time",
557+
"title": "Elapsed time",
447558
"type": "stat"
448559
},
449560
{
@@ -502,8 +613,8 @@
502613
},
503614
"gridPos": {
504615
"h": 3,
505-
"w": 4,
506-
"x": 14,
616+
"w": 3,
617+
"x": 15,
507618
"y": 1
508619
},
509620
"id": 23,
@@ -675,7 +786,6 @@
675786
"mode": "line"
676787
}
677788
},
678-
"decimals": 2,
679789
"links": [],
680790
"mappings": [],
681791
"thresholds": {
@@ -706,14 +816,22 @@
706816
},
707817
{
708818
"id": "custom.axisPlacement",
709-
"value": "right"
819+
"value": "hidden"
710820
},
711821
{
712822
"id": "color",
713823
"value": {
714824
"fixedColor": "#cec1c3",
715825
"mode": "fixed"
716826
}
827+
},
828+
{
829+
"id": "custom.hideFrom",
830+
"value": {
831+
"legend": true,
832+
"tooltip": false,
833+
"viz": false
834+
}
717835
}
718836
]
719837
},
@@ -736,7 +854,37 @@
736854
},
737855
{
738856
"id": "unit",
739-
"value": "none"
857+
"value": "kwatt"
858+
}
859+
]
860+
},
861+
{
862+
"matcher": {
863+
"id": "byName",
864+
"options": "SOC [%]"
865+
},
866+
"properties": [
867+
{
868+
"id": "unit",
869+
"value": "%"
870+
},
871+
{
872+
"id": "color",
873+
"value": {
874+
"fixedColor": "#d1f5ef",
875+
"mode": "fixed",
876+
"seriesBy": "last"
877+
}
878+
},
879+
{
880+
"id": "custom.thresholdsStyle",
881+
"value": {
882+
"mode": "off"
883+
}
884+
},
885+
{
886+
"id": "custom.axisPlacement",
887+
"value": "right"
740888
}
741889
]
742890
}
@@ -757,7 +905,7 @@
757905
"max",
758906
"min"
759907
],
760-
"displayMode": "list",
908+
"displayMode": "table",
761909
"placement": "bottom"
762910
},
763911
"tooltip": {
@@ -775,7 +923,7 @@
775923
"hide": false,
776924
"metricColumn": "none",
777925
"rawQuery": true,
778-
"rawSql": "SELECT\n\tdate AS \"time\",\n\t(case when charger_phases >= 1 then (case when charger_phases = 2 then 3 when charger_phases = 1 then 1 else 0 end) * charger_actual_current * charger_voltage / 1000.0 else charger_power end) as \"Power [kW]\",\n\t(case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as \"Battery heater\"\nFROM\n\tcharges c\n\tJOIN charging_processes cp ON c.charging_process_id = cp.id\nWHERE\n cp.car_id = $car_id AND\n $__timeFilter(date)\nORDER BY date ASC",
926+
"rawSql": "SELECT\n\tdate AS \"time\",\n\tbattery_level as \"SOC [%]\",\n\t(case when charger_phases >= 1 then (case when charger_phases = 2 then 3 when charger_phases = 1 then 1 else 0 end) * charger_actual_current * charger_voltage / 1000.0 else charger_power end) as \"Power [kW]\",\n\t(case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as \"Battery heater\"\nFROM\n\tcharges c\n\tJOIN charging_processes cp ON c.charging_process_id = cp.id\nWHERE\n cp.car_id = $car_id AND\n $__timeFilter(date)\nORDER BY date ASC",
779927
"refId": "Power",
780928
"select": [
781929
[
@@ -799,7 +947,7 @@
799947
]
800948
}
801949
],
802-
"title": "Power",
950+
"title": "Charge detail",
803951
"type": "timeseries"
804952
},
805953
{
@@ -1260,7 +1408,7 @@
12601408
"type": "stat"
12611409
}
12621410
],
1263-
"refresh": "30s",
1411+
"refresh": false,
12641412
"schemaVersion": 36,
12651413
"style": "dark",
12661414
"tags": [
@@ -1408,6 +1556,6 @@
14081556
"timezone": "",
14091557
"title": "Custom - Current Charge View",
14101558
"uid": "K9VmZD54k",
1411-
"version": 3,
1559+
"version": 4,
14121560
"weekStart": ""
14131561
}
20.3 KB
Loading

0 commit comments

Comments
 (0)