From b4724f5845f34b78eb702572245333a5e6731894 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Thu, 30 May 2024 12:28:56 +0200 Subject: [PATCH] Delete incubator/TeslaMate directory --- incubator/TeslaMate/0.0.15/.helmignore | 30 - incubator/TeslaMate/0.0.15/CHANGELOG.md | 3 - incubator/TeslaMate/0.0.15/Chart.yaml | 40 - incubator/TeslaMate/0.0.15/README.md | 56 - incubator/TeslaMate/0.0.15/app-changelog.md | 41 - incubator/TeslaMate/0.0.15/app-readme.md | 8 - .../0.0.15/charts/common-20.3.11.tgz | Bin 99404 -> 0 bytes .../teslamate/battery-health-lfp.json | 1448 -- .../dashboards/teslamate/battery-health.json | 1704 -- .../dashboards/teslamate/charge-level.json | 263 - .../0.0.15/dashboards/teslamate/charges.json | 1335 - .../teslamate/charging-stats-lfp.json | 1900 -- .../dashboards/teslamate/charging-stats.json | 1920 -- .../dashboards/teslamate/drive-stats.json | 1148 - .../0.0.15/dashboards/teslamate/drives.json | 1006 - .../dashboards/teslamate/efficiency.json | 1227 - .../teslamate/internal/charge-details.json | 1238 - .../teslamate/internal/drive-details.json | 2059 -- .../teslamate/reports/dutch-tax.json | 515 - .../dashboards/teslamate1/locations.json | 1120 - .../0.0.15/dashboards/teslamate1/mileage.json | 317 - .../dashboards/teslamate1/overview-lfp.json | 1631 -- .../dashboards/teslamate1/overview.json | 1640 -- .../teslamate1/projected-range.json | 772 - .../0.0.15/dashboards/teslamate1/states.json | 508 - .../dashboards/teslamate1/statistics.json | 971 - .../dashboards/teslamate1/timeline.json | 824 - .../0.0.15/dashboards/teslamate1/trip.json | 2643 -- .../0.0.15/dashboards/teslamate1/updates.json | 723 - .../dashboards/teslamate1/vampire-drain.json | 744 - .../0.0.15/dashboards/teslamate1/visited.json | 318 - .../dashboards/teslamate2/BatteryHealth.json | 1841 -- .../dashboards/teslamate2/BrowseCharges.json | 1486 -- .../teslamate2/ChargingCostsStats.json | 3404 --- .../teslamate2/ChargingCurveStats.json | 870 - .../teslamate2/ContinuousTrips.json | 810 - .../teslamate2/CurrentChargeView.json | 1953 -- .../teslamate2/CurrentDriveView.json | 1858 -- .../dashboards/teslamate2/CurrentState.json | 1841 -- .../teslamate2/DCChargingCurvesByCarrier.json | 1026 - .../teslamate2/DatabaseDashboadInfo.json | 1233 - .../dashboards/teslamate2/IncompleteData.json | 446 - .../dashboards/teslamate2/MileageStats.json | 816 - .../dashboards/teslamate2/SpeedRates.json | 1218 - .../dashboards/teslamate2/TrackingDrives.json | 1363 - incubator/TeslaMate/0.0.15/icon-small.webp | Bin 394 -> 0 bytes incubator/TeslaMate/0.0.15/icon.webp | Bin 1988 -> 0 bytes incubator/TeslaMate/0.0.15/ix_values.yaml | 84 - incubator/TeslaMate/0.0.15/questions.yaml | 3031 --- .../TeslaMate/0.0.15/templates/NOTES.txt | 1 - .../TeslaMate/0.0.15/templates/_configmap.tpl | 29 - .../TeslaMate/0.0.15/templates/_secrets.tpl | 13 - .../TeslaMate/0.0.15/templates/common.yaml | 17 - incubator/TeslaMate/0.0.15/values.yaml | 0 incubator/TeslaMate/0.0.16/.helmignore | 30 - incubator/TeslaMate/0.0.16/CHANGELOG.md | 3 - incubator/TeslaMate/0.0.16/Chart.yaml | 40 - incubator/TeslaMate/0.0.16/README.md | 56 - incubator/TeslaMate/0.0.16/app-changelog.md | 43 - incubator/TeslaMate/0.0.16/app-readme.md | 8 - .../0.0.16/charts/common-20.3.12.tgz | Bin 99407 -> 0 bytes .../teslamate/battery-health-lfp.json | 1448 -- .../dashboards/teslamate/battery-health.json | 1704 -- .../dashboards/teslamate/charge-level.json | 263 - .../0.0.16/dashboards/teslamate/charges.json | 1335 - .../teslamate/charging-stats-lfp.json | 1900 -- .../dashboards/teslamate/charging-stats.json | 1920 -- .../dashboards/teslamate/drive-stats.json | 1148 - .../0.0.16/dashboards/teslamate/drives.json | 1006 - .../dashboards/teslamate/efficiency.json | 1227 - .../teslamate/internal/charge-details.json | 1238 - .../teslamate/internal/drive-details.json | 2059 -- .../teslamate/reports/dutch-tax.json | 515 - .../dashboards/teslamate1/locations.json | 1120 - .../0.0.16/dashboards/teslamate1/mileage.json | 317 - .../dashboards/teslamate1/overview-lfp.json | 1631 -- .../dashboards/teslamate1/overview.json | 1640 -- .../teslamate1/projected-range.json | 772 - .../0.0.16/dashboards/teslamate1/states.json | 508 - .../dashboards/teslamate1/statistics.json | 971 - .../dashboards/teslamate1/timeline.json | 824 - .../0.0.16/dashboards/teslamate1/trip.json | 2643 -- .../0.0.16/dashboards/teslamate1/updates.json | 723 - .../dashboards/teslamate1/vampire-drain.json | 744 - .../0.0.16/dashboards/teslamate1/visited.json | 318 - .../dashboards/teslamate2/BatteryHealth.json | 1841 -- .../dashboards/teslamate2/BrowseCharges.json | 1486 -- .../teslamate2/ChargingCostsStats.json | 3404 --- .../teslamate2/ChargingCurveStats.json | 870 - .../teslamate2/ContinuousTrips.json | 810 - .../teslamate2/CurrentChargeView.json | 1953 -- .../teslamate2/CurrentDriveView.json | 1858 -- .../dashboards/teslamate2/CurrentState.json | 1841 -- .../teslamate2/DCChargingCurvesByCarrier.json | 1026 - .../teslamate2/DatabaseDashboadInfo.json | 1233 - .../dashboards/teslamate2/IncompleteData.json | 446 - .../dashboards/teslamate2/MileageStats.json | 816 - .../dashboards/teslamate2/SpeedRates.json | 1218 - .../dashboards/teslamate2/TrackingDrives.json | 1363 - incubator/TeslaMate/0.0.16/icon-small.webp | Bin 394 -> 0 bytes incubator/TeslaMate/0.0.16/icon.webp | Bin 1988 -> 0 bytes incubator/TeslaMate/0.0.16/ix_values.yaml | 84 - incubator/TeslaMate/0.0.16/questions.yaml | 3031 --- .../TeslaMate/0.0.16/templates/NOTES.txt | 1 - .../TeslaMate/0.0.16/templates/_configmap.tpl | 29 - .../TeslaMate/0.0.16/templates/_secrets.tpl | 13 - .../TeslaMate/0.0.16/templates/common.yaml | 17 - incubator/TeslaMate/0.0.16/values.yaml | 0 incubator/TeslaMate/1.0.3/.helmignore | 32 - incubator/TeslaMate/1.0.3/CHANGELOG.md | 3 - incubator/TeslaMate/1.0.3/Chart.yaml | 40 - incubator/TeslaMate/1.0.3/README.md | 56 - incubator/TeslaMate/1.0.3/app-changelog.md | 55 - incubator/TeslaMate/1.0.3/app-readme.md | 8 - .../TeslaMate/1.0.3/charts/common-22.0.3.tgz | Bin 97709 -> 0 bytes .../teslamate/battery-health-lfp.json | 1448 -- .../dashboards/teslamate/battery-health.json | 1704 -- .../dashboards/teslamate/charge-level.json | 263 - .../1.0.3/dashboards/teslamate/charges.json | 1335 - .../teslamate/charging-stats-lfp.json | 1900 -- .../dashboards/teslamate/charging-stats.json | 1920 -- .../dashboards/teslamate/drive-stats.json | 1148 - .../1.0.3/dashboards/teslamate/drives.json | 1006 - .../dashboards/teslamate/efficiency.json | 1227 - .../teslamate/internal/charge-details.json | 1238 - .../teslamate/internal/drive-details.json | 2059 -- .../teslamate/reports/dutch-tax.json | 515 - .../dashboards/teslamate1/locations.json | 1120 - .../1.0.3/dashboards/teslamate1/mileage.json | 317 - .../dashboards/teslamate1/overview-lfp.json | 1631 -- .../1.0.3/dashboards/teslamate1/overview.json | 1640 -- .../teslamate1/projected-range.json | 772 - .../1.0.3/dashboards/teslamate1/states.json | 508 - .../dashboards/teslamate1/statistics.json | 971 - .../1.0.3/dashboards/teslamate1/timeline.json | 824 - .../1.0.3/dashboards/teslamate1/trip.json | 2643 -- .../1.0.3/dashboards/teslamate1/updates.json | 723 - .../dashboards/teslamate1/vampire-drain.json | 744 - .../1.0.3/dashboards/teslamate1/visited.json | 318 - .../dashboards/teslamate2/BatteryHealth.json | 1841 -- .../dashboards/teslamate2/BrowseCharges.json | 1486 -- .../teslamate2/ChargingCostsStats.json | 3404 --- .../teslamate2/ChargingCurveStats.json | 870 - .../teslamate2/ContinuousTrips.json | 810 - .../teslamate2/CurrentChargeView.json | 1953 -- .../teslamate2/CurrentDriveView.json | 1858 -- .../dashboards/teslamate2/CurrentState.json | 1841 -- .../teslamate2/DCChargingCurvesByCarrier.json | 1026 - .../teslamate2/DatabaseDashboadInfo.json | 1233 - .../dashboards/teslamate2/IncompleteData.json | 446 - .../dashboards/teslamate2/MileageStats.json | 816 - .../dashboards/teslamate2/SpeedRates.json | 1218 - .../dashboards/teslamate2/TrackingDrives.json | 1363 - incubator/TeslaMate/1.0.3/icon-small.webp | Bin 394 -> 0 bytes incubator/TeslaMate/1.0.3/icon.webp | Bin 1988 -> 0 bytes incubator/TeslaMate/1.0.3/ix_values.yaml | 84 - incubator/TeslaMate/1.0.3/questions.yaml | 3231 --- incubator/TeslaMate/1.0.3/templates/NOTES.txt | 1 - .../TeslaMate/1.0.3/templates/_configmap.tpl | 29 - .../TeslaMate/1.0.3/templates/_secrets.tpl | 13 - .../TeslaMate/1.0.3/templates/common.yaml | 17 - incubator/TeslaMate/1.0.3/values.yaml | 0 incubator/TeslaMate/1.0.4/.helmignore | 32 - incubator/TeslaMate/1.0.4/CHANGELOG.md | 3 - incubator/TeslaMate/1.0.4/Chart.yaml | 40 - incubator/TeslaMate/1.0.4/README.md | 56 - incubator/TeslaMate/1.0.4/app-changelog.md | 59 - incubator/TeslaMate/1.0.4/app-readme.md | 8 - .../TeslaMate/1.0.4/charts/common-23.0.0.tgz | Bin 96822 -> 0 bytes .../teslamate/battery-health-lfp.json | 1448 -- .../dashboards/teslamate/battery-health.json | 1704 -- .../dashboards/teslamate/charge-level.json | 263 - .../1.0.4/dashboards/teslamate/charges.json | 1335 - .../teslamate/charging-stats-lfp.json | 1900 -- .../dashboards/teslamate/charging-stats.json | 1920 -- .../dashboards/teslamate/drive-stats.json | 1148 - .../1.0.4/dashboards/teslamate/drives.json | 1006 - .../dashboards/teslamate/efficiency.json | 1227 - .../teslamate/internal/charge-details.json | 1238 - .../teslamate/internal/drive-details.json | 2059 -- .../teslamate/reports/dutch-tax.json | 515 - .../dashboards/teslamate1/locations.json | 1120 - .../1.0.4/dashboards/teslamate1/mileage.json | 317 - .../dashboards/teslamate1/overview-lfp.json | 1631 -- .../1.0.4/dashboards/teslamate1/overview.json | 1640 -- .../teslamate1/projected-range.json | 772 - .../1.0.4/dashboards/teslamate1/states.json | 508 - .../dashboards/teslamate1/statistics.json | 971 - .../1.0.4/dashboards/teslamate1/timeline.json | 824 - .../1.0.4/dashboards/teslamate1/trip.json | 2643 -- .../1.0.4/dashboards/teslamate1/updates.json | 723 - .../dashboards/teslamate1/vampire-drain.json | 744 - .../1.0.4/dashboards/teslamate1/visited.json | 318 - .../dashboards/teslamate2/BatteryHealth.json | 1841 -- .../dashboards/teslamate2/BrowseCharges.json | 1486 -- .../teslamate2/ChargingCostsStats.json | 3404 --- .../teslamate2/ChargingCurveStats.json | 870 - .../teslamate2/ContinuousTrips.json | 810 - .../teslamate2/CurrentChargeView.json | 1953 -- .../teslamate2/CurrentDriveView.json | 1858 -- .../dashboards/teslamate2/CurrentState.json | 1841 -- .../teslamate2/DCChargingCurvesByCarrier.json | 1026 - .../teslamate2/DatabaseDashboadInfo.json | 1233 - .../dashboards/teslamate2/IncompleteData.json | 446 - .../dashboards/teslamate2/MileageStats.json | 816 - .../dashboards/teslamate2/SpeedRates.json | 1218 - .../dashboards/teslamate2/TrackingDrives.json | 1363 - incubator/TeslaMate/1.0.4/icon-small.webp | Bin 394 -> 0 bytes incubator/TeslaMate/1.0.4/icon.webp | Bin 1988 -> 0 bytes incubator/TeslaMate/1.0.4/ix_values.yaml | 84 - incubator/TeslaMate/1.0.4/questions.yaml | 3224 --- incubator/TeslaMate/1.0.4/templates/NOTES.txt | 1 - .../TeslaMate/1.0.4/templates/_configmap.tpl | 29 - .../TeslaMate/1.0.4/templates/_secrets.tpl | 13 - .../TeslaMate/1.0.4/templates/common.yaml | 17 - incubator/TeslaMate/1.0.4/values.yaml | 0 incubator/TeslaMate/app_versions.json | 20972 ---------------- incubator/TeslaMate/item.yaml | 4 - 218 files changed, 227375 deletions(-) delete mode 100644 incubator/TeslaMate/0.0.15/.helmignore delete mode 100644 incubator/TeslaMate/0.0.15/CHANGELOG.md delete mode 100644 incubator/TeslaMate/0.0.15/Chart.yaml delete mode 100644 incubator/TeslaMate/0.0.15/README.md delete mode 100644 incubator/TeslaMate/0.0.15/app-changelog.md delete mode 100644 incubator/TeslaMate/0.0.15/app-readme.md delete mode 100644 incubator/TeslaMate/0.0.15/charts/common-20.3.11.tgz delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health-lfp.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/charge-level.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/charges.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats-lfp.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/drive-stats.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/drives.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/efficiency.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/charge-details.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/drive-details.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate/reports/dutch-tax.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/locations.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/mileage.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview-lfp.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/projected-range.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/states.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/statistics.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/timeline.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/trip.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/updates.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/vampire-drain.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate1/visited.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/BatteryHealth.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/BrowseCharges.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCostsStats.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCurveStats.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/ContinuousTrips.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentChargeView.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentDriveView.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentState.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/DCChargingCurvesByCarrier.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/DatabaseDashboadInfo.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/IncompleteData.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/MileageStats.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/SpeedRates.json delete mode 100644 incubator/TeslaMate/0.0.15/dashboards/teslamate2/TrackingDrives.json delete mode 100644 incubator/TeslaMate/0.0.15/icon-small.webp delete mode 100644 incubator/TeslaMate/0.0.15/icon.webp delete mode 100644 incubator/TeslaMate/0.0.15/ix_values.yaml delete mode 100755 incubator/TeslaMate/0.0.15/questions.yaml delete mode 100644 incubator/TeslaMate/0.0.15/templates/NOTES.txt delete mode 100644 incubator/TeslaMate/0.0.15/templates/_configmap.tpl delete mode 100644 incubator/TeslaMate/0.0.15/templates/_secrets.tpl delete mode 100644 incubator/TeslaMate/0.0.15/templates/common.yaml delete mode 100644 incubator/TeslaMate/0.0.15/values.yaml delete mode 100644 incubator/TeslaMate/0.0.16/.helmignore delete mode 100644 incubator/TeslaMate/0.0.16/CHANGELOG.md delete mode 100644 incubator/TeslaMate/0.0.16/Chart.yaml delete mode 100644 incubator/TeslaMate/0.0.16/README.md delete mode 100644 incubator/TeslaMate/0.0.16/app-changelog.md delete mode 100644 incubator/TeslaMate/0.0.16/app-readme.md delete mode 100644 incubator/TeslaMate/0.0.16/charts/common-20.3.12.tgz delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health-lfp.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/charge-level.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/charges.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats-lfp.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/drive-stats.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/drives.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/efficiency.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/charge-details.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/drive-details.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate/reports/dutch-tax.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/locations.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/mileage.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview-lfp.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/projected-range.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/states.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/statistics.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/timeline.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/trip.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/updates.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/vampire-drain.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate1/visited.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/BatteryHealth.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/BrowseCharges.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCostsStats.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCurveStats.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/ContinuousTrips.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentChargeView.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentDriveView.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentState.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/DCChargingCurvesByCarrier.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/DatabaseDashboadInfo.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/IncompleteData.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/MileageStats.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/SpeedRates.json delete mode 100644 incubator/TeslaMate/0.0.16/dashboards/teslamate2/TrackingDrives.json delete mode 100644 incubator/TeslaMate/0.0.16/icon-small.webp delete mode 100644 incubator/TeslaMate/0.0.16/icon.webp delete mode 100644 incubator/TeslaMate/0.0.16/ix_values.yaml delete mode 100755 incubator/TeslaMate/0.0.16/questions.yaml delete mode 100644 incubator/TeslaMate/0.0.16/templates/NOTES.txt delete mode 100644 incubator/TeslaMate/0.0.16/templates/_configmap.tpl delete mode 100644 incubator/TeslaMate/0.0.16/templates/_secrets.tpl delete mode 100644 incubator/TeslaMate/0.0.16/templates/common.yaml delete mode 100644 incubator/TeslaMate/0.0.16/values.yaml delete mode 100644 incubator/TeslaMate/1.0.3/.helmignore delete mode 100644 incubator/TeslaMate/1.0.3/CHANGELOG.md delete mode 100644 incubator/TeslaMate/1.0.3/Chart.yaml delete mode 100644 incubator/TeslaMate/1.0.3/README.md delete mode 100644 incubator/TeslaMate/1.0.3/app-changelog.md delete mode 100644 incubator/TeslaMate/1.0.3/app-readme.md delete mode 100644 incubator/TeslaMate/1.0.3/charts/common-22.0.3.tgz delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/battery-health-lfp.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/battery-health.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/charge-level.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/charges.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats-lfp.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/drive-stats.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/drives.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/efficiency.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/charge-details.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/drive-details.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate/reports/dutch-tax.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/locations.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/mileage.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview-lfp.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/projected-range.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/states.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/statistics.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/timeline.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/trip.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/updates.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/vampire-drain.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate1/visited.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/BatteryHealth.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/BrowseCharges.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCostsStats.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCurveStats.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/ContinuousTrips.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentChargeView.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentDriveView.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentState.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/DCChargingCurvesByCarrier.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/DatabaseDashboadInfo.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/IncompleteData.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/MileageStats.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/SpeedRates.json delete mode 100644 incubator/TeslaMate/1.0.3/dashboards/teslamate2/TrackingDrives.json delete mode 100644 incubator/TeslaMate/1.0.3/icon-small.webp delete mode 100644 incubator/TeslaMate/1.0.3/icon.webp delete mode 100644 incubator/TeslaMate/1.0.3/ix_values.yaml delete mode 100755 incubator/TeslaMate/1.0.3/questions.yaml delete mode 100644 incubator/TeslaMate/1.0.3/templates/NOTES.txt delete mode 100644 incubator/TeslaMate/1.0.3/templates/_configmap.tpl delete mode 100644 incubator/TeslaMate/1.0.3/templates/_secrets.tpl delete mode 100644 incubator/TeslaMate/1.0.3/templates/common.yaml delete mode 100644 incubator/TeslaMate/1.0.3/values.yaml delete mode 100644 incubator/TeslaMate/1.0.4/.helmignore delete mode 100644 incubator/TeslaMate/1.0.4/CHANGELOG.md delete mode 100644 incubator/TeslaMate/1.0.4/Chart.yaml delete mode 100644 incubator/TeslaMate/1.0.4/README.md delete mode 100644 incubator/TeslaMate/1.0.4/app-changelog.md delete mode 100644 incubator/TeslaMate/1.0.4/app-readme.md delete mode 100644 incubator/TeslaMate/1.0.4/charts/common-23.0.0.tgz delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health-lfp.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/charge-level.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/charges.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats-lfp.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/drive-stats.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/drives.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/efficiency.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/charge-details.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/drive-details.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate/reports/dutch-tax.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/locations.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/mileage.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview-lfp.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/projected-range.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/states.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/statistics.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/timeline.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/trip.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/updates.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/vampire-drain.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate1/visited.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/BatteryHealth.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/BrowseCharges.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCostsStats.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCurveStats.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/ContinuousTrips.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentChargeView.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentDriveView.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentState.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/DCChargingCurvesByCarrier.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/DatabaseDashboadInfo.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/IncompleteData.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/MileageStats.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/SpeedRates.json delete mode 100644 incubator/TeslaMate/1.0.4/dashboards/teslamate2/TrackingDrives.json delete mode 100644 incubator/TeslaMate/1.0.4/icon-small.webp delete mode 100644 incubator/TeslaMate/1.0.4/icon.webp delete mode 100644 incubator/TeslaMate/1.0.4/ix_values.yaml delete mode 100755 incubator/TeslaMate/1.0.4/questions.yaml delete mode 100644 incubator/TeslaMate/1.0.4/templates/NOTES.txt delete mode 100644 incubator/TeslaMate/1.0.4/templates/_configmap.tpl delete mode 100644 incubator/TeslaMate/1.0.4/templates/_secrets.tpl delete mode 100644 incubator/TeslaMate/1.0.4/templates/common.yaml delete mode 100644 incubator/TeslaMate/1.0.4/values.yaml delete mode 100644 incubator/TeslaMate/app_versions.json delete mode 100644 incubator/TeslaMate/item.yaml diff --git a/incubator/TeslaMate/0.0.15/.helmignore b/incubator/TeslaMate/0.0.15/.helmignore deleted file mode 100644 index 77ca5567b26..00000000000 --- a/incubator/TeslaMate/0.0.15/.helmignore +++ /dev/null @@ -1,30 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -# OWNERS file for Kubernetes -OWNERS -# helm-docs templates -*.gotmpl -# docs folder -/docs -# icon -icon.png diff --git a/incubator/TeslaMate/0.0.15/CHANGELOG.md b/incubator/TeslaMate/0.0.15/CHANGELOG.md deleted file mode 100644 index 941abb8a218..00000000000 --- a/incubator/TeslaMate/0.0.15/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -*for the complete changelog, please refer to the website* - -**Important:** \ No newline at end of file diff --git a/incubator/TeslaMate/0.0.15/Chart.yaml b/incubator/TeslaMate/0.0.15/Chart.yaml deleted file mode 100644 index be55cfde7fa..00000000000 --- a/incubator/TeslaMate/0.0.15/Chart.yaml +++ /dev/null @@ -1,40 +0,0 @@ -annotations: - max_scale_version: 24.04.0 - min_scale_version: 23.10.0 - truecharts.org/SCALE-support: "true" - truecharts.org/category: metrics - truecharts.org/max_helm_version: "3.14" - truecharts.org/min_helm_version: "3.11" - truecharts.org/train: incubator -apiVersion: v2 -appVersion: 1.28.5 -dependencies: - - name: common - version: 20.3.11 - repository: oci://tccr.io/truecharts - condition: "" - alias: "" - tags: [] - import-values: [] -deprecated: false -description: A self-hosted data logger for your Tesla -home: https://truecharts.org/charts/incubator/TeslaMate -icon: https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp -keywords: - - analytics - - monitoring - - metrics - - logs -kubeVersion: ">=1.24.0-0" -maintainers: - - name: TrueCharts - email: info@truecharts.org - url: https://truecharts.org -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: 0.0.15 diff --git a/incubator/TeslaMate/0.0.15/README.md b/incubator/TeslaMate/0.0.15/README.md deleted file mode 100644 index 26c9055c690..00000000000 --- a/incubator/TeslaMate/0.0.15/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: README ---- - -## General Info - -TrueCharts can be installed as both _normal_ Helm Charts or as TrueNAS SCALE Apps. -Both solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible - -For more information about this Chart, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incubator/TeslaMate) - -**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)** - -## Installation - -### Helm-Chart installation - -To install TrueCharts Helm charts using Helm, you can use our OCI Repository. - -`helm install mychart oci://tccr.io/truecharts/CHARTNAME` - -For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/ - - -### TrueNAS SCALE Apps - -For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the [quick-start guides for TrueNAS SCALE](https://truecharts.org/scale/guides/scale-intro). - -## Configuration Options - -To view the chart specific options, please view Values.yaml included in the chart. - -All our Charts use a shared "common" library chart that contains most of the templating and options. -For the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/ - -## Chart Specific Guides and information - -All our charts have dedicated documentation pages. -The documentation for this chart can be found here: -https://truecharts.org/charts/incubator/TeslaMate - -## Support - - -- See the [Website](https://truecharts.org) -- Check our [Discord](https://discord.gg/tVsPTHWTtr) -- Open a [issue](https://github.com/truecharts/charts/issues/new/choose) - ---- - -## Sponsor TrueCharts - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/general/sponsor) or contributing back to the project any way you can! - -_All Rights Reserved - The TrueCharts Project_ diff --git a/incubator/TeslaMate/0.0.15/app-changelog.md b/incubator/TeslaMate/0.0.15/app-changelog.md deleted file mode 100644 index 1ce1eac5695..00000000000 --- a/incubator/TeslaMate/0.0.15/app-changelog.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## [teslamate-0.0.15]teslamate-0.0.15 (2024-04-23) - -### Chore - - - -- bump everything to release new doc pages - -- update groups html ([#21121](https://github.com/truecharts/charts/issues/21121)) - -- bump charts to release new docs to fix broken links - -- bump everything to regenerate readme's and site index - -- bump charts to ensure new icons are released - -- update ignored updates to v20.3.11[@dae6129](https://github.com/dae6129) by renovate ([#21059](https://github.com/truecharts/charts/issues/21059)) - -- update ignored updates to v20.3.10[@c2f262c](https://github.com/c2f262c) by renovate ([#21034](https://github.com/truecharts/charts/issues/21034)) - -- update ignored updates to v20.3.9[@370bb36](https://github.com/370bb36) by renovate ([#20917](https://github.com/truecharts/charts/issues/20917)) - -- update ignored updates to v20.3.8[@52f4118](https://github.com/52f4118) by renovate ([#20876](https://github.com/truecharts/charts/issues/20876)) - -- update ignored updates to v20.3.7[@8cf9fc9](https://github.com/8cf9fc9) by renovate ([#20777](https://github.com/truecharts/charts/issues/20777)) - -- update ignored updates to v20.3.6[@27edfed](https://github.com/27edfed) by renovate ([#20711](https://github.com/truecharts/charts/issues/20711)) - -### Chore - - - -- rework SCALE catagories/groups to match helm and remove deprecated charts ([#21111](https://github.com/truecharts/charts/issues/21111)) - -### Fix - - - -- replace serviceexpert with externalinterfaces/networking-group in the SCALE GUI ([#21154](https://github.com/truecharts/charts/issues/21154)) \ No newline at end of file diff --git a/incubator/TeslaMate/0.0.15/app-readme.md b/incubator/TeslaMate/0.0.15/app-readme.md deleted file mode 100644 index eb228d07050..00000000000 --- a/incubator/TeslaMate/0.0.15/app-readme.md +++ /dev/null @@ -1,8 +0,0 @@ -A self-hosted data logger for your Tesla - -This App is supplied by TrueCharts, for more information visit the manual: [https://truecharts.org/charts/incubator/TeslaMate](https://truecharts.org/charts/incubator/TeslaMate) - ---- - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can! diff --git a/incubator/TeslaMate/0.0.15/charts/common-20.3.11.tgz b/incubator/TeslaMate/0.0.15/charts/common-20.3.11.tgz deleted file mode 100644 index 010f5b5a245d342f6f0d2e0ef95338a45ead19b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99404 zcmV)OK(@ahiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PMZ(avQnPFuK2a6)0*`vG#}*zbP?s>Xjv}SMSP_9#QrtCvQpt zXFw9sa4I*mvzT5oMXfztVPDlLPXf(3_Hk<9{cg;?(+3NNC-FEl8MzhuFcfSLTXTT-*B$UDU zyT+5-%69G>d0-e41{o$H9aI2-F~ei%v1u}@W3ul-h9)Fl3;+%pn#7`D%|`*Aqj-@o zA7BrK6b-6aT8S73xcpqOG34#2!sfl*|B29P1jDn6oKj3XxA{g{Lv z{|f|o6vKD{#v}$eae~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H{j;Sm*C}p-n_iL0aq{IzP`A*dHDi7{~4TJ zUA?+EKYRY_C3toAen-~Rdix9T{>|I}02kNb>g}6%7cXAE0B4dhQhT)hJCG?70T>`6YE z&Orh>qK5iQ-AsJQIIqfTz~o{;j)hnx7bFBN0P9|CH8F#EdogJf1XHG9Gp)kp!!v}g zFp3CDmF*T~k@+QM5-mp*P84Eg@InX+Xb#Q;;7F+1q~;Q;i;_wiKxWdvUCO6Wn*$Ey zsvs=Z_ZfHsw{u{r4Ns9FV|V@)vLk zCxY2sM`JWWz1}X+PaV#ph|E&{tOvj@xKfW9o`Jt@eLqW*OE^J)lONuQv%u`%ceh*s zs_rg$`~2*D0brt;0igjej*#b65R7;%3=+obNz5f9OG{xO_{|ES+ zTT7a=75M)lv+T%vl4zq(5kfHoCx=~g~7%GZ^ybfqg_clrMV P00960fC|;b09p(Hd4E&t diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health-lfp.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health-lfp.json deleted file mode 100644 index 539f070000c..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health-lfp.json +++ /dev/null @@ -1,1448 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1681039491922, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. \n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total energy added" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tround(ceil(sum(charge_energy_added) / ('$aux'::json -> 'MaxCapacity')::text::numeric),0) AS \"Estimated charging cycles\"\nFROM charging_processes WHERE car_id = $car_id;", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data form the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Estimated charging cycles are based on the whole energy added to the battery. So the more data you logged the better. \n", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n round(('$aux'::json -> 'LastChargekWhAdded')::text::numeric,1) || ' kWh' as \"Last Energy added\",\n round(('$aux'::json -> 'LastMileageAdded')::text::numeric,1) || ' $length_unit' as \"Last Range added\"", - "refId": "LastChanging", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 6 - }, - "id": 34, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "hidden", - "placement": "bottom" - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Added", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\nSELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "kWh" - }, - "x": "odometer", - "y": "kWh" - }, - { - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km) * ('$aux'::json -> 'RatedEfficiency')::text::float / AVG(c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tGROUP BY 3", - "refId": "Median", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Battery Health - LFP", - "uid": "DuertWeceu", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health.json deleted file mode 100644 index 9db33cbfcf4..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/battery-health.json +++ /dev/null @@ -1,1704 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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 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 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\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", - "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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health", - "uid": "jchmRiqUfXgTM", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charge-level.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/charge-level.json deleted file mode 100644 index 41af0d8bc8e..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charge-level.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100496202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Charge Level", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tbattery_level AS \"Battery Level\",\n\tusable_battery_level AS \"Usable Battery Level\"\nfrom positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n\tORDER BY Time ASC\n;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-7d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Level", - "uid": "WopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charges.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/charges.json deleted file mode 100644 index 46d4456da3c..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charges.json +++ /dev/null @@ -1,1335 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642763869363, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 8, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "decimals" - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n p.odometer as odometer\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n convert_km(odometer::numeric, '$length_unit') AS odometer_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND max_charger_voltage >= '$voltage'\n AND duration_min >= '$min_duration_min'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", charge_energy_added\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy added", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", greatest(charge_energy_added, charge_energy_used)\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 13, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", cost\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost", - "transparent": true, - "type": "stat" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min duration (minutes) here", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min voltage here", - "name": "voltage", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charges", - "uid": "TSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats-lfp.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats-lfp.json deleted file mode 100644 index 90364ab8931..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats-lfp.json +++ /dev/null @@ -1,1900 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats - LFP", - "uid": "UcjFKmUtpt", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats.json deleted file mode 100644 index 3b176f386ad..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/charging-stats.json +++ /dev/null @@ -1,1920 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 91 - } - ] - } - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats", - "uid": "-pkIkhmRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/drive-stats.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/drive-stats.json deleted file mode 100644 index ce134792864..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/drive-stats.json +++ /dev/null @@ -1,1148 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1644505954964, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 20, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date_trunc('day', start_date) as \"time\",\n count(*)\nFROM drives\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nGROUP BY 1\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Number of drives", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 16, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', date)::date AS date,\n\t\tmax(odometer) - min(odometer) AS distance\n\tFROM positions\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since) , now(), '1 day'::interval) dd\n)\nSELECT \n $__time(base_line.date), \n convert_km(COALESCE(distance, 0)::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM base_line\nLEFT JOIN actual ON actual.date = base_line.date\nWHERE $__timeFilter(base_line.date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "$length_unit driven", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 22, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(start_date),\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency AS energy\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "kWh used", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 26, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM drives\nWHERE car_id = $car_id AND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance of a drive", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 5 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(distance) AS distance\n\tFROM drives\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.distance, 0) as distance\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') AS \"distance_$length_unit\"\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance driven per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 5 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency) AS energy\n\tFROM drives\n\tJOIN cars car ON car.id = car_id\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.energy, 0) as energy\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY energy) AS energy\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average kWh used per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 32, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km((((SELECT odometer FROM last_position) - (SELECT odometer\tFROM first_position)) /\n\tEXTRACT(days FROM (SELECT date FROM last_position) - (SELECT date\tFROM first_position)) * \n\t(365/12))::numeric, '$length_unit') AS \"mileage_$length_unit\";", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated monthly mileage", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 30, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km(((lp.odometer - fp.odometer) /\n\tEXTRACT(days FROM lp.date - fp.date) * \n\t365)::numeric, '$length_unit') AS \"mileage_$length_unit\" from first_position as fp, last_position as lp;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated annual mileage", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "displayName": "$__cell_0", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 24, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:3]), ', ')) as name,\n\tcount(*) AS visited\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE t.car_id = $car_id AND $__timeFilter(t.start_date)\nGROUP BY 1\nORDER BY visited DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top Destinations", - "type": "bargauge" - } - ], - "refresh": false, - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Stats", - "uid": "_7WkNSyWk", - "version": 1 -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/drives.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/drives.json deleted file mode 100644 index 8113735f987..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/drives.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642770916740, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kWh" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FFA6B0", - "value": null - }, - { - "color": "#FFCB7D", - "value": 0.65 - }, - { - "color": "#C8F2C2", - "value": 0.99 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/(start|end)_path/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_str" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": "❄" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "color": "transparent", - "index": 1, - "text": "." - }, - "true": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 5 - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated consumption may be incorrect and is therefore sometimes hidden.", - "url": "" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n case when (start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level) = true then true else false end as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed,\n power_max\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 $__timeFilter(start_date) AND drives.car_id = $car_id AND convert_km(distance::numeric, '$length_unit') >= $min_dist AND convert_km(distance::numeric, '$length_unit') / NULLIF(duration_min, 0) * 60 >= $min_speed\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_$temp_unit,\n convert_km(avg_speed::numeric, '$length_unit') AS speed_avg_$length_unit,\n power_max,\n reduced_range as has_reduced_range,\n range_diff * car_efficiency as \"consumption_kWh\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit,\n CASE WHEN is_sufficiently_precise THEN distance / range_diff\n ELSE NULL\n END AS efficiency\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Drive", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min distance here", - "name": "min_dist", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min speed here", - "name": "min_speed", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives", - "uid": "Y8upc6ZRk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/efficiency.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/efficiency.json deleted file mode 100644 index 3a2b3439a65..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/efficiency.json +++ /dev/null @@ -1,1227 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1598013087999, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 4, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (net)", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 6, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "max", - "value": 1.15 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 200 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Temperature" - } - ] - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH t AS (\n\tSELECT\n\t CASE WHEN '$temp_unit' = 'C' THEN ROUND(cast(outside_temp_avg AS numeric) / 5, 0) * 5 \n\t\t\t WHEN '$temp_unit' = 'F' THEN ROUND(cast(convert_celsius(outside_temp_avg, '$temp_unit') AS numeric) / 10, 0) * 10\n\t\tEND AS outside_temp,\n\t\tsum(start_ideal_range_km - end_ideal_range_km) AS total_ideal_range,\n\t\tsum(start_rated_range_km - end_rated_range_km) AS total_rated_range,\n\t\tsum(distance) AS total_distance,\n\t\tsum(duration_min) as duration,\n\t\tcar_id\n\tFROM\n\t\tdrives\n\tWHERE\n\t\tdistance IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND convert_km(distance::numeric, '$length_unit') >= $min_distance \n\t\tAND start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km > 0.1\n\tGROUP BY\n\t\t1,\n\t\tcar_id\n)\n\nSELECT\n\toutside_temp as outside_temp_$temp_unit,\n total_distance / total_[[preferred_range]]_range AS efficiency,\n\ttotal_[[preferred_range]]_range / total_distance * c.efficiency * 1000 * \n CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END AS consumption_$length_unit,\n convert_km(total_distance::numeric, '$length_unit') as total_distance_$length_unit,\n\t(total_distance / duration) * 60 / (CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END) avg_speed_$length_unit\nFROM\n\tt\nJOIN cars c ON t.car_id = c.id\nWHERE outside_temp IS NOT NULL\norder by 1 desc\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature – Efficiency", - "type": "table" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 2, - "x": 0, - "y": 16 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 2, - "y": 16 - }, - "id": 12, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_ideal_range_km - start_ideal_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n count(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_ideal_range_km IS NOT NULL\n AND end_ideal_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived ideal efficiencies", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "Efficiency" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 13, - "y": 16 - }, - "id": 15, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n\tcount(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_rated_range_km IS NOT NULL\n AND end_rated_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived rated efficiencies", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "1", - "value": "1" - }, - "hide": 0, - "includeAll": false, - "label": "min. distance per drive", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": true, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - } - ], - "query": "1, 5, 10, 25, 50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Efficiency", - "uid": "fu4SiQgWz", - "version": 1 -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/charge-details.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/charge-details.json deleted file mode 100644 index 8706c5e162b..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/charge-details.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656106965302, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 100, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charger_voltage" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "displayName", - "value": "Charging Voltage" - }, - { - "id": "unit", - "value": "volt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^range_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_pilot_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current (pilot)" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^outside_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Outdoor Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_phases" - }, - "properties": [ - { - "id": "displayName", - "value": "Phases" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 17, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n battery_level,\n charger_power,\n (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as battery_heater,\n convert_km([[preferred_range]]_battery_range_km, '$length_unit') as range_$length_unit,\n charger_voltage,\n (case when charger_phases = 2 then 3 when charger_phases = 1 then 1 else 0 end) as charger_phases,\n charger_actual_current,\n charger_pilot_current,\n convert_celsius(outside_temp, '$temp_unit') outside_temp_$temp_unit\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Details", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "Added", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 17, - "y": 0 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select coalesce(cp.charge_energy_added, c.charge_energy_added)\r\nfrom charging_processes cp\r\njoin charges c\r\n\ton cp.id = c.charging_process_id\r\nwhere car_id = $car_id\r\nAND cp.id = $charging_process_id\r\nORDER BY c.date desc\r\nfetch first row only", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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": 3, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 6, - "links": [ - { - "title": "Set cost", - "url": "[[base_url:raw]]/charge-cost/${charging_process_id}" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT cost from charging_processes where id = $charging_process_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 7, - "x": 17, - "y": 3 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses ON addresses.id = c.address_id\n\tLEFT JOIN geofences g ON g.id = geofence_id\nWHERE\n\tc.id = $charging_process_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 15, - "w": 7, - "x": 17, - "y": 5 - }, - "id": 4, - "links": [], - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "fixed": "dark-blue" - }, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 7, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "filterData": { - "id": "byRefId", - "options": "A" - }, - "location": { - "latitude": "latitude", - "longitude": "longitude", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tunnest(ARRAY[latitude, latitude]) AS latitude,\n\tunnest(ARRAY[longitude, longitude]) AS longitude\nFROM\n\tcharging_processes c\n\tJOIN positions p ON c.position_id = p.id\nWHERE\n\t$__timeFilter(date)\n\tAND c.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 11, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": {}, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "fixed": "blue" - }, - "x": "avg SOC [%]", - "y": "avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"SOC [%]\",\n charger_power as \"Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"avg SOC [%]\",\n avg(charger_power) as \"avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nGROUP BY\n battery_level, fast_charger_present\nORDER BY\n battery_level ASC ", - "refId": "B", - "select": [ - [ - { - "params": ["odometer"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging curve", - "type": "xychart" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "label": "", - "name": "charging_process_id", - "options": [ - { - "selected": false, - "text": "NULL", - "value": "NULL" - } - ], - "query": "NULL", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Details", - "uid": "BHhxFeZRz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/drive-details.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/drive-details.json deleted file mode 100644 index b0b8f9a01c5..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/internal/drive-details.json +++ /dev/null @@ -1,2059 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:31", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658136653681, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "icon": "", - "tags": [], - "title": "GpxExport", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]/drive/$drive_id/gpx" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_kmh$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mph$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "speed_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "left" - }, - { - "id": "displayName", - "value": "Power" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "usable_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "usable SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_estimated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (est.)" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_km(speed::numeric, '$length_unit') AS speed_[[length_unit]]h,\n\tpower,\n\tbattery_heater::integer,\n\tconvert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range_[[preferred_range]]_[[length_unit]],\n\tconvert_km(est_battery_range_km, '$length_unit') AS range_estimated_[[length_unit]],\n\tbattery_level,\n\tusable_battery_level\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Distance", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT ${__to:date:seconds} - ${__from:date:seconds}", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Selected duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 2 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "displayName": "Consumption", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 200 - }, - { - "color": "red", - "value": 250 - } - ] - }, - "unit": "none" - }, - "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": 2, - "w": 6, - "x": 18, - "y": 2 - }, - "id": 18, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 27, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 4, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Map", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": ["logmin", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n $__time(date),\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS tpms_pressure_front_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS tpms_pressure_front_right_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS tpms_pressure_rear_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS tpms_pressure_rear_right_$pressure_unit\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "pos", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "feet" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tROUND(convert_m(elevation, '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "rgb(210, 203, 203)", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#96D98D", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "outside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#8AB8FF", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Outside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "inside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2CC0C", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Inside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "driver_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Driver Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "passenger_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Passenger Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Climate" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "displayName", - "value": "Fan status" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(outside_temp, '$temp_unit') AS outside_temp_$temp_unit,\n\tconvert_celsius(inside_temp, '$temp_unit') AS inside_temp_$temp_unit,\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as driver_temp_$temp_unit,\n\tconvert_celsius(passenger_temp_setting, '$temp_unit') as passenger_temp_$temp_unit,\n is_climate_on::integer,\n\tfan_status\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Temperatures", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 12, - "y": 31 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT CONCAT_WS(' - ', round(convert_km(start_km::numeric, '$length_unit')), round(convert_km(end_km::numeric, '$length_unit'))) ||' $length_unit' as \"Odometer\"\nFROM drives d\nWHERE d.id = $drive_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 0, - "y": 39 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "targets": [ - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\nORDER BY\n\tdate ASC\n\t)\n\t\n\nselect convert_m(sum(diff), '$alternative_length_unit') || ' $alternative_length_unit' as \"UP\" from height where diff > 0", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation Summary", - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "name": "drive_id", - "options": [ - { - "selected": true, - "text": "NULL", - "value": "NULL" - } - ], - "query": "3217", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1", - "value": "1" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "bar", - "value": "bar" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Details", - "uid": "zm7wN6Zgz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate/reports/dutch-tax.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate/reports/dutch-tax.json deleted file mode 100644 index b242b5da143..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate/reports/dutch-tax.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1602596446244, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "ID" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ts" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "start_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "Start Odometer" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "end_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "End Odometer" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "End Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start|end)_address" - }, - "properties": [ - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Address" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "End Address" - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start Time" - } - ] - }, - "pluginVersion": "7.2.2", - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "alias": "", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.id as drive_id,\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n start_km,\n end_km,\n CONCAT_WS(', ', CONCAT_WS(' ', start_address.road, start_address.house_number), start_address.city) AS start_address,\n CONCAT_WS(', ', CONCAT_WS(' ', end_address.road, end_address.house_number), end_address.city) AS end_address,\n duration_min,\n distance\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 cars car ON car.id = drives.car_id\n WHERE $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY drive_id DESC\n)\nSELECT\n drive_id,\n start_date_ts,\n convert_km(start_km::numeric, '$length_unit') as start_$length_unit,\n start_address,\n end_date_ts,\n convert_km(end_km::numeric, '$length_unit') as end_$length_unit,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "rated", - "value": "rated" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "value": null - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/y", - "to": "now/y" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives - Dutch tax", - "uid": "lBIoQIggk", - "version": 1 -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/locations.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/locations.json deleted file mode 100644 index 05c61277df3..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/locations.json +++ /dev/null @@ -1,1120 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642771806943, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select count(*) from addresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total addresses", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 20, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT city)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 14, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT state)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 0 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT country)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Countries", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - }, - { - "color": "super-light-green", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcity,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tcity IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - }, - { - "color": "super-light-orange", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 3 - }, - "id": 14, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tstate,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tstate IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "City" - }, - "properties": [ - { - "id": "custom.width" - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 22, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n max(end_date) as \"Date\",\n count(*) as visited,\n COALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:2]), ', ')) AS \"Address\",\n\tCOALESCE(city, neighbourhood) as \"City\"\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE a.display_name ilike '%$address_filter%' or g.name ilike '%$address_filter%'\nGROUP BY 3,4\nORDER BY visited DESC\nLIMIT 100", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last visited", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "visited": true - }, - "indexByName": {}, - "renameByName": {} - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "updated_at" - }, - "properties": [ - { - "id": "displayName", - "value": "Updated at" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "neighbourhood" - }, - "properties": [ - { - "id": "displayName", - "value": "Neighbourhood" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "city" - }, - "properties": [ - { - "id": "displayName", - "value": "City" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "state" - }, - "properties": [ - { - "id": "displayName", - "value": "State" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "country" - }, - "properties": [ - { - "id": "displayName", - "value": "Country" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 18, - "x": 0, - "y": 22 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n CONCAT('new?lat=', latitude, '&lng=', longitude) as path,\n\tCOALESCE(name, CONCAT(road, ' ', house_number)) AS name,\n\tneighbourhood,\n\tcity,\n\tstate,\n\tcountry\nFROM addresses\nWHERE display_name ilike '%$address_filter%'\nORDER BY inserted_at DESC\nLIMIT 100;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Addresses", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "displayName", - "value": "Time" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.id.numeric:raw}/edit" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 6, - "x": 18, - "y": 22 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id, name \nFROM geofences \nORDER BY inserted_at DESC\nLIMIT 512;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Geo-fences", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 1, - "includeAll": true, - "label": "Car", - "multi": true, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Address", - "name": "address_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Locations", - "uid": "ZzhF-aRWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/mileage.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/mileage.json deleted file mode 100644 index 16b27614c75..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/mileage.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100778202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "mileage_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Mileage" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH o AS (SELECT\n start_date AS time,\n car_id,\n start_km AS \"odometer\"\nFROM drives\nUNION ALL\nSELECT\n end_date,\n car_id,\n end_km AS \"odometer\"\nFROM drives)\n\nSELECT\n time, \n convert_km(odometer::numeric, '$length_unit') as mileage_$length_unit\nFROM o\nWHERE\n\tcar_id = $car_id AND\n\t$__timeFilter(time)\norder by 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage", - "uid": "NjtMTFggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview-lfp.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview-lfp.json deleted file mode 100644 index 2c5f42578b5..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview-lfp.json +++ /dev/null @@ -1,1631 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 170, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Drive details", - "url": "/d/zm7wN6Zgz/drive-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Details", - "url": "/d/BHhxFeZRz/charge-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview - LFP", - "uid": "EVzVGnwSq", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview.json deleted file mode 100644 index 0848c5211d5..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/overview.json +++ /dev/null @@ -1,1640 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Charge Level", - "url": "/d/WopVO_mgz/charge-level?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Stats", - "url": "/d/-pkIkhmRz/charging-stats?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "targetBlank": true, - "title": "States", - "url": "/d/xo4BNRkZz/states?orgId=1&${__url_time_range}" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview", - "uid": "kOuP_Fggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/projected-range.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/projected-range.json deleted file mode 100644 index e2032ed2dd9..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/projected-range.json +++ /dev/null @@ -1,772 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - }, - { - "datasource": "TeslaMate", - "enable": false, - "hide": false, - "iconColor": "rgba(255, 96, 96, 1)", - "limit": 100, - "name": "Charged", - "rawQuery": "SELECT\n$__time(start_date),\nend_date as timeend,\nconcat('Charged: ',round(cast(charge_energy_added as numeric),2),' kWh') AS text\nFROM charging_processes\nWHERE\n$__timeFilter(start_date) AND duration_min > 5\nORDER BY start_date DESC", - "showIn": 0, - "tags": [], - "type": "tags" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Mileage.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Mileage" - }, - { - "id": "min" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, [[interval]]) AS time,\n\tconvert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') AS \"Projected [[preferred_range]] range [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nhaving convert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') is not null\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(avg(odometer)::numeric, '$length_unit') AS \"Mileage [$length_unit]\"\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Mileage", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Battery.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "max", - "value": 100 - }, - { - "id": "custom.axisLabel", - "value": "Battery Level" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level)[$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n\t$__timeGroup(date,[[interval]]) AS time,\n avg(battery_level) AS \"Battery Level [%]\", avg(coalesce(usable_battery_level, battery_level)) as \"Usable Battery Level [%]\"\nfrom\n (SELECT\n battery_level, usable_battery_level\n , date\n FROM\n positions\n WHERE\n car_id = $car_id AND\n $__timeFilter(date) and ideal_battery_range_km is not null\n UNION ALL\n select\n battery_level, null as usable_battery_level\n , date\n from charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id) as data\n\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Battery Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Temp.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Temp" - }, - { - "id": "min" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using usable_battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#56A64B", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C8F2C2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 43 - }, - "id": 5, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level) [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tavg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor Temperature [°$temp_unit]\"\n\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Outdoor Temp", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 36, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "6h", - "value": "6h" - }, - "hide": 1, - "label": "Time Resolution", - "name": "interval", - "options": [ - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "15m", - "value": "15m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "3h", - "value": "3h" - }, - { - "selected": true, - "text": "6h", - "value": "6h" - } - ], - "query": "5m,15m,30m,1h,3h,6h", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Projected Range", - "uid": "riqUfXgRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/states.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/states.json deleted file mode 100644 index 95e38b0635c..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/states.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642780620514, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsLocal" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "based on any data ever recorded.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select 1 - sum(duration_min) / (EXTRACT(EPOCH FROM (max(end_date) - min(start_date))) / 60), 1 as time from drives where car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "parked (%)", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0 - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 14, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-2d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "States", - "uid": "xo4BNRkZz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/statistics.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/statistics.json deleted file mode 100644 index d3dd8f2d54e..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/statistics.json +++ /dev/null @@ -1,971 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642773094879, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 195 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy charged" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg cost per kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "maxPerRow": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "format": "table", - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "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", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "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", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "per ${period}", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_kwh", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_consumption_kwh" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_km", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_mi", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": false, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_cost_km": 19, - "avg_cost_mi": 20, - "avg_cost_kwh": 11, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 17, - "date_to": 18, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 15, - "efficiency_charged_net_mi": 16, - "efficiency_net_km": 13, - "efficiency_net_mi": 14, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_cost_km": "Avg cost per km", - "avg_cost_mi": "Avg cost per mi", - "avg_cost_kwh": "Avg cost per kWh", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - }, - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - } - ], - "query": "day,week,month,year", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "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" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "browser", - "title": "Statistics", - "uid": "1EZnXszMk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/timeline.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/timeline.json deleted file mode 100644 index 7c19e598087..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/timeline.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642862616523, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["tesla"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.start_date_ts}&to=${__data.fields.end_date_ts}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC Diff" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 152 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Duration" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Start Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_f/" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/odometer_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/distance_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_diff_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range Diff" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/outside_temp_avg_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/end_range_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Range" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Slot details", - "url": "${__data.fields.slotlink:raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "slotlink" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 22, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🚗 Driving' AS \"Action\",\r\n drives.duration_min AS \"Duration\",\r\n CASE WHEN start_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(start_geofence_id, '/edit')\r\n END AS start_path,\r\n CASE WHEN end_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(end_geofence_id, '/edit')\r\n END AS end_path,\r\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\",\r\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\",\r\n convert_km(end_km::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n convert_km(distance::NUMERIC, '$length_unit') AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n TP2.battery_level AS \"SoC\",\r\n TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/zm7wN6Zgz/drive-details?from=', ROUND(EXTRACT(EPOCH FROM start_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date))*1000, '&var-car_id=', drives.car_id, '&var-drive_id=', drives.id) AS slotlink\r\nFROM drives\r\n LEFT OUTER JOIN positions AS TP1 on drives.start_position_id = TP1.id\r\n LEFT OUTER JOIN positions AS TP2 on drives.end_position_id = TP2.id\r\n LEFT JOIN addresses start_address ON start_address_id = start_address.id\r\n LEFT JOIN addresses end_address ON end_address_id = end_address.id\r\n LEFT JOIN geofences start_geofence ON start_geofence_id = start_geofence.id\r\n LEFT JOIN geofences end_geofence ON end_geofence_id = end_geofence.id\r\n JOIN cars ON cars.id = drives.car_id\r\nWHERE \r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND '🚗 Driving' in ($action_filter)\r\n AND\r\n (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%' or\r\n COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city))::TEXT like '%$text_filter%')\r\n\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🔋 Charging' AS \"Action\",\r\n charging_processes.duration_min AS \"Duration\",\r\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', address.latitude, '&lng=', address.longitude)\r\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n charging_processes.charge_energy_added AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit, \r\n end_battery_level AS \"SoC\",\r\n end_battery_level - start_battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/BHhxFeZRz/charge-details?from=', ROUND(EXTRACT(EPOCH FROM start_date)-10)*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date)+10)*1000, '&var-car_id=', charging_processes.car_id, '&var-charging_process_id=', charging_processes.id) AS slotlink\r\nFROM charging_processes\r\n INNER JOIN positions AS position ON position_id = position.id\r\n LEFT JOIN addresses address ON address_id = address.id\r\n LEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n $__timeFilter(charging_processes.start_date)\r\n AND charging_processes.charge_energy_added > 0\r\n AND charging_processes.car_id = $car_id\r\n AND '🔋 Charging' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nUNION\r\nSELECT\r\n d.end_date AS \"Start\",\r\n LEAD(d.start_date) over w AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM d.end_date)) * 1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000 AS end_date_ts,\r\n '🅿️ Parking' AS \"Action\",\r\n EXTRACT(EPOCH FROM LEAD(d.start_date) over w - d.end_date)/60 AS \"Duration\",\r\n CASE WHEN d.end_geofence_id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\r\n WHEN d.end_geofence_id IS NOT NULL THEN CONCAT(d.end_geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(end_position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(LEAD(d.start_[[preferred_range]]_range_km) over w::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n LEAD(start_position.battery_level) over w AS \"SoC\",\r\n LEAD(start_position.battery_level) over w - end_position.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/FkUpJpQZk/trip?from=', ROUND(EXTRACT(EPOCH FROM d.end_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000, '&var-car_id=', d.car_id) AS slotlink\r\nFROM\r\n drives AS d\r\n LEFT OUTER JOIN positions start_position on d.start_position_id = start_position.id\r\n LEFT OUTER JOIN positions end_position on d.end_position_id = end_position.id\r\n LEFT JOIN addresses address ON d.end_address_id = address.id\r\n LEFT JOIN geofences geofence ON d.end_geofence_id = geofence.id\r\n JOIN cars ON cars.id = d.car_id\r\nWHERE\r\n $__timeFilter(d.end_date)\r\n AND d.car_id=$car_id\r\n AND '🅿️ Parking' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nWINDOW w as (ORDER BY d.id ASC)\r\n\r\nUNION\r\nSELECT\r\n\tT1.end_date +(1 * interval '1 second') AS \"Start\", -- added 1 sec to get it after the corresponding Parking row\r\n\tT2.start_date AS \"End\",\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS start_date_ts,\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS end_date_ts,\r\n\t'❓ Missing' AS \"Action\",\r\n\t-- EXTRACT(EPOCH FROM T2.start_date - T1.end_date)/60 AS \"Duration\",\r\n\tNULL AS \"Duration\",\r\n\tCASE WHEN T1.end_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n\t\tWHEN T1.end_geofence_id IS NOT NULL THEN CONCAT(T1.end_geofence_id, '/edit')\r\n\tEND AS start_path,\r\n\tCASE WHEN T2.start_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n\t\tWHEN T2.start_geofence_id IS NOT NULL THEN CONCAT(T2.start_geofence_id, '/edit')\r\n\tEND AS end_path,\r\n\tCOALESCE(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\",\r\n\tCOALESCE(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\",\r\n\tconvert_km(TP2.odometer::INTEGER, '$length_unit') AS odometer_$length_unit,\r\n\tconvert_km((TP2.odometer - TP1.odometer)::INTEGER, '$length_unit') AS distance_$length_unit,\r\n convert_km(T2.end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit')::INTEGER * efficiency AS \"kWh\",\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit') AS range_diff_$length_unit,\r\n\tNULL AS \"SoC\",\r\n\tNULL AS \"SoC Diff\",\r\n\tNULL AS outside_temp_avg_$temp_unit,\r\n\tNULL AS slotlink\r\n\t-- TP2.battery_level AS \"SoC\",\r\n\t-- TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n\t-- (T1.outside_temp_avg+T2.outside_temp_avg)/2 AS outside_temp_avg_$temp_unit\r\nFROM\r\n\t(SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives) AS T1\r\n\tLEFT OUTER JOIN (SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives ) AS T2 on T1.time_id + 1 = T2.time_id\r\n\tLEFT OUTER JOIN positions AS TP1 on T1.end_position_id = TP1.id\r\n\tLEFT OUTER JOIN positions AS TP2 on T2.start_position_id = TP2.id\r\n\tLEFT JOIN addresses start_address ON T1.end_address_id = start_address.id\r\n\tLEFT JOIN addresses end_address ON T2.start_address_id = end_address.id\r\n\tLEFT JOIN geofences start_geofence ON T1.end_geofence_id = start_geofence.id\r\n\tLEFT JOIN geofences end_geofence ON T2.start_geofence_id = end_geofence.id\r\n\tJOIN cars ON cars.id = T2.car_id\r\nWHERE\r\n\t$__timeFilter(T1.end_date)\r\n\tAND T1.car_id=$car_id \r\n\tAND T2.car_id=$car_id \r\n\tAND TP2.car_id=$car_id \r\n\tAND TP1.car_id=$car_id \r\n\tAND TP2.odometer - TP1.odometer > 0.5\r\n\tAND T1.end_address_id <> T2.start_address_id AND ((T1.end_geofence_id IS NOT NULL OR T2.end_geofence_id IS NOT NULL) OR T1.end_geofence_id <> T2.start_geofence_id)\r\n\tAND '❓ Missing' in ($action_filter)\r\n\tAND (\r\n\t (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%') or\r\n\t (COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city)))::TEXT like '%$text_filter%')\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts, \r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts, \r\n '💾 Updating' AS \"Action\",\r\n\tEXTRACT(EPOCH FROM end_date - start_date)/60 AS \"Duration\",\r\n NULL AS start_path,\r\n NULL AS end_path,\r\n version AS \"Start Address\",\r\n '' AS \"End Address\",\r\n NULL AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n NULL AS end_range_$length_unit,\r\n NULL AS \"kWh\",\r\n NULL AS range_diff_$length_unit,\r\n NULL AS \"SoC\",\r\n NULL AS \"SoC Diff\",\r\n NULL AS outside_temp_avg_$temp_unit,\r\n CONCAT('https://www.notateslaapp.com/software-updates/version/', split_part(version, ' ', 1), '/release-notes') AS slotlink\r\nFROM updates\r\nWHERE \r\n $__timeFilter(start_date)\r\n AND car_id = $car_id \r\n AND '💾 Updating' in ($action_filter)\r\n AND version::TEXT like '%$text_filter%'\r\n\r\nORDER BY \"Start\" DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "candata", - "timeColumn": "datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "End": true, - "start_date_ts": false - }, - "indexByName": { - "Action": 2, - "Duration": 7, - "End": 1, - "End Address": 4, - "SoC": 15, - "SoC Diff": 16, - "Start": 0, - "Start Address": 3, - "distance_km": 8, - "distance_mi": 9, - "end_date_ts": 22, - "end_path": 20, - "end_range_km": 10, - "end_range_mi": 11, - "kWh": 13, - "odometer_km": 5, - "odometer_mi": 6, - "outside_temp_avg_c": 17, - "outside_temp_avg_f": 18, - "range_diff_km": 12, - "range_diff_mi": 13, - "start_date_ts": 21, - "start_path": 19 - }, - "renameByName": { - "action": "", - "end_address": "End", - "km_diff": "Km", - "kwh": "", - "minutediff": "Time", - "odometer": "", - "outside_temp_avg": "Temperature", - "rangediff": "Range Difference", - "soc": "", - "soc_diff": "SoC Difference", - "start_address": "Start", - "start_date": "Date", - "start_date_ts": "" - } - } - } - ], - "type": "table" - } - ], - "refresh": "1h", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Action", - "multi": true, - "name": "action_filter", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "🚗 Driving", - "value": "🚗 Driving" - }, - { - "selected": false, - "text": "🔋 Charging", - "value": "🔋 Charging" - }, - { - "selected": false, - "text": "🅿️ Parking", - "value": "🅿️ Parking" - }, - { - "selected": false, - "text": "❓ Missing", - "value": "❓ Missing" - }, - { - "selected": false, - "text": "💾 Updating", - "value": "💾 Updating" - } - ], - "query": "🚗 Driving,🔋 Charging,🅿️ Parking,❓ Missing,💾 Updating", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Text Filter", - "name": "text_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-14d", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Timeline", - "uid": "SUBgwtigz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/trip.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/trip.json deleted file mode 100644 index e057c567268..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/trip.json +++ /dev/null @@ -1,2643 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:30", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656104359102, - "links": [ - { - "icon": "doc", - "tags": [], - "targetBlank": true, - "title": "Select last three drives", - "type": "link", - "url": "/d/FkUpJpQZk?from=$from" - }, - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 13, - "x": 0, - "y": 1 - }, - "id": 6, - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s') AS time,\n\tavg(latitude) AS latitude,\n\tavg(longitude) AS longitude\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n\t$__timeFilter(date)\nGROUP BY\n\t1\nORDER BY\n\t1 ASC", - "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" - } - ] - } - ], - "transformations": [], - "transparent": true, - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM positions\nWHERE car_id = $car_id AND $__timeFilter(date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charging (AC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging (DC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "driving" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5794F2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 19, - "y": 1 - }, - "id": 38, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent"], - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tnow() AS time,\n\tsum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec,\n\t'driving' as metric\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n \textract(epoch FROM LEAST(end_date, $__timeTo()) - GREATEST(start_date, $__timeFrom())) as duration_sec,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'charging (DC)'\n\t\t\t\t ELSE 'charging (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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ncharges_total AS (\n SELECT\n \tsum(duration_sec) AS duration_sec,\n \tcurrent AS metric\n FROM charges_current\n GROUP BY 2\n ORDER BY metric\n)\n\nSELECT\n\tnow() AS time,\n\tcoalesce(duration_sec, 0) as duration_sec,\n metric\nFROM\n\tcharges_total;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 3 - }, - "id": 26, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n convert_km(sum(end_position.odometer - start_position.odometer)::numeric, '$length_unit') / (sum(extract(epoch FROM end_position.date - start_position.date)) / 3600) as \"speed_$length_unit\"\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date)", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 5 - }, - "id": 28, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH dc_charges AS (\n SELECT\n\t\tcp.id,\n extract(epoch FROM cp.end_date - cp.start_date) as duration_sec,\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 cp.charge_energy_added > 0\n AND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ndata AS (\n (\n SELECT\n sum(end_position.odometer - start_position.odometer) as distance, \n sum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec\n FROM\n drives\n JOIN positions start_position ON start_position_id = start_position.id\n JOIN positions end_position ON end_position_id = end_position.id\n WHERE\n drives.car_id = $car_id\n AND $__timeFilter(start_date)\n ) UNION ALL (\n SELECT\n NULL as distance,\n sum(duration_sec)\n FROM\n dc_charges\n WHERE\n current = 'DC'\n )\n)\n\nSELECT convert_km(sum(distance)::numeric, '$length_unit') / (sum(duration_sec) / 3600) as \"speed_$length_unit\"\nfrom data", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "net" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "net" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 13, - "y": 7 - }, - "id": 30, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "gross" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 16, - "y": 7 - }, - "id": 32, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "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": 9 - }, - "id": 22, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "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" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "${__cell_0}", - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-orange", - "value": 100 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 11, - "x": 13, - "y": 11 - }, - "id": 40, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n\tSELECT range_loss FROM range_loss_between_charges\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_before_first_charge\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_after_last_charge\n)\n\nSELECT 'used' as metric, sum(range_loss * c.efficiency) AS value\nFROM total_range_loss\nLEFT JOIN cars c ON c.id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added as energy_added,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'added (DC)'\n\t\t\t\t ELSE 'added (AC)'\n\t\tEND AS metric\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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n)\n\nSELECT metric, sum(energy_added) AS energy_added\nFROM charges_current\nGROUP BY 1\nORDER BY 1 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 20, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 1, - "showValue": "never", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "state-timeline" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "links", - "value": [ - { - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start_path|end_path|duration_str|car_id|drive_id)" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed\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 $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drives", - "transformations": [], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D" - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 36, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n charge_energy_added,\n charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n c.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n c.car_id,\n cost\n FROM\n charging_processes c\n LEFT JOIN positions p ON p.id = c.position_id\n LEFT JOIN cars ON cars.id = c.car_id\n LEFT JOIN addresses ON addresses.id = c.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n (charge_energy_added IS NULL OR charge_energy_added > 0) AND\n c.car_id = $car_id AND\n $__timeFilter(start_date)\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n charge_energy_added,\n charge_energy_used,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\nORDER BY\n start_date DESC;\n ", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 42, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM positions\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND car_id = $car_id\n GROUP BY 1\n) UNION ALL (\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM charges c\n LEFT JOIN charging_processes p ON c.charging_process_id = p.id\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND p.car_id = $car_id\n GROUP BY 1\n)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Level & Range", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthft" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 8, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s'),\n\tROUND(convert_m(avg(elevation), '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day')\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1642593521525", - "value": "1642593521525" - }, - "datasource": "TeslaMate", - "definition": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "from", - "options": [], - "query": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Trip", - "uid": "FkUpJpQZk", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/updates.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/updates.json deleted file mode 100644 index c63eedfb66f..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/updates.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:15", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1643273221821, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["count"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT count(*)\nFROM updates\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Updates", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 16, - "x": 8, - "y": 1 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY since_last_update) FROM (\n\tSELECT extract(EPOCH FROM start_date - lag(start_date) OVER (ORDER BY start_date)) AS since_last_update\n\tFROM updates\n\tWHERE $__timeFilter(start_date) AND car_id = $car_id\n) d;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Median time between updates", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "time" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "update_duration" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "since_last_update" - }, - "properties": [ - { - "id": "custom.width", - "value": 160 - }, - { - "id": "displayName", - "value": "Since Previous Update" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "displayName", - "value": "Installed Version" - }, - { - "id": "custom.align", - "value": "right" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "${__data.fields[version]} release notes", - "url": "https://www.notateslaapp.com/software-updates/version/${__data.fields[version]}/release-notes" - } - ] - }, - { - "id": "unit", - "value": "string" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_ct" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "# of Charges" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - } - ] - }, - "gridPos": { - "h": 28, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:68", - "alias": "Date", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "start_date", - "type": "date" - }, - { - "$$hashKey": "object:69", - "alias": "End Date", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "end_date", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "$$hashKey": "object:70", - "alias": "Installed Version", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTargetBlank": true, - "linkTooltip": "${__cell} release info", - "linkUrl": "https://www.notateslaapp.com/software-updates/version/${__cell}/release-notes", - "mappingType": 1, - "pattern": "version", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:202", - "alias": "Duration", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "update_duration", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:392", - "alias": "Since Previous Update", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "since_last_update", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:71", - "alias": "# of Charges", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "pattern": "chg_ct", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with u as (\r\n select *, coalesce(lag(start_date) over(order by start_date desc), now()) as next_start_date \r\n from updates\r\n where car_id = $car_id and $__timeFilter(start_date)\r\n),\r\nrng as (\r\n SELECT\r\n\t to_timestamp(floor(extract(epoch from date)/21600)*21600) AS date,\r\n\t (sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100 ) AS \"battery_rng\"\r\n FROM (\r\n select battery_level, usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from positions\r\n where car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\r\n union all\r\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from charges c\r\n join charging_processes p ON p.id = c.charging_process_id \r\n where $__timeFilter(date) and p.car_id = $car_id\r\n ) as data\r\n GROUP BY 1\r\n)\r\n\r\nselect\t\r\n u.start_date as time,\r\n\textract(EPOCH FROM u.end_date - u.start_date) AS update_duration,\r\n\textract(EPOCH FROM u.start_date - lag(u.start_date) OVER (ORDER BY u.start_date)) AS since_last_update,\r\n\tsplit_part(u.version, ' ', 1) as version,\r\n\tcount(distinct cp.id) as chg_ct,\r\n\tconvert_km(avg(r.battery_rng), '$length_unit')::numeric(6,2) AS avg_[[preferred_range]]_range_[[length_unit]]\r\nfrom u u\r\nleft join charging_processes cp\r\n\tON u.car_id = cp.car_id\r\n \tand cp.start_date between u.start_date and u.next_start_date\r\nleft join rng r\r\n\tON r.date between u.start_date and u.next_start_date\r\ngroup by u.car_id,\r\n\tu.start_date,\r\n\tu.end_date,\r\n\tnext_start_date,\r\n\tsplit_part(u.version, ' ', 1)", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Updates", - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Updates", - "uid": "IiC07mgWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/vampire-drain.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/vampire-drain.json deleted file mode 100644 index 033b382c37a..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/vampire-drain.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642779900099, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "displayName", - "value": "End" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "displayName", - "value": "Period" - }, - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(133, 142, 133)", - "value": null - }, - { - "color": "#56A64B", - "value": 43200 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "standby" - }, - "properties": [ - { - "id": "displayName", - "value": "Standby" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FF7383", - "value": null - }, - { - "color": "#FFB357", - "value": 0.3 - }, - { - "color": "#56A64B", - "value": 0.85 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Ø-Power" - }, - { - "id": "unit", - "value": "watt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": " " - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "transparent", - "index": 1, - "text": " " - }, - "1": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated range loss cannot be estimated correctly and is therefore hidden.", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 5 - } - ] - } - ] - }, - "gridPos": { - "h": 23, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with merge as (\n SELECT \n c.start_date AS start_date,\n c.end_date AS end_date,\n c.start_ideal_range_km AS start_ideal_range_km,\n c.end_ideal_range_km AS end_ideal_range_km,\n c.start_rated_range_km AS start_rated_range_km,\n c.end_rated_range_km AS end_rated_range_km,\n start_battery_level,\n end_battery_level,\n p.usable_battery_level AS start_usable_battery_level,\n NULL AS end_usable_battery_level,\n p.odometer AS start_km,\n p.odometer AS end_km\n FROM charging_processes c\n JOIN positions p ON c.position_id = p.id\n WHERE c.car_id = $car_id AND $__timeFilter(start_date)\n UNION\n SELECT \n d.start_date AS start_date,\n d.end_date AS end_date,\n d.start_ideal_range_km AS start_ideal_range_km,\n d.end_ideal_range_km AS end_ideal_range_km,\n d.start_rated_range_km AS start_rated_range_km,\n d.end_rated_range_km AS end_rated_range_km,\n start_position.battery_level AS start_battery_level,\n end_position.battery_level AS end_battery_level,\n start_position.usable_battery_level AS start_usable_battery_level,\n end_position.usable_battery_level AS end_usable_battery_level,\n d.start_km AS start_km,\n d.end_km AS end_km\n FROM drives d\n JOIN positions start_position ON d.start_position_id = start_position.id\n JOIN positions end_position ON d.end_position_id = end_position.id\n WHERE d.car_id = $car_id AND $__timeFilter(start_date)\n), \nv as (\n SELECT\n lag(t.end_date) OVER w AS start_date,\n t.start_date AS end_date,\n lag(t.end_[[preferred_range]]_range_km) OVER w AS start_range,\n t.start_[[preferred_range]]_range_km AS end_range,\n lag(t.end_km) OVER w AS start_km,\n t.start_km AS end_km,\n EXTRACT(EPOCH FROM age(t.start_date, lag(t.end_date) OVER w)) AS duration,\n lag(t.end_battery_level) OVER w AS start_battery_level,\n lag(t.end_usable_battery_level) OVER w AS start_usable_battery_level,\n\t\tstart_battery_level AS end_battery_level,\n\t\tstart_usable_battery_level AS end_usable_battery_level,\n\t\tstart_battery_level > COALESCE(start_usable_battery_level, start_battery_level) AS has_reduced_range\n FROM merge t\n WINDOW w AS (ORDER BY t.start_date ASC)\n ORDER BY start_date DESC\n)\n\nSELECT\n round(extract(epoch FROM v.start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM v.end_date)) * 1000 AS end_date_ts,\n -- Columns\n v.start_date,\n v.end_date,\n v.duration,\n (coalesce(s_asleep.sleep, 0) + coalesce(s_offline.sleep, 0)) / v.duration as standby,\n\t-greatest(v.start_battery_level - v.end_battery_level, 0) as soc_diff,\n\tCASE WHEN has_reduced_range THEN 1 ELSE 0 END as has_reduced_range,\n\tconvert_km(CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range)::numeric END, '$length_unit') AS range_diff_$length_unit,\n CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range) * c.efficiency END AS consumption,\n CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) * c.efficiency) / (v.duration / 3600) * 1000 END as avg_power,\n convert_km(CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) / (v.duration / 3600))::numeric END, '$length_unit') AS range_lost_per_hour_[[length_unit]]\nFROM v,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'asleep' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_asleep,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'offline' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_offline\nJOIN cars c ON c.id = $car_id\nWHERE\n v.duration > ($duration * 60 * 60)\n AND v.start_range - v.end_range >= 0\n AND v.end_km - v.start_km < 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Vampire Drain", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "tags": [], - "text": "6", - "value": "6" - }, - "hide": 0, - "includeAll": false, - "label": "min. Idle Time (h)", - "multi": false, - "name": "duration", - "options": [ - { - "selected": false, - "text": "0", - "value": "0" - }, - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "3", - "value": "3" - }, - { - "selected": true, - "text": "6", - "value": "6" - }, - { - "selected": false, - "text": "12", - "value": "12" - }, - { - "selected": false, - "text": "18", - "value": "18" - }, - { - "selected": false, - "text": "24", - "value": "24" - } - ], - "query": "0,1,3,6,12,18,24", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Vampire Drain", - "uid": "zhHx2Fggk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/visited.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate1/visited.json deleted file mode 100644 index 08ff417b4e1..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate1/visited.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 10000000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "latitude": "lat", - "longitude": "long", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "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", - "refId": "Positions", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - } - } - ], - "title": "MAP", - "type": "geomap" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Visited", - "uid": "RG_DxSmgk", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/BatteryHealth.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/BatteryHealth.json deleted file mode 100644 index 2ad8139b02f..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/BatteryHealth.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "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)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 37, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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", - "group": [], - "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;", - "refId": "Odometer", - "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" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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", - "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", - "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 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 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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "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", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 2024-03-19\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health V2", - "uid": "jchmRiqUfXgRx", - "version": 23, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/BrowseCharges.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/BrowseCharges.json deleted file mode 100644 index 673f9f3e164..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/BrowseCharges.json +++ /dev/null @@ -1,1486 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "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 --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1686816148286, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "filterable": false, - "inspect": false, - "minWidth": 150 - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 160 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.minWidth", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 300 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.displayMode", - "value": "basic" - }, - { - "id": "color", - "value": { - "mode": "continuous-RdYlGr" - } - }, - { - "id": "max", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 80 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_type" - }, - "properties": [ - { - "id": "displayName", - "value": "Type" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.minWidth", - "value": 40 - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n CASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC' ELSE 'AC' END AS charge_type\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n charge_type,\n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND duration_min >= '$min_duration_min'\n AND CASE WHEN $cost = 0 THEN (cost IS NULL OR cost >= 0) ELSE cost >= $cost END\n AND charge_type = ANY(CASE WHEN array_to_string(ARRAY[$charge_type], ',') = 'DC' THEN ARRAY['DC'] WHEN array_to_string(ARRAY[$charge_type], ',') = 'AC' THEN ARRAY['AC'] ELSE ARRAY['DC', 'AC'] END)\n AND address ILIKE '%$location%'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges: $charge_type", - "transformations": [], - "type": "table" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 0, - "y": 21 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy added", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_added"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 7, - "y": 21 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy used", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_used"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 14, - "y": 21 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Cost", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["cost"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 19, - "y": 21 - }, - "id": 15, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Average Duration", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["duration_min"] - } - } - } - ], - "transparent": true, - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Type a text contained in Location", - "hide": 0, - "label": "Location", - "name": "location", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "allValue": "", - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Type", - "multi": true, - "name": "charge_type", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "AC", - "value": "AC" - }, - { - "selected": false, - "text": "DC", - "value": "DC" - } - ], - "query": "AC, DC", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Cost >=", - "name": "cost", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Duration (minutes) >=", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Browse Charges", - "uid": "jchmTSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCostsStats.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCostsStats.json deleted file mode 100644 index 459607f6d62..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCostsStats.json +++ /dev/null @@ -1,3404 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "title": "Summary", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 10, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Energy Used", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 33, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost = 0;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Free Energy", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 64, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH energy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id),\r\nsince as (\r\n\tSELECT date FROM positions\r\n\tWHERE car_id = $car_id\r\n\tORDER BY date ASC\r\n\tLIMIT 1\r\n)\r\nSELECT (energy.charged_kWh / $distance_driven) as \"kwh_per_$length_unit\" FROM energy", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "kWh per $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "times" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 1 - }, - "id": 38, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_used > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "For this section, it's important that you have geo-fences called \"Home\" and \"Work\" if you want to see a bar with the energy charged on those places.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 49, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "/^energy$/", - "values": true - }, - "showUnfilled": false, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT location, SUM(charge_energy_used) AS Energy\r\nFROM (\r\nSELECT\r\n CASE\r\n WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Home%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Work%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%' THEN 'Superchargers'\r\n\t ELSE 'Other'\r\n END AS location, charge_energy_used\r\nFROM\r\n\tcharging_processes c\r\nLEFT JOIN addresses address ON c.address_id = address.id\r\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n\t car_id = $car_id\r\n\tAND $__timeFilter(end_date)\r\n\tAND c.charge_energy_used > 0\r\n) ChargeLocations\r\nGROUP BY location\r\nORDER BY Energy DESC", - "refId": "A", - "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" - } - ] - } - ], - "title": "Main locations", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of all the charges in a given period (last 10 years by default). You can see the distance driven, number of charges, total charging cost, etc., both in summary or in separated lists.\n\nYou can expand/collapse the rows as needed.\n\nFrom the Monthly Stats row, you will have a table with links to other Teslamate Dashboards to have a look on a specific period, charge or trip.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 51, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.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 cp.charge_energy_used > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_used) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Use the dropdown at the top to choose the Geofence to display energy added from", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 4 - }, - "id": 66, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes cp\r\nINNER JOIN geofences g ON g.id = cp.geofence_id\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id AND g.name = '$geofence'\r\nGROUP BY g.name),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at $geofence", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 4 - }, - "id": 65, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n\tAND cost = 0),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added free (no cost)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 4 - }, - "id": 67, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH suc_data AS (\r\n\tSELECT c.charging_process_id\r\n\tFROM charges c\r\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\r\n\tLEFT JOIN addresses addr ON addr.id = cp.address_id\r\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\r\n\tWHERE \r\n cp.car_id = $car_id AND c.fast_charger_present\r\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\r\n AND $__timeFilter(end_date)\r\n\tGROUP BY 1\r\n), suc_energy AS (\r\n SELECT coalesce(sum(charge_energy_used), 0) AS charged_kWh\r\n FROM charging_processes cp\r\n INNER JOIN suc_data ON suc_data.charging_process_id = cp.id\r\n), energy AS(\r\n SELECT\r\n\t sum(charge_energy_used) AS charged_kWh\r\n FROM charging_processes\r\n WHERE $__timeFilter(end_date)\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * suc_energy.charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, suc_energy;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 4 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $distance_driven as \"distance_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Driven", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 7 - }, - "id": 56, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $ACCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at AC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 7 - }, - "id": 44, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $DCCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at DC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 7 - }, - "id": 14, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $SucCost", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 7 - }, - "id": 27, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $TotalCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Costs", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 10 - }, - "id": 40, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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) / $distance_driven * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 10 - }, - "id": 42, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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_used, charge_energy_used))\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average kWh Cost", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Net is the efficiency while driving", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 10 - }, - "id": 69, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Gross is all consumption (including while idle, phantom drains, sentry mode, etc)", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 10 - }, - "id": 71, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 60, - "panels": [], - "title": "Top 10 Charges", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 0, - "y": 14 - }, - "id": 46, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 General Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 6, - "y": 14 - }, - "id": 4, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost > 0\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Paid Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 14 - }, - "id": 34, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%'\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 SuperCharger Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 14 - }, - "id": 32, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND cost = 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Free Stations (Charged)", - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 62, - "panels": [], - "title": "Monthly Stats", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy used" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsSystem" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "noValue", - "value": "--" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "NaN": { - "index": 0, - "text": "--" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 15, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 58, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.4.0", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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 date_trunc('month', (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('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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 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 sum(distance)/sum(range_diff) AS efficiency\nFROM data WHERE\n car_id = $car_id\nGROUP BY date\nORDER BY date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n charging_processes.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM charging_processes)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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_used,charge_energy_used)) AS sum_consumption_kwh,\n sum(greatest(charge_energy_used,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 (charge_energy_used IS NULL OR charge_energy_used > 0.1)\nGROUP BY date\nORDER BY date", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM drives)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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\nGROUP BY date\nORDER BY date", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per month", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 8, - "avg_outside_temp_c": 3, - "cnt_charges": 7, - "cost_charges": 5, - "date": 1, - "date_from": 11, - "date_to": 12, - "display": 0, - "efficiency": 4, - "efficiency_charged_net_km": 10, - "efficiency_charged_net_km_temp": 13, - "efficiency_net_km": 9, - "sum_consumption_kwh": 6, - "sum_distance_km": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy used", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "TotalCost", - "options": [], - "query": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "SucCost", - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "DCCost", - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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);", - "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);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "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": 2, - "includeAll": false, - "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, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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)", - "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)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name FROM geofences ORDER BY id", - "description": "Geofence to display energy added at", - "hide": 0, - "includeAll": false, - "label": "Geofence", - "multi": false, - "name": "geofence", - "options": [], - "query": "SELECT name FROM geofences ORDER BY id", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Costs Stats", - "uid": "jchmDdLe5uFVk", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCurveStats.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCurveStats.json deleted file mode 100644 index e5f60191d7c..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ChargingCurveStats.json +++ /dev/null @@ -1,870 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd", - "seriesBy": "last" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 10 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 29, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]", - "fixed": "super-light-yellow" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - SOC [%]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Supercharger Charging Curve", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 10, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Other DC Charging Curve", - "type": "xychart" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 40, - "panels": [], - "title": "Fast Charging Sessions", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the charging curve sessions on Tesla Supercharges or other Fast Charging Station.\n\nAlso, you can see number of fast charging sessions you've done on each type of chargers and the count of max power (kW) reached on a session.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 4, - "x": 0, - "y": 15 - }, - "id": 38, - "options": { - "displayLabels": ["value", "percent"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_summary AS (\n SELECT\n cp.id,\n COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.road, addr.house_number), '')), addr.city)) AS location,\n COUNT(c.charging_process_id)\n FROM\n charging_processes cp\n LEFT JOIN \n addresses addr ON addr.id = address_id\n LEFT JOIN\n geofences geo ON geo.id = geofence_id\n LEFT JOIN\n charges c ON cp.id = c.charging_process_id\n WHERE\n $__timeFilter(date) AND\n cp.car_id = $car_id AND cp.charge_energy_added > 0.01 AND c.fast_charger_present \n GROUP BY 1, 2\n)\nSELECT \n CASE\n WHEN location ILIKE '%supercharger%' THEN 'Tesla Supercharger'\n ELSE 'Other DC Stations' END AS location,\n COUNT(location) AS n\nFROM charges_summary\nGROUP BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-greens" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 90, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "Number of times" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 20, - "x": 4, - "y": 15 - }, - "id": 34, - "links": [], - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xField": "Power [kW]", - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH power_summary AS (\n SELECT ROUND(MAX(charges.charger_power) / 5, 0) * 5 AS \"power\"\n FROM charging_processes\n LEFT JOIN charges ON charging_processes.id = charges.charging_process_id\n WHERE $__timeFilter(date) AND charging_processes.car_id = $car_id AND charging_processes.charge_energy_added > 0.01 AND charges.fast_charger_present\n GROUP BY charging_processes.id\n)\nSELECT power_summary.power AS \"Power [kW]\", COUNT(power_summary.power) AS n\nFROM power_summary\nWHERE power_summary.power >= $filter_power_from AND power_summary.power <= $filter_power_to\nGROUP BY 1\nORDER BY 1 DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Max Power", - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Power >=", - "name": "filter_power_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "260", - "value": "260" - }, - "hide": 0, - "label": "Power <=", - "name": "filter_power_to", - "options": [ - { - "selected": true, - "text": "260", - "value": "260" - } - ], - "query": "260", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "SOC >=", - "name": "filter_soc_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "100", - "value": "100" - }, - "hide": 0, - "label": "SOC <=", - "name": "filter_soc_to", - "options": [ - { - "selected": true, - "text": "100", - "value": "100" - } - ], - "query": "100", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Curve Stats", - "uid": "jchmXpkIkhmRz", - "version": 9, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ContinuousTrips.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ContinuousTrips.json deleted file mode 100644 index 93d06f58ebe..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/ContinuousTrips.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View Trip details", - "url": "d/FkUpJpQZk?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-BlPu" - } - }, - { - "id": "max", - "value": 400 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "custom.minWidth", - "value": 180 - }, - { - "id": "displayName", - "value": "End Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "custom.minWidth", - "value": 120 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitykmh" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitymph" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/%/" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_km" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_temp_c" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.minWidth", - "value": 150 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 90 - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-red", - "value": null - }, - { - "color": "super-light-yellow", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - } - ] - }, - "gridPos": { - "h": 30, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH \r\ntrip AS (\r\n SELECT start_date sd, end_date ed, distance, duration_min, start_usable_battery_level, end_usable_battery_level, \r\n outside_temp_avg, power_max, speed_max, start_[[preferred_range]]_range_km, end_[[preferred_range]]_range_km\r\n FROM drives INNER JOIN (\r\n SELECT drive_id, MIN(usable_battery_level) AS end_usable_battery_level, MAX(usable_battery_level) AS start_usable_battery_level\r\n FROM (\r\n SELECT p.drive_id, p.usable_battery_level, ROW_NUMBER() OVER (PARTITION BY p.drive_id ORDER BY date) AS row_num\r\n FROM drives d INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE d.car_id = $car_id\r\n AND $__timeFilter(p.date)\r\n AND d.end_date IS NOT NULL\r\n AND d.duration_min > 0\r\n AND d.start_[[preferred_range]]_range_km > d.end_[[preferred_range]]_range_km\r\n AND p.usable_battery_level IS NOT NULL\r\n ) AS pos\r\n GROUP BY drive_id\r\n ) AS filter_drives ON filter_drives.drive_id = drives.id\r\n),\r\ncp AS (\r\n SELECT car_id, start_date, end_date, COALESCE(LAG(start_date) OVER(ORDER BY start_date DESC), now()) next_date, start_battery_level, end_battery_level\r\n FROM charging_processes WHERE $__timeFilter(start_date) AND car_id = $car_id\r\n),\r\ndriven AS (\r\nSELECT cp.car_id, cp.start_date, cp.end_date, cp.next_date, \r\n MIN(trip.sd) trip_start_date, \r\n MAX(trip.ed) trip_end_date,\r\n SUM(convert_km(trip.distance::numeric, '$length_unit')) AS distance_$length_unit, \r\n MAX(convert_km(trip.speed_max::numeric, '$length_unit')) AS speed_max_$length_unit,\r\n SUM(trip.duration_min) duration_min,\r\n MAX(trip.start_usable_battery_level) start_soc, \r\n MIN(trip.end_usable_battery_level) end_soc, \r\n AVG(convert_celsius(trip.outside_temp_avg, '$temp_unit')) AS avg_temp_$temp_unit, \r\n MAX(trip.power_max) AS power_max, \r\n convert_km((MAX(trip.start_[[preferred_range]]_range_km) - MIN(trip.end_[[preferred_range]]_range_km))::numeric, '$length_unit') AS range_diff_$length_unit \r\n\tFROM cp\tINNER JOIN trip ON trip.sd BETWEEN cp.start_date and cp.next_date\r\n GROUP BY cp.car_id, cp.start_date, cp.end_date, cp.next_date\r\n)\r\nSELECT \r\n ROUND(EXTRACT(epoch FROM start_date) - 10) * 1000 AS start_date_ts, ROUND(EXTRACT(epoch FROM next_date) + 10) * 1000 AS end_date_ts, start_date, next_date end_date,\r\n distance_$length_unit, duration_min * 60 as duration_min, \r\n (distance_$length_unit / duration_min * 60) as speed_$length_unit, \r\n start_soc as \"% Start\", end_soc as \"% End\", avg_temp_$temp_unit, power_max, speed_max_$length_unit,\r\n (range_diff_$length_unit * car.efficiency) consumption_kwh, \r\n (range_diff_$length_unit * car.efficiency / distance_$length_unit * 1000.0) consumption_kWh_$length_unit,\r\n (distance_$length_unit / range_diff_$length_unit) efficiency\r\nFROM driven\r\nINNER JOIN cars car ON car.id = driven.car_id\r\nWHERE distance_$length_unit >= $min_dist AND (distance_$length_unit / duration_min * 60) >= $min_avg_speed\r\nORDER BY start_date DESC\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Long Trips", - "transformations": [], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings limit 1", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_temperature FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "SELECT unit_of_temperature FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Distance >=", - "name": "min_dist", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Avg Speed >=", - "name": "min_avg_speed", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Continuous Trips", - "uid": "jchmY8upc6ZRk", - "version": 5, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentChargeView.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentChargeView.json deleted file mode 100644 index 5e30f174b5f..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentChargeView.json +++ /dev/null @@ -1,1953 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["Custom"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Charge", - "tooltip": "Show Current Charge Data", - "type": "link", - "url": "d/jchm9RxutVS7a/current-charge-view?kiosk&var-car_id=${car_id}&from=${current_charge_time}&to=${current_end_time}&var-BatteryCapacity=${BatteryCapacity}&var-charging_processes=${charging_processes}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 8, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level as \"SOC [%]\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 33, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kWh$/", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level * $BatteryCapacity / 100 as \"kWh\", $BatteryCapacity AS Total FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Load this dashboard to while you are in a charging session. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Charge\" button at the top right corner, to enter in Kiosk mode:\n\n- If you are charging, you will see the information from the start time of the current charge session until now and it will refesh automatically every 30 seconds.\n\n- If you are just browsing (not charging) you will see the information of the last charge session.", - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 51, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
\n\n
", - "mode": "html" - }, - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "decimals": 2, - "mappings": [], - "max": 49, - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 36, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^Added$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "kWh Added", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(charge_energy_added) as \"Added\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 37, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city)) FROM \tcharging_processes c \tLEFT JOIN addresses ON addresses.id = c.address_id \tLEFT JOIN geofences g ON g.id = geofence_id WHERE \tc.id = $charging_processes", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 51, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SOC [%]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 12, - "x": 0, - "y": 2 - }, - "id": 28, - "options": { - "legend": { - "calcs": ["mean", "min", "max", "last"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "alias": "Power [kW]", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["none"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level as \"SOC [%]\", (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]\", (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as \"Battery heater\" FROM charges c JOIN charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) and p.car_id = $car_id ORDER BY 1", - "refId": "Power", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "tags": [], - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-green", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": " SELECT battery_level as \"Initial SOC\" FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1", - "refId": "Inital SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT battery_level - (SELECT battery_level as \"Added\" FROM charges where charging_process_id=$charging_processes\tORDER BY DATE ASC \tLIMIT 1) as \"Added\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "clocks" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Elapsed Time", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "WITH start_process AS ( SELECT date FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1 ) SELECT EXTRACT(EPOCH FROM (charges.date - start_process.date)) AS \"Elapsed\" FROM charges, start_process WHERE charging_process_id = $charging_processes AND $__timeFilter(charges.date) order by charges.date desc LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["utc"], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 6, - "x": 18, - "y": 4 - }, - "id": 50, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 20, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-yellow", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "Km" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 7 - }, - "id": 16, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"Odometer\" from positions where car_id = $car_id order by date desc limit 1;", - "refId": "odometer", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 10 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Initial Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 asc limit 1", - "refId": "Initial Range", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Rated Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Rated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Estimated", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(est_battery_range_km, '$length_unit')) as \"Estimated Range\" FROM positions WHERE $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Estimated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Current" - }, - "properties": [ - { - "id": "unit", - "value": "amp" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 49, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_actual_current else ((2.85 + (usable_battery_level * 0.013)) * 96) * charger_power / 100 end) as \"Current\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 14 - }, - "id": 47, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^Volt$/", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_voltage else charger_power / GREATEST(0.1, (((2.85 + (usable_battery_level * 0.013)) * 96.0) * charger_power / 100.0)) * 1000.0 end) as \"Volt\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "orange", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 18 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(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\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "celsius" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 18 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Outdoor", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(inside_temp, '$temp_unit')) AS \"Inside\" FROM positions WHERE car_id = $car_id and inside_temp is not null AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Inside", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \t$__timeGroupAlias(date,$__interval), \tavg(convert_celsius(driver_temp_setting, '$temp_unit')) as \"Driver\" FROM positions WHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Driver", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_charge_time", - "options": [], - "query": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "charging_processes", - "options": [], - "query": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_end_time", - "options": [], - "query": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Current Charge View", - "uid": "jchm9RxutVS7a", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentDriveView.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentDriveView.json deleted file mode 100644 index 0917402bf8a..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentDriveView.json +++ /dev/null @@ -1,1858 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Drive", - "tooltip": "Adjust to current drive", - "type": "link", - "url": "d/jchmkOuP_Fggz/current-drive-view?kiosk&var-car_id=${car_id}&from=${current_drive_start_time}&to=${current_drive_end_time}&var-current_drive=${current_drive}&var-BatteryCapacity=${BatteryCapacity}&var-efficiency=${efficiency}&var-preferred_range=${preferred_range}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This is a special dashboard to load while driving. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Drive\" button at the top right corner, to enter in Kiosk mode:\n\n - If you are driving, you will see the information from the start time of the current drive until now and it will refesh automatically every 30 seconds.\n\n - If you are just browsing (not driving) you will see the information of the last drive.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-orange", - "mode": "fixed", - "seriesBy": "last" - } - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "dark-green", - "value": 0 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 26, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tavg(power) AS Power,\n\tavg(battery_heater::integer) AS \"Battery heater\",\n\tavg(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Elevation", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Power", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Consumption", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 3 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN $efficiency\n\t WHEN '$length_unit' = 'mi' THEN $efficiency * 1.60934\n\tEND as \"efficiency_$length_unit\"\nFROM settings\nWHERE\tid = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 20, - "y": 6 - }, - "id": 29, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 22, - "y": 6 - }, - "id": 31, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 12 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 12 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 12 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 12 - }, - "id": 27, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 12 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 15, - "y": 12 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 33, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - } - ], - "refresh": "10s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive", - "options": [], - "query": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_start_time", - "options": [], - "query": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_end_time", - "options": [], - "query": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "efficiency", - "options": [], - "query": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current Drive View", - "uid": "jchmkOuP_Fggz", - "version": 8, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentState.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentState.json deleted file mode 100644 index 4c487639572..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/CurrentState.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "state-timeline", - "name": "State timeline", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsSystem" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 4, - "y": 0 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 69, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "$preferred_range range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 70, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km(est_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND est_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km(ideal_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "estimated range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 85, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date FROM positions WHERE car_id = $car_id AND $__timeFilter(date) ORDER BY date DESC LIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 71, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS \"Front left\",\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS \"Front right\",\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS \"Rear left\",\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS \"Rear right\"\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure ($pressure_unit)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 86, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 59, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 63, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 4 - }, - "id": 61, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC \nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 8 - }, - "id": 79, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\n\tFROM drives d\n\tLEFT JOIN addresses ON addresses.id = d.end_address_id\n\tLEFT JOIN geofences g ON g.id = d.end_geofence_id\nWHERE\n\t $__timeFilter(d.end_date) AND d.car_id = $car_id \nORDER BY d.end_date DESC\nLIMIT 1", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Location", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "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" - } - ], - "noValue": "0", - "unit": "dtdhms" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 9, - "x": 15, - "y": 8 - }, - "id": 41, - "options": { - "displayLabels": ["percent", "name"], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^total_time$/", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [2, 0]) AS state\r\n FROM charging_processes\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [1, 0]) AS state\r\n FROM drives\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n start_date AS date,\r\n CASE\r\n WHEN state = 'offline' THEN 3\r\n WHEN state = 'asleep' THEN 4\r\n WHEN state = 'online' THEN 5\r\n END AS state\r\n FROM states\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [6, 0]) AS state\r\n FROM updates\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n), aux AS (\r\n SELECT $__timeFrom() :: timestamp AS date, (SELECT state FROM states WHERE date <= $__timeFrom() ORDER BY date DESC LIMIT 1) AS state, false AS include\r\n UNION\r\n SELECT date, state, true AS include FROM states\r\n UNION\r\n SELECT $__timeTo() :: timestamp as date, NULL AS state, true as include\r\n ORDER BY date\r\n), states_elapsed AS (\r\n SELECT \r\n date, state AS current_state, include,\r\n LAG(state) OVER (ORDER BY date) AS state,\r\n LAG(date) OVER (ORDER BY date) AS last_state_time,\r\n date - LAG(date) OVER (ORDER BY date) AS elapsed_time\r\n FROM aux \r\n)\r\nSELECT \r\n CASE\r\n WHEN state = 0 OR state = 5 THEN 'online'\r\n WHEN state = 1 THEN 'driving'\r\n WHEN state = 2 THEN 'charging'\r\n WHEN state = 3 THEN 'offline'\r\n WHEN state = 4 THEN 'asleep'\r\n WHEN state = 6 THEN 'updating'\r\n END AS state,\r\n EXTRACT(EPOCH FROM SUM(elapsed_time)) as Total_Time\r\nFROM states_elapsed\r\nWHERE $__timeFilter(date) AND include\r\nGROUP BY 1\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 11 - }, - "id": 55, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id AND $__timeFilter(date)\norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 57, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id AND start_date <= $__timeTo()\norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 83, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current State", - "uid": "jchmo4BNRkZz", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/DCChargingCurvesByCarrier.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/DCChargingCurvesByCarrier.json deleted file mode 100644 index 427731fac92..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/DCChargingCurvesByCarrier.json +++ /dev/null @@ -1,1026 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%'\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charger Carrier Contains: $carrier", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 44, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n COALESCE(g.name, a.name) AS name\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id, g.name, a.name\r\n)\r\nSELECT name AS \"Charger Carrier\" FROM data GROUP BY name\r\n\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 16 - }, - "id": 35, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_added)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Added", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 6, - "y": 16 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_used)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Used", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 11, - "y": 16 - }, - "id": 34, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(duration_min)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Time", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 16 - }, - "id": 37, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.cost)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 16 - }, - "id": 38, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n AVG(p.charge_energy_used) AS charge_energy_used, AVG(p.cost) AS cost \r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id\r\n)\r\nSELECT AVG(cost) / AVG(charge_energy_used) cost_kwh FROM data", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost per kWh", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "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" - } - ], - "title": "Help", - "type": "row" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Carrier Name", - "hide": 0, - "label": "Carrier", - "name": "carrier", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "DC Charging Curves by Carrier", - "uid": "jchmXpkcccIkh", - "version": 6, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/DatabaseDashboadInfo.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/DatabaseDashboadInfo.json deleted file mode 100644 index 1607e0f4915..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/DatabaseDashboadInfo.json +++ /dev/null @@ -1,1233 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 5, - "y": 0 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Charges\" FROM charging_processes WHERE car_id=$car_id \n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives\" FROM drives WHERE car_id=$car_id ", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 10, - "y": 0 - }, - "id": 39, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Nº Car Updates\"\nFROM Updates \nWHERE car_id = $car_id\n", - "refId": "Car Updates", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as \"Current Car Firmware\" \r\nfrom updates \r\nwhere car_id = $car_id \r\norder by start_date desc \r\nlimit 1", - "refId": "Firmware", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Software", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 15, - "y": 0 - }, - "id": 42, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Charges not closed\"\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives not closed\"\r\nFROM drives \r\nWHERE car_id = $car_id AND end_date is null", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Incomplete Data", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 40, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "You can go to the \nIncomplete Data dashboard
\nto see details of the **Drives** or **Charges** not closed.\n", - "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" - } - ] - } - ], - "title": "About incomplete data", - "type": "text" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 34, - "panels": [], - "title": "Database Information", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Size" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 0, - "y": 5 - }, - "id": 33, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT \r\n relname AS \"Table\",\r\n pg_size_pretty(pg_total_relation_size(relid)) As \"Size\"\r\nFROM \r\n pg_catalog.pg_statio_user_tables\r\nORDER BY \r\n pg_total_relation_size(relid) DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Row Count" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 5, - "y": 5 - }, - "id": 38, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT table_name AS \"Table Name\", \r\n (xpath('/row/cnt/text()', xml_count))[1]::text::int AS \"Row Count\"\r\nFROM (\r\n SELECT table_name, \r\n query_to_xml(format('SELECT count(*) as cnt FROM %I.%I', table_schema, table_name), false, true, '') AS xml_count\r\n FROM information_schema.tables\r\n WHERE table_schema NOT IN ('pg_catalog', 'information_schema')\r\n) AS t\r\nORDER BY 2 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "These statistics can help you evaluate the efficiency of your indexes.\n\nYou should reindex all the database periodically.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 14, - "x": 10, - "y": 5 - }, - "id": 41, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\r\n relname AS \"Table\",\r\n indexrelname AS \"Index\",\r\n idx_scan AS \"Index Scans\",\r\n idx_tup_read AS \"Tuples Read\",\r\n idx_tup_fetch AS \"Tuples Fetched\"\r\nFROM\r\n pg_stat_all_indexes\r\nWHERE\r\n schemaname NOT LIKE 'pg_%' AND\r\n indexrelname IS NOT NULL\r\nORDER BY 3 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Indexes", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 0, - "y": 21 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n pg_size_pretty(SUM(pg_total_relation_size(relid))) As \"Size\"\nFROM \n pg_catalog.pg_statio_user_tables;", - "refId": "DistanceLogged", - "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" - } - ] - } - ], - "title": "Database Total Size", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [ - { - "targetBlank": true, - "title": "Click to check last Version", - "url": "https://github.com/jheredianet/Teslamate-CustomGrafanaDashboards/releases/" - } - ], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 14, - "x": 10, - "y": 21 - }, - "id": 43, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "SELECT '2024.04.02' AS \"Current Version\"", - "refId": "DashboardVersion", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "About Teslamate Custom Dashboards", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "description": "", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Database Information", - "uid": "jchm_dbInfo", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/IncompleteData.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/IncompleteData.json deleted file mode 100644 index 84e5fce4dcc..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/IncompleteData.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1686842645876, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": false - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT 'Car ID: ' || id as id, 'Name: '|| name as name , 'Model: '|| model as model, 'VIN: '|| vin as vin, \n 'Color: '|| exterior_color as color, 'Wheels: '|| wheel_type, 'Efficiency: '|| efficiency as efficiency \nFROM cars\nWHERE id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Car Information 🚘", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "content": "#### Incomplete Data\n\nFrom here you can check if you have incomplete data of **Drives** and **Charges**. If so, you may follow the official guide by Manually fixing data", - "mode": "markdown" - }, - "pluginVersion": "8.5.15", - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 15, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id AS \"Drive ID\", start_date, end_date, distance, duration_min \nFROM drives \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Drives 🛣️", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 22, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id as \"Charging Process ID\", start_date, end_date, charge_energy_added, charge_energy_used, start_battery_level, end_battery_level, duration_min\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Charges 🪫", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Incomplete Data", - "uid": "jchmIDopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/MileageStats.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/MileageStats.json deleted file mode 100644 index 27ca8a4fe6f..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/MileageStats.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "dtdurations" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "max", - "value": 1 - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 9, - "x": 0, - "y": 1 - }, - "id": 10, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "10.1.2", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per ${period}", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 16, - "date_to": 17, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 14, - "efficiency_charged_net_mi": 15, - "efficiency_net_km": 12, - "efficiency_net_mi": 13, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 80, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cnt" - }, - "properties": [ - { - "id": "unit", - "value": "drives" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Count" - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 27, - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0.7, - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "always", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.6", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 \"Period\",\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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "${length_unit} & drives per ${period}", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["sum_distance_km", "cnt", "Period"] - } - } - } - ], - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - }, - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - } - ], - "query": "month,year,day,week", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage Stats", - "uid": "jchmNjtMTFx", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/SpeedRates.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/SpeedRates.json deleted file mode 100644 index 666e8f8c3cc..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/SpeedRates.json +++ /dev/null @@ -1,1218 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "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": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "avg_consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "min" - }, - { - "id": "max" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "max" - }, - { - "id": "min" - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (km/h)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (mph)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Avg. Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n BinnedData.speed_bin AS speed_range_$length_unit,\r\n convert_km(BinnedData.total_odometer_distance::numeric, '$length_unit') AS avg_distance_$length_unit,\r\n BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END AS avg_speed_$length_unit,\r\n ((BinnedData.total_energy_consumed / (BinnedData.total_distance * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END)) * 1000 ) / (BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END) AS avg_consumption_$length_unit,\r\n avg_power\r\nFROM\r\n (SELECT\r\n CASE\r\n WHEN elevation_diff >= 1 THEN 'Uphill'\r\n WHEN elevation_diff <= -1 THEN 'Downhill'\r\n ELSE 'Flat'\r\n END AS terrain_type,\r\n ROUND(speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END / 10, 0) * 10 AS speed_bin,\r\n AVG(power) AS avg_power,\r\n SUM(power::integer * speed::integer / 60.0) AS total_energy_consumed,\r\n SUM(speed / 60.0) AS total_distance,\r\n SUM(odometer_distance) AS total_odometer_distance,\r\n AVG(speed) AS avg_speed,\r\n car_id\r\n FROM\r\n (SELECT\r\n drives.car_id,\r\n positions.speed,\r\n positions.power,\r\n positions.elevation - LAG(positions.elevation) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS elevation_diff,\r\n positions.odometer - LAG(positions.odometer) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS odometer_distance\r\n FROM\r\n drives\r\n JOIN positions ON drives.id = positions.drive_id\r\n WHERE\r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND drives.end_date IS NOT NULL\r\n AND drives.distance >= convert_km($min_distance::numeric, '$length_unit')\r\n ) AS DifferentialData\r\n GROUP BY speed_bin, terrain_type, car_id\r\n ) AS BinnedData\r\nJOIN cars ON BinnedData.car_id = cars.id\r\nWHERE BinnedData.terrain_type = '$terrain_type'\r\n AND BinnedData.total_distance > 0 \r\n AND BinnedData.total_odometer_distance > 0\r\n AND BinnedData.speed_bin >= $min_speed_segment\r\nORDER BY BinnedData.speed_bin DESC;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption by speed - $terrain_type Terrain", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere $__timeFilter(end_date) and car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 14, - "y": 6 - }, - "id": 4, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere $__timeFilter(end_date) \n and distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 17, - "y": 6 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t $__timeFilter(end_date)\n\t and end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance > 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 20, - "y": 6 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "seconds_elapsed" - }, - "properties": [ - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 16, - "links": [], - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \r\n speed_section_$length_unit || CASE WHEN '$length_unit' = 'km' THEN ' km/h' WHEN '$length_unit' = 'mi' THEN ' mph' END AS speed,\r\n SUM(seconds_elapsed) AS seconds_elapsed\r\nFROM (\r\n SELECT\r\n ROUND(convert_km(p.speed::numeric, '$length_unit') / 10,0) * 10 AS speed_section_$length_unit,\r\n EXTRACT(EPOCH FROM (LEAD(p.\"date\") OVER (ORDER BY p.\"date\") - p.\"date\")) AS seconds_elapsed\r\n FROM drives d\r\n INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE\r\n $__timeFilter(d.start_date)\r\n AND d.car_id = $car_id \r\n AND d.end_date IS NOT NULL\r\n AND d.distance >= convert_km($min_distance::numeric,'$length_unit')\r\n AND p.speed > 0.1\r\n) AS drivedata\r\nWHERE speed_section_$length_unit >= $min_speed_segment\r\nGROUP BY speed_section_$length_unit\r\nORDER BY speed_section_$length_unit DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Speeds", - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "50", - "value": "50" - }, - "hide": 0, - "includeAll": false, - "label": "Min. speed segment", - "multi": false, - "name": "min_speed_segment", - "options": [ - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "20", - "value": "20" - }, - { - "selected": false, - "text": "30", - "value": "30" - }, - { - "selected": false, - "text": "40", - "value": "40" - }, - { - "selected": true, - "text": "50", - "value": "50" - } - ], - "query": "10,20,30,40,50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": true, - "text": "25", - "value": "25" - }, - "hide": 0, - "includeAll": false, - "label": "Min. driving distance", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": true, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": false, - "text": "150", - "value": "150" - }, - { - "selected": false, - "text": "200", - "value": "200" - } - ], - "query": "1,5,10,25,50,100,150,200", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - "hide": 0, - "includeAll": false, - "label": "Terrain Type", - "multi": false, - "name": "terrain_type", - "options": [ - { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - { - "selected": false, - "text": "Uphill", - "value": "Uphill" - }, - { - "selected": false, - "text": "Downhill", - "value": "Downhill" - } - ], - "query": "Flat, Uphill, Downhill", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": false, - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Speed Rates", - "uid": "jchmfu4SiQgWz", - "version": 10, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/TrackingDrives.json b/incubator/TeslaMate/0.0.15/dashboards/teslamate2/TrackingDrives.json deleted file mode 100644 index 47a5a0d8b45..00000000000 --- a/incubator/TeslaMate/0.0.15/dashboards/teslamate2/TrackingDrives.json +++ /dev/null @@ -1,1363 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater (On/Off)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power (kW)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation (m)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (km/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (mi/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC (%)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater (On/Off)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "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", - "options": "Power (kW)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Rated Efficiency (kWh/100km)" - }, - "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": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Elevation (m)" - }, - "properties": [ - { - "id": "decimals", - "value": 0 - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 15, - "x": 0, - "y": 0 - }, - "hideTimeOverride": false, - "id": 8, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n\t$__time(date),\n\tAVG(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h,\n\tAVG(power) AS Power,\n\tAVG(battery_level) AS SOC,\n\tAVG(battery_heater::integer * 100) AS battery_heater,\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 20, - "w": 9, - "x": 15, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n $__time(date), latitude, longitude\nFROM positions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nORDER BY date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "sec_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 17 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "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", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 5, - "y": 17 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 17 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 17 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Year", - "options": [], - "query": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Month", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Day", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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;", - "hide": 0, - "includeAll": false, - "label": "Journey", - "multi": false, - "name": "journey", - "options": [], - "query": "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;", - "refresh": 1, - "regex": "/route=\"(?[^\"]+)|id=\"(?[^\"]+)/g", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "2023-11-28T12:32:29.961Z", - "to": "2023-11-28T12:40:33.863Z" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Tracking Drives", - "uid": "jchmX8upc6ZRk", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.15/icon-small.webp b/incubator/TeslaMate/0.0.15/icon-small.webp deleted file mode 100644 index 06f97ddfd5f87d7c972ecb515d4014afa6488852..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 394 zcmV;50d@XTNk&G30RRA3MM6+kP&il$0000G0000V0018V06|PpNWK6700DrqZQHWu z!QCY}jRwu;ZjCgTM%zK#FK~-qEiGDO$$j13mvBD+zUPZ;5itS4U!Huv9gqTk^pGHk zaypFVn9mWcnOO^leCUPXdEY4$6xt&M?gsgp=L&@2?5Lhg+WkbJ-XtU}nyoT{T-uN` zdI%9)7%4IO{ylmb2{Eb}ilqWpeoD#!sJXy7hyb@T^(X8zDFfcF)e^triW7uN8m{@A zR7wC*JMzc&J*)!cz-EacimPrAv132o00IG4P&go-0001x0|1=?Dj)zL00ICsC8Pin zU^y|tz?ax$YJ2NN!H(UtZe<_<0RH(9blPKk_dm~BA;C@uwcc-c#zoiav#)cBfJxvQ z`d;~F=@~qr^)$;yhD`dvKcM2LQXKGVKcV~VKUQz)t9@a58u0Ji|4*D&gK~mnE`2=0 ok_w|8siR6Za@8B31{EY3AJ%W{hs0_E8sx>!g@MUM*LnZ|07!PLy8r+H diff --git a/incubator/TeslaMate/0.0.15/icon.webp b/incubator/TeslaMate/0.0.15/icon.webp deleted file mode 100644 index c68d6fd7df6a04725889d4e15afec70d644b339a..0000000000000000000000000000000000000000 GIT binary patch literal 0 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6;<_xE#G017LsuX&p-8cJj3bSF%ptu1P&zl5`?yeQnK5IctvEn=7|?I;M?p%3Pu8|^1uRsR zn|VJ)kO<~uFAnkrtTZpTHJQg!K!soCmQn&{LbbN_g)Aw=Z>i*<1T2LPQKMoCjFq&% zXSg|FE%a=&=80egTzF$_YxIn;YmEY1=xq=ua8MjARbAa8P zMYXNTVtkq#Y6bz*t%7?TEBqTcacy&N4PZUg)}4Mm5C55vdTMAnYhVg0oI34(o%;ud zl-tW2Swdhc`i(sIF)lgr=kuLyt$|5t7d3F!#4dqqKuZ8tP&gpK0ssK;6#$(9DwY72 z06vL2mPe%{q9HRscrc(5327$*WI_l6_y8NNueX*)85*y9;a(nlsrUM?LtXLsesR4c^|$8djJ|WHmND6dqyui!P{;f>Kq)Xi_~3i*!teqH%AS>mc+A9 zbG=_shA)oZ>GeZ+5xluB(BX9K~Whd@P{<0fg4Vl zM0qhB9yst*yG$I71P`R*^@l(J{-&@FWCWPBe0DM5N&_{b{FgK5XT_(1hM9o~Rp85T zzAbX56iL6i#uB+M6NIpU4#&hN^?BHHD=MzM!GSvy!}KI%qwvZqpC=Xutq5TVAY(;r z_urc1`!tBGfF3nCtgBzxN%nX^Nb()H+WXuqCVtF>{oskfJ_#|-e8%?)3sr#ng8rF| z_>?Csr zI9@TNxHxplq@;Bc1U3wBo-2JF+2mp`-7=0;#42xl3WBq)7^k@;)||lCv8=xuhU+l8 zUqA+z8(kzfSY75mRcole=oAx+gt%v{hp%2S8>GD0%A|{j24GY{_ zU%Z==c8MlteyICquv5Y<{h5_P2Ei9$+qSyp=xSj6>b)OBU;l>xCfwyc2}{2z&MI!K WQm1xc!%47n0V*8herjL<0002EX|MhO diff --git a/incubator/TeslaMate/0.0.15/ix_values.yaml b/incubator/TeslaMate/0.0.15/ix_values.yaml deleted file mode 100644 index dc76692a496..00000000000 --- a/incubator/TeslaMate/0.0.15/ix_values.yaml +++ /dev/null @@ -1,84 +0,0 @@ -image: - repository: teslamate/teslamate - pullPolicy: IfNotPresent - tag: 1.28.5@sha256:aa3f37ecccc7ea77fa1e259391c8f2a05533e208228a42ebb4dbe560828db057 - -securityContext: - container: - readOnlyRootFilesystem: false - -service: - main: - ports: - main: - protocol: http - port: 4000 - -workload: - main: - replicas: 1 - strategy: RollingUpdate - podSpec: - containers: - main: - env: - ENCRYPTION_KEY: - secretKeyRef: - name: teslamate-secrets - key: TESLAMATE_ENCRYPTION_KEY - DATABASE_USER: "{{ .Values.cnpg.main.user }}" - DATABASE_PASS: - secretKeyRef: - name: cnpg-main-user - key: password - DATABASE_NAME: "{{ .Values.cnpg.main.database }}" - DATABASE_HOST: - secretKeyRef: - name: cnpg-main-urls - key: host - DISABLE_MQTT: true - MQTT_HOST: "" - MQTT_PORT: 1883 - MQTT_USERNAME: "" - MQTT_PASSWORD: "" - -configmap: - datasource: - enabled: true - labels: - grafana_datasources: "1" - data: - datasourceteslamatepsql.yaml: |- - apiVersion: 1 - datasources: - - name: TeslaMate - type: postgres - uid: TeslaMate - url: {{ printf "%s.%s:5432" (.Values.cnpg.main.creds.host | trimAll "\"") .Release.Namespace }} - access: proxy - user: {{ .Values.cnpg.main.user }} - secureJsonData: - password: {{ .Values.cnpg.main.creds.password | default "na" }} - jsonData: - database: {{ .Values.cnpg.main.database }} - sslmode: 'disable' # disable/require/verify-ca/verify-full - maxOpenConns: 100 # Grafana v5.4+ - maxIdleConns: 100 # Grafana v5.4+ - maxIdleConnsAuto: true # Grafana v9.5.1+ - connMaxLifetime: 14400 # Grafana v5.4+ - postgresVersion: 1500 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10 - timescaledb: false - -portal: - open: - enabled: true - -cnpg: - main: - enabled: true - user: teslamate - database: teslamate - cluster: - initdb: - postInitApplicationSQL: - - ALTER USER teslamate WITH SUPERUSER diff --git a/incubator/TeslaMate/0.0.15/questions.yaml b/incubator/TeslaMate/0.0.15/questions.yaml deleted file mode 100755 index 10d51835f68..00000000000 --- a/incubator/TeslaMate/0.0.15/questions.yaml +++ /dev/null @@ -1,3031 +0,0 @@ -groups: - - name: Image - description: | - Configured the images to be used for the Chart. - It's wise to use "digest pinned" tags and to avoid using "latest". - - Checkout the following documentation for more information: - - https://truecharts.org/common/#images - - - - name: General - description: | - For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general. - - Checkout the following documentation for more information: - - https://truecharts.org/common/global/ - - https://truecharts.org/common/#tz - - https://truecharts.org/common/podoptions/ - - Image Pull Secrets - - - - name: Workload - description: | - These settings configure how the actual Pods and containers are running. - Generally, on SCALE, we only expose a limited subset of these settings for the primary workload and container. - - Checkout the following documentation for more information: - - https://truecharts.org/common/workload/ - - https://truecharts.org/common/container/ - - - - name: App Configuration - description: | - Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application. - Most options should have a Tooltip (Circled Question Mark) to further describe said option. - - To find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/ - - - name: Services - description: | - Service and Networking options for any applications are contained here. - Some applications may have complicated networking setups with multiple options or some may have no options here at all. - - Options here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes. - - Checkout the following documentation for more information: - - https://truecharts.org/common/service/ - - - name: Networking - description: | - Contains advanced networking options that are not actively supported by the TrueCharts team. - Currently only contains scaleExternalInterfaces. - - Checkout the following documentation for more information: - - https://truecharts.org/common/scaleexternalinterface/ - - - name: Persistence - description: | - Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types. - This storage is called Persistence since it is not deleted upon restart or upgrade of an application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/ - - https://truecharts.org/scale/guides/nfs-share/ - - https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath - - - - name: Ingress - description: | - Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names). - If you choose to enable this you must have a "Ingress Provider" aka "Reverse Proxy" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/) - It also requiresa DNS service to actually resolve the DNS name of the FQDN specified. - - Checkout the following documentation for more information: - - https://truecharts.org/common/ingress/ - - - - name: SecurityContext - description: | - The security settings for each application and/or permissions that each application may have for the files/directories created. - Each application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities. - - Unless necessary users are advised to keep this section mostly to defaults. - - Checkout the following documentation for more information: - - https://truecharts.org/common/securitycontext/ - - - - name: Resources - description: | - Resources limits that have been defined by each application are in this section. - Most will have a specific default that some users may want to change based on their specific hardware or needs. - - This also contains the options to mount GPUs or, more precisely, "request" GPU's to be mounted. - - Checkout the following documentation for more information: - - https://truecharts.org/common/resources/ - - - name: Devices - description: | - These are special "mountpoints" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts. - For clearity we've decided to seperate this from persistence on SCALE. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/device/ - - https://truecharts.org/scale/guides/pci-passthrough/ - - - name: Middlewares - description: Traefik Middlewares - - - name: StorageClass - description: | - StorageClasses define where to storage Storage. - - Checkout the following documentation for more information: - - - name: Metrics - description: | - Contains options to configure Prometheus metrics for the application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/metrics/ - - - - name: Addons - description: | - Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application’s defaults. - Things included here are VPN addons, Codeserver for editing files inside the application’s container, Netshoot for network troubelshooting, etc. - - Generally not required for use but may be necessary or usefull at times for specific applications. - - Checkout the following documentation for more information: - - https://truecharts.org/common/addons/ - - https://truecharts.org/scale/guides/vpn-setup/ - - - - name: Experimental - description: | - Experimental Configuration Options - Often these are not fully flushed-out, could randomly break or might not work at-all. - - - name: Postgresql - description: | - For Postgresql we use "CloudNative-PG" as a backend, which has to be installed first. - - Checkout the following documentation for more information: - - https://truecharts.org/common/cnpg/ - - https://truecharts.org/scale/guides/sql-export/ - - https://truecharts.org/scale/guides/recover-cnpg/ - - - name: Dependencies - description: | - contains dependency setting for which we, currently, do not have seperate catagories (yet) - - - - name: Documentation - description: | - We added this section to make everyone aware that OpenSource isn't always easy. - It doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects. - - Before installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/ - We would also advice going over our https://truecharts.org/scale/guides/scale-intro/ - and many of the other documentation pages... - -portals: - open: - protocols: - - "$kubernetes-resource_configmap_tcportal-open_protocol" - host: - - "$kubernetes-resource_configmap_tcportal-open_host" - ports: - - "$kubernetes-resource_configmap_tcportal-open_port" - -questions: - - variable: global - group: General - label: "Global Settings" - schema: - additional_attrs: true - type: dict - attrs: - - variable: stopAll - label: Stop All - description: "Stops All Running pods and hibernates cnpg" - schema: - type: boolean - default: false - - - variable: workload - group: "Workload" - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type (Advanced) - schema: - type: string - default: Deployment - enum: - - value: Deployment - description: Deployment - - value: DaemonSet - description: DaemonSet - - - variable: replicas - label: Replicas (Advanced) - description: Set the number of Replicas - schema: - type: int - show_if: [["type", "!=", "DaemonSet"]] - default: 1 - - - variable: podSpec - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: containers - label: Containers - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: Main Container - schema: - additional_attrs: true - type: dict - attrs: - - - 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]] - - - variable: envList - label: Extra Environment Variables - description: "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting..." - schema: - type: list - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - - variable: value - label: Value - schema: - type: string - - variable: extraArgs - label: Extra Args - schema: - type: list - default: [] - items: - - variable: arg - label: Arg - schema: - type: string - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: command - label: Command - schema: - type: list - default: [] - items: - - variable: param - label: Param - schema: - type: string - - - variable: TZ - label: Timezone - group: "General" - schema: - type: string - default: "Etc/UTC" - $ref: - - "definitions/timezone" - - - variable: podOptions - group: "General" - label: "Global Pod Options (Advanced)" - schema: - additional_attrs: true - type: dict - attrs: - - variable: expertPodOpts - label: "Expert - Pod Options" - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hostNetwork - label: "Host Networking" - schema: - type: boolean - default: false - - variable: dnsConfig - label: "DNS Configuration" - schema: - type: dict - additional_attrs: true - attrs: - - variable: options - label: "Options" - schema: - type: list - default: [{"name": "ndots", "value": "1"}] - items: - - variable: optionsEntry - label: "Option Entry" - schema: - type: dict - additional_attrs: true - attrs: - - variable: name - label: "Name" - schema: - type: string - required: true - - variable: value - label: "Value" - schema: - type: string - - variable: nameservers - label: "Nameservers" - schema: - type: list - default: [] - items: - - variable: nsEntry - label: "Nameserver Entry" - schema: - type: string - required: true - - variable: searches - label: "Searches" - schema: - type: list - default: [] - items: - - variable: searchEntry - label: "Search Entry" - schema: - type: string - required: true - - - variable: imagePullSecretList - group: "General" - label: "Image Pull Secrets" - schema: - type: list - default: [] - items: - - variable: pullsecretentry - label: "Pull Secret" - schema: - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: true - - variable: data - label: Data - schema: - type: dict - additional_attrs: true - attrs: - - variable: registry - label: "Registry" - schema: - type: string - required: true - default: "https://index.docker.io/v1/" - - variable: username - label: "Username" - schema: - type: string - required: true - default: "" - - variable: password - label: "Password" - schema: - type: string - required: true - private: true - default: "" - - variable: email - label: "Email" - schema: - type: string - required: true - default: "" - - - variable: service - group: Services - label: Configure Service(s) - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Service - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "Service's Port(s) Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service Port Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: "Port" - description: "This port exposes the container port on the service" - schema: - type: int - default: 10038 - required: true - - variable: scaleExternalInterface - description: 'Add External Interfaces (Experimental, might change or be removed without further notice)' - label: Add external Interfaces (Experimental) - group: Networking - schema: - type: list - items: - - variable: interfaceConfiguration - description: Interface Configuration - label: Interface Configuration - schema: - additional_attrs: true - type: dict - $ref: - - "normalize/interfaceConfiguration" - attrs: - - variable: hostInterface - description: Please Specify Host Interface - label: Host Interface - schema: - type: string - required: true - $ref: - - "definitions/interface" - - variable: ipam - description: Define how IP Address will be managed - label: IP Address Management - schema: - additional_attrs: true - type: dict - required: true - attrs: - - variable: type - description: Specify type for IPAM - label: IPAM Type - schema: - type: string - required: true - enum: - - value: dhcp - description: Use DHCP - - value: static - description: Use Static IP - - variable: staticIPConfigurations - label: Static IP Addresses - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticIP - label: Static IP - schema: - type: ipaddr - cidr: true - - variable: staticRoutes - label: Static Routes - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticRouteConfiguration - label: Static Route Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: destination - label: Destination - schema: - type: ipaddr - cidr: true - required: true - - variable: gateway - label: Gateway - schema: - type: ipaddr - cidr: false - required: true - - - - variable: serviceList - label: Add Manual Custom Services - group: Services - schema: - type: list - default: [] - items: - - variable: serviceListEntry - label: Custom Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the service - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - value: Simple - description: Deprecated CHANGE THIS - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: advancedsvcset - label: Show Advanced Service Settings - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: externalIPs - label: "External IP's" - description: "External IP's" - schema: - type: list - default: [] - items: - - variable: externalIP - label: External IP - schema: - type: string - - variable: ipFamilyPolicy - label: IP Family Policy - description: Specify the IP Policy - schema: - type: string - default: SingleStack - enum: - - value: SingleStack - description: SingleStack - - value: PreferDualStack - description: PreferDualStack - - value: RequireDualStack - description: RequireDualStack - - variable: ipFamilies - label: IP Families - description: (Advanced) The IP Families that should be used - schema: - type: list - default: [] - items: - - variable: ipFamily - label: IP Family - schema: - type: string - - variable: portsList - label: Additional Service Ports - schema: - type: list - default: [] - items: - - variable: portsListEntry - label: Custom ports - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Port - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Port Name - schema: - type: string - default: "" - - variable: protocol - label: Port Type - schema: - type: string - default: tcp - enum: - - value: http - description: HTTP - - value: https - description: HTTPS - - value: tcp - description: TCP - - value: udp - description: UDP - - variable: targetPort - label: Target Port - description: This port exposes the container port on the service - schema: - type: int - required: true - - variable: port - label: Container Port - schema: - type: int - required: true - - - variable: persistence - label: Integrated Persistent Storage - description: Integrated Persistent Storage - group: Persistence - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: pvc - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - value: iscsi - description: iSCSI Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
- Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size quotum of Storage (Do NOT REDUCE after installation) - description: This value can ONLY be INCREASED after the installation - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: disabled - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: persistenceList - label: Additional App Storage - group: Persistence - schema: - type: list - default: [] - items: - - variable: persistenceListEntry - label: Custom Storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the storage - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: hostPath - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
- Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: mountPath - label: Mount Path - description: Path inside the container the storage is mounted - schema: - type: string - default: "" - required: true - valid_chars: '^\/([a-zA-Z0-9._-]+(\s?[a-zA-Z0-9._-]+|\/?))+$' - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size Quotum of Storage - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: "disabled" - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: ingress - label: "" - group: Ingress - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name (Optional) - description: Defaults to chart name - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description (Optional) - description: Defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: icon - label: Icon (Optional) - description: Defaults to chart icon - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - variable: widget - label: Widget Settings - schema: - type: dict - additional_attrs: true - show_if: [["enabled", "=", true]] - attrs: - - variable: enabled - label: Enable Widget - description: When disabled all widget annotations are skipped. - schema: - type: boolean - default: true - - variable: custom - label: Options - schema: - type: dict - additional_attrs: true - attrs: - - variable: key - label: API-key (key) - schema: - type: string - default: "" - - variable: customkv - label: Custom Options - schema: - type: list - default: [] - items: - - variable: option - label: Option - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - default: "" - required: true - - variable: value - label: Value - schema: - type: string - default: "" - required: true - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - - variable: ingressList - label: Add Manual Custom Ingresses - group: Ingress - schema: - type: list - default: [] - items: - - variable: ingressListEntry - label: Custom Ingress - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: ingressClassName - label: IngressClass Name - schema: - type: string - default: "" - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: overrideService - label: Linked Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Service Name - schema: - type: string - default: "" - - variable: port - label: Service Port - schema: - type: int - - variable: tls - label: TLS-Settings - schema: - type: list - default: [] - show_if: [["certificateIssuer", "=", ""]] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: Use Custom Secret (Advanced) - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: "Allow Cross Origin Requests" - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: namespace - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description - description: defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - - variable: securityContext - group: SecurityContext - label: Security Context - schema: - additional_attrs: true - type: dict - attrs: - - variable: container - label: Container - schema: - additional_attrs: true - type: dict - attrs: - # Settings from questions.yaml get appended here on a per-app basis - - - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" - schema: - type: int - default: 568 - - variable: runAsGroup - label: "runAsGroup" - description: "The groupID of the user running the application" - schema: - type: int - default: 568 - # Settings from questions.yaml get appended here on a per-app basis - - variable: PUID - label: Process User ID - PUID - description: When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps - schema: - type: int - show_if: [["runAsUser", "=", 0]] - default: 568 - - variable: UMASK - label: UMASK - description: When supported by the container, this sets the UMASK for the App. Not supported by all Apps - schema: - type: string - default: "0022" - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: privileged - label: "Privileged mode" - schema: - type: boolean - default: false - - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" - schema: - type: boolean - default: true - - - variable: pod - label: Pod - schema: - additional_attrs: true - type: dict - attrs: - - variable: fsGroupChangePolicy - label: "When should we take ownership?" - schema: - type: string - default: OnRootMismatch - enum: - - value: OnRootMismatch - description: OnRootMismatch - - value: Always - description: Always - - variable: supplementalGroups - label: Supplemental Groups - schema: - type: list - default: [] - items: - - variable: supplementalGroupsEntry - label: Supplemental Group - schema: - type: int - # Settings from questions.yaml get appended here on a per-app basis - - - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." - schema: - type: int - default: 568 - - variable: resources - group: Resources - label: "Resource Limits" - schema: - additional_attrs: true - type: dict - attrs: - - variable: limits - label: Advanced Limit Resource Consumption - schema: - additional_attrs: true - type: dict - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 4000m - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: RAM - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 8Gi - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: 'gpu.intel.com/i915' - label: Add Intel i915 GPUs - schema: - type: int - default: 0 - - variable: 'nvidia.com/gpu' - label: Add NVIDIA GPUs (Experimental) - schema: - type: int - default: 0 - - variable: 'amd.com/gpu' - label: Add AMD GPUs - schema: - type: int - default: 0 - - variable: requests - label: "Minimum Resources Required (request)" - schema: - additional_attrs: true - type: dict - hidden: true - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 10m - hidden: true - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: "RAM" - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 50Mi - hidden: true - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: deviceList - label: Mount USB Devices - group: Devices - schema: - type: list - default: [] - items: - - variable: deviceListEntry - label: Device - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Storage - schema: - type: boolean - default: true - - variable: type - label: (Advanced) Type of Storage - description: Sets the persistence type - schema: - type: string - default: device - hidden: true - - variable: readOnly - label: readOnly - schema: - type: boolean - default: false - - variable: hostPath - label: Host Device Path - description: Path to the device on the host system - schema: - type: path - - variable: mountPath - label: Container Device Path - description: Path inside the container the device is mounted - schema: - type: string - default: "/dev/ttyACM0" - - - variable: metrics - group: Metrics - label: Prometheus Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: Main Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - - variable: prometheusRule - label: PrometheusRule - description: Enable and configure Prometheus Rules for the App. - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - # TODO: Rule List section - -# - variable: horizontalPodAutoscaler -# group: Experimental -# label: (Advanced) Horizontal Pod Autoscaler -# schema: -# type: list -# default: [] -# items: -# - variable: hpaEntry -# label: HPA Entry -# schema: -# additional_attrs: true -# type: dict -# attrs: -# - variable: name -# label: Name -# schema: -# type: string -# required: true -# default: "" -# - variable: enabled -# label: Enabled -# schema: -# type: boolean -# default: false -# show_subquestions_if: true -# subquestions: -# - variable: target -# label: Target -# description: Deployment name, Defaults to Main Deployment -# schema: -# type: string -# default: "" -# - variable: minReplicas -# label: Minimum Replicas -# schema: -# type: int -# default: 1 -# - variable: maxReplicas -# label: Maximum Replicas -# schema: -# type: int -# default: 5 -# - variable: targetCPUUtilizationPercentage -# label: Target CPU Utilization Percentage -# schema: -# type: int -# default: 80 -# - variable: targetMemoryUtilizationPercentage -# label: Target Memory Utilization Percentage -# schema: -# type: int -# default: 80 - - variable: networkPolicy - group: Experimental - label: (Advanced) Network Policy - schema: - type: list - default: [] - items: - - variable: netPolicyEntry - label: Network Policy Entry - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - default: "" - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: policyType - label: Policy Type - schema: - type: string - default: "" - enum: - - value: "" - description: Default - - value: ingress - description: Ingress - - value: egress - description: Egress - - value: ingress-egress - description: Ingress and Egress - - variable: egress - label: Egress - schema: - type: list - default: [] - items: - - variable: egressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: to - label: To - schema: - type: list - default: [] - items: - - variable: toEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - variable: ingress - label: Ingress - schema: - type: list - default: [] - items: - - variable: ingressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: from - label: From - schema: - type: list - default: [] - items: - - variable: fromEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - - variable: addons - group: Addons - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: codeserver - label: Codeserver - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: service - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: NodePort - description: Deprecated CHANGE THIS - - value: ClusterIP - description: ClusterIP - - value: LoadBalancer - description: LoadBalancer - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: codeserver - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - default: 36107 - - variable: ingress - label: "Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - variable: scaleCert - label: 'Use TrueNAS SCALE Certificate (Deprecated)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: int - $ref: - - "definitions/certificate" - - variable: envList - label: Codeserver Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: netshoot - label: Netshoot - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: envList - label: Netshoot Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: vpn - label: VPN - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Type - schema: - type: string - default: disabled - enum: - - value: disabled - description: disabled - - value: gluetun - description: Gluetun - - value: tailscale - description: Tailscale - - value: openvpn - description: OpenVPN (Deprecated) - - value: wireguard - description: Wireguard (Deprecated) - - variable: openvpn - label: OpenVPN Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "openvpn"]] - attrs: - - variable: username - label: Authentication Username (Optional) - description: Authentication Username, Optional - schema: - type: string - default: "" - - variable: password - label: Authentication Password - description: Authentication Credentials - schema: - type: string - show_if: [["username", "!=", ""]] - default: "" - required: true - - variable: tailscale - label: Tailscale Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "tailscale"]] - attrs: - - variable: authkey - label: Authentication Key - description: Provide an auth key to automatically authenticate the node as your user account. - schema: - type: string - private: true - default: "" - - variable: auth_once - label: Auth Once - description: Only attempt to log in if not already logged in. - schema: - type: boolean - default: true - - variable: accept_dns - label: Accept DNS - description: Accept DNS configuration from the admin console. - schema: - type: boolean - default: false - - variable: userspace - label: Userspace - description: Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device. - schema: - type: boolean - default: false - - variable: routes - label: Routes - description: Expose physical subnet routes to your entire Tailscale network. - schema: - type: string - default: "" - - variable: dest_ip - label: Destination IP - description: Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched. - schema: - type: string - default: "" - - variable: sock5_server - label: Sock5 Server - description: The address on which to listen for SOCKS5 proxying into the tailscale net. - schema: - type: string - default: "" - - variable: outbound_http_proxy_listen - label: Outbound HTTP Proxy Listen - description: The address on which to listen for HTTP proxying into the tailscale net. - schema: - type: string - default: "" - - variable: extra_args - label: Extra Args - description: Extra Args - schema: - type: string - default: "" - - variable: daemon_extra_args - label: Tailscale Daemon Extra Args - description: Tailscale Daemon Extra Args - schema: - type: string - default: "" - - variable: killSwitch - label: Enable Killswitch - schema: - type: boolean - show_if: [["type", "!=", "disabled"]] - default: true - - variable: excludedNetworks_IPv4 - label: Killswitch Excluded IPv4 networks - description: List of Killswitch Excluded IPv4 Addresses - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv4 - label: IPv4 Network - schema: - type: string - required: true - - variable: excludedNetworks_IPv6 - label: Killswitch Excluded IPv6 networks - description: "List of Killswitch Excluded IPv6 Addresses" - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv6 - label: IPv6 Network - schema: - type: string - required: true - - variable: configFile - label: VPN Config File Location - schema: - type: string - show_if: [["type", "!=", "disabled"]] - default: "" - - - variable: envList - label: VPN Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - max_length: 10240 - - - variable: docs - group: Documentation - label: Please read the documentation at https://truecharts.org - description: Please read the documentation at -
https://truecharts.org - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDocs - label: I have checked the documentation - schema: - type: boolean - default: true - - variable: donateNag - group: Documentation - label: Please consider supporting TrueCharts, see https://truecharts.org/sponsor - description: Please consider supporting TrueCharts, see -
https://truecharts.org/sponsor - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDonate - label: I have considered donating - schema: - type: boolean - default: true - hidden: true - diff --git a/incubator/TeslaMate/0.0.15/templates/NOTES.txt b/incubator/TeslaMate/0.0.15/templates/NOTES.txt deleted file mode 100644 index efcb74cb772..00000000000 --- a/incubator/TeslaMate/0.0.15/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/incubator/TeslaMate/0.0.15/templates/_configmap.tpl b/incubator/TeslaMate/0.0.15/templates/_configmap.tpl deleted file mode 100644 index 70d78d4d3fb..00000000000 --- a/incubator/TeslaMate/0.0.15/templates/_configmap.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{{/* Define the configmap */}} -{{- define "teslamate.configmaps" -}} -{{- $rootDir := "dashboards/" -}} -{{- $dirs := dict -}} -{{- range $path, $_ := .Files.Glob (printf "%s**/*.json" $rootDir) }} - {{- $pathElements := splitList "/" $path -}} - {{- $dirName := index $pathElements 1 }} - {{- $existingFiles := get $dirs $dirName | default list -}} - {{- $updatedFiles := append $existingFiles $path -}} - {{- $_ := set $dirs $dirName $updatedFiles }} -{{- end }} - -{{- range $dir, $files := $dirs }} -{{- range $files }} -{{- $fileName := lower (base .) }} -{{- $fileNameWithoutExt := trimSuffix ".json" $fileName }} -{{- $configMapKey := printf "%s-%s-%s" "dashboard" $dir $fileNameWithoutExt }} -{{ $configMapKey | quote }}: - enabled: true - annotations: - k8s-sidecar-target-directory: "TeslaMate" - labels: - grafana_dashboard: "1" - data: - {{ $fileName | quote }}: | -{{ $.Files.Get . | indent 6 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/incubator/TeslaMate/0.0.15/templates/_secrets.tpl b/incubator/TeslaMate/0.0.15/templates/_secrets.tpl deleted file mode 100644 index 5f1092a2032..00000000000 --- a/incubator/TeslaMate/0.0.15/templates/_secrets.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Define the secrets */}} -{{- define "teslamate.secrets" -}} -{{- $secretName := (printf "%s-teslamate-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} - -{{- $encryptionKey := randAlphaNum 64 -}} - - {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} - {{- $encryptionKey = index .data "TESLAMATE_ENCRYPTION_KEY" | b64dec -}} - {{- end }} -enabled: true -data: - TESLAMATE_ENCRYPTION_KEY: {{ $encryptionKey }} -{{- end -}} diff --git a/incubator/TeslaMate/0.0.15/templates/common.yaml b/incubator/TeslaMate/0.0.15/templates/common.yaml deleted file mode 100644 index cf915e29079..00000000000 --- a/incubator/TeslaMate/0.0.15/templates/common.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{/* Make sure all variables are set properly */}} -{{- include "tc.v1.common.loader.init" . -}} - -{{/* Render secrets for teslamate */}} -{{- $secrets := include "teslamate.secrets" . | fromYaml -}} -{{- if $secrets -}} - {{- $_ := set .Values.secret "teslamate-secrets" $secrets -}} -{{- end -}} - -{{/* Render configmaps for dashboards */}} -{{- $configmaps := include "teslamate.configmaps" . | fromYaml -}} -{{- if $configmaps -}} - {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} -{{- end -}} - -{{/* Render the templates */}} -{{- include "tc.v1.common.loader.apply" . -}} diff --git a/incubator/TeslaMate/0.0.15/values.yaml b/incubator/TeslaMate/0.0.15/values.yaml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/incubator/TeslaMate/0.0.16/.helmignore b/incubator/TeslaMate/0.0.16/.helmignore deleted file mode 100644 index 77ca5567b26..00000000000 --- a/incubator/TeslaMate/0.0.16/.helmignore +++ /dev/null @@ -1,30 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -# OWNERS file for Kubernetes -OWNERS -# helm-docs templates -*.gotmpl -# docs folder -/docs -# icon -icon.png diff --git a/incubator/TeslaMate/0.0.16/CHANGELOG.md b/incubator/TeslaMate/0.0.16/CHANGELOG.md deleted file mode 100644 index 941abb8a218..00000000000 --- a/incubator/TeslaMate/0.0.16/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -*for the complete changelog, please refer to the website* - -**Important:** \ No newline at end of file diff --git a/incubator/TeslaMate/0.0.16/Chart.yaml b/incubator/TeslaMate/0.0.16/Chart.yaml deleted file mode 100644 index 75f8a409a59..00000000000 --- a/incubator/TeslaMate/0.0.16/Chart.yaml +++ /dev/null @@ -1,40 +0,0 @@ -annotations: - max_scale_version: 24.04.0 - min_scale_version: 23.10.0 - truecharts.org/SCALE-support: "true" - truecharts.org/category: metrics - truecharts.org/max_helm_version: "3.14" - truecharts.org/min_helm_version: "3.11" - truecharts.org/train: incubator -apiVersion: v2 -appVersion: 1.28.5 -dependencies: - - name: common - version: 20.3.12 - repository: oci://tccr.io/truecharts - condition: "" - alias: "" - tags: [] - import-values: [] -deprecated: false -description: A self-hosted data logger for your Tesla -home: https://truecharts.org/charts/incubator/TeslaMate -icon: https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp -keywords: - - analytics - - monitoring - - metrics - - logs -kubeVersion: ">=1.24.0-0" -maintainers: - - name: TrueCharts - email: info@truecharts.org - url: https://truecharts.org -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: 0.0.16 diff --git a/incubator/TeslaMate/0.0.16/README.md b/incubator/TeslaMate/0.0.16/README.md deleted file mode 100644 index 26c9055c690..00000000000 --- a/incubator/TeslaMate/0.0.16/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: README ---- - -## General Info - -TrueCharts can be installed as both _normal_ Helm Charts or as TrueNAS SCALE Apps. -Both solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible - -For more information about this Chart, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incubator/TeslaMate) - -**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)** - -## Installation - -### Helm-Chart installation - -To install TrueCharts Helm charts using Helm, you can use our OCI Repository. - -`helm install mychart oci://tccr.io/truecharts/CHARTNAME` - -For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/ - - -### TrueNAS SCALE Apps - -For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the [quick-start guides for TrueNAS SCALE](https://truecharts.org/scale/guides/scale-intro). - -## Configuration Options - -To view the chart specific options, please view Values.yaml included in the chart. - -All our Charts use a shared "common" library chart that contains most of the templating and options. -For the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/ - -## Chart Specific Guides and information - -All our charts have dedicated documentation pages. -The documentation for this chart can be found here: -https://truecharts.org/charts/incubator/TeslaMate - -## Support - - -- See the [Website](https://truecharts.org) -- Check our [Discord](https://discord.gg/tVsPTHWTtr) -- Open a [issue](https://github.com/truecharts/charts/issues/new/choose) - ---- - -## Sponsor TrueCharts - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/general/sponsor) or contributing back to the project any way you can! - -_All Rights Reserved - The TrueCharts Project_ diff --git a/incubator/TeslaMate/0.0.16/app-changelog.md b/incubator/TeslaMate/0.0.16/app-changelog.md deleted file mode 100644 index 4183b2fb42b..00000000000 --- a/incubator/TeslaMate/0.0.16/app-changelog.md +++ /dev/null @@ -1,43 +0,0 @@ - - -## [teslamate-0.0.16]teslamate-0.0.16 (2024-04-26) - -### Chore - - - -- bump everything to release new doc pages - -- update groups html ([#21121](https://github.com/truecharts/charts/issues/21121)) - -- bump charts to release new docs to fix broken links - -- bump everything to regenerate readme's and site index - -- bump charts to ensure new icons are released - -- update ignored by renovate (patch) ([#21171](https://github.com/truecharts/charts/issues/21171)) - -- update ignored updates to v20.3.11[@dae6129](https://github.com/dae6129) by renovate ([#21059](https://github.com/truecharts/charts/issues/21059)) - -- update ignored updates to v20.3.10[@c2f262c](https://github.com/c2f262c) by renovate ([#21034](https://github.com/truecharts/charts/issues/21034)) - -- update ignored updates to v20.3.9[@370bb36](https://github.com/370bb36) by renovate ([#20917](https://github.com/truecharts/charts/issues/20917)) - -- update ignored updates to v20.3.8[@52f4118](https://github.com/52f4118) by renovate ([#20876](https://github.com/truecharts/charts/issues/20876)) - -- update ignored updates to v20.3.7[@8cf9fc9](https://github.com/8cf9fc9) by renovate ([#20777](https://github.com/truecharts/charts/issues/20777)) - -- update ignored updates to v20.3.6[@27edfed](https://github.com/27edfed) by renovate ([#20711](https://github.com/truecharts/charts/issues/20711)) - -### Chore - - - -- rework SCALE catagories/groups to match helm and remove deprecated charts ([#21111](https://github.com/truecharts/charts/issues/21111)) - -### Fix - - - -- replace serviceexpert with externalinterfaces/networking-group in the SCALE GUI ([#21154](https://github.com/truecharts/charts/issues/21154)) \ No newline at end of file diff --git a/incubator/TeslaMate/0.0.16/app-readme.md b/incubator/TeslaMate/0.0.16/app-readme.md deleted file mode 100644 index eb228d07050..00000000000 --- a/incubator/TeslaMate/0.0.16/app-readme.md +++ /dev/null @@ -1,8 +0,0 @@ -A self-hosted data logger for your Tesla - -This App is supplied by TrueCharts, for more information visit the manual: [https://truecharts.org/charts/incubator/TeslaMate](https://truecharts.org/charts/incubator/TeslaMate) - ---- - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can! diff --git a/incubator/TeslaMate/0.0.16/charts/common-20.3.12.tgz b/incubator/TeslaMate/0.0.16/charts/common-20.3.12.tgz deleted file mode 100644 index 621bd9e5a5277eda78f0f106b46b6afdc6f56acd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99407 zcmV)BK*PTuiw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``17JSIHdx>!1HyOaKI&!Wc~;{V29d82F&q+g)Yp^(tA= z4WbjK7T9ngFh&&J&cR5Keg@`bCRasG4JUG*b`*^i@hI_zv~Nfo4KZjWJUU z2}$WxQQnlKyWUaLk<6WC9|%&IF-1weWpkK<5Qo}PVMBL>NISt?9_R#51X1g`y$yQ3 zm%|~7))t;09d!jBE%WHadNzG0c zgI>3iaLh3gN&PR{942!if@Z2c1I3!GLzF!qp_f1uqQ-pM5P>{=}DeN)XbHTm>7V=Ax^NQ z1t{fMkafAItQ!)2APm(DPm$jX&Mu287@P5TMXh2xcTuVc=?|An2VtG6$&ufdzQ;NtbwtBaQ}cEH8u`KzB^TwMMDp1i-f`SHz9H{jL9 z>x-K+(PrC*_U8NE>z8lOe>}UqIeUKb>f+|-9q|3d&82|&{hPPo3|yVPy}3C5>DAd= zaP`yMt2fs#cfjSF%iW91@84cr{_yhk%gdV`fmQG3;^x)ML9b^dlp>>%Y?d*tA1SRc zpXh)6^Z#Q?rs5=%Ugh4@vVkNqL{L?gqFDwxH$*jG=}L)er>FHyvG@WfpVgd`JCsU{ z$uMV{w8E_GhHhF|_lk0$wEfGfW|%uUa#4m9Cq_QZ zW(y`sPpM24MR%VEl+N@0ZtjBT(ingT&&B`q# S{{H{~0RR7!&lutWS_}Y48_RhB diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health-lfp.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health-lfp.json deleted file mode 100644 index 539f070000c..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health-lfp.json +++ /dev/null @@ -1,1448 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1681039491922, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. \n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total energy added" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tround(ceil(sum(charge_energy_added) / ('$aux'::json -> 'MaxCapacity')::text::numeric),0) AS \"Estimated charging cycles\"\nFROM charging_processes WHERE car_id = $car_id;", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data form the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Estimated charging cycles are based on the whole energy added to the battery. So the more data you logged the better. \n", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n round(('$aux'::json -> 'LastChargekWhAdded')::text::numeric,1) || ' kWh' as \"Last Energy added\",\n round(('$aux'::json -> 'LastMileageAdded')::text::numeric,1) || ' $length_unit' as \"Last Range added\"", - "refId": "LastChanging", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 6 - }, - "id": 34, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "hidden", - "placement": "bottom" - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Added", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\nSELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "kWh" - }, - "x": "odometer", - "y": "kWh" - }, - { - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km) * ('$aux'::json -> 'RatedEfficiency')::text::float / AVG(c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tGROUP BY 3", - "refId": "Median", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Battery Health - LFP", - "uid": "DuertWeceu", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health.json deleted file mode 100644 index 9db33cbfcf4..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/battery-health.json +++ /dev/null @@ -1,1704 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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 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 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\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", - "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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health", - "uid": "jchmRiqUfXgTM", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charge-level.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/charge-level.json deleted file mode 100644 index 41af0d8bc8e..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charge-level.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100496202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Charge Level", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tbattery_level AS \"Battery Level\",\n\tusable_battery_level AS \"Usable Battery Level\"\nfrom positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n\tORDER BY Time ASC\n;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-7d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Level", - "uid": "WopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charges.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/charges.json deleted file mode 100644 index 46d4456da3c..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charges.json +++ /dev/null @@ -1,1335 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642763869363, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 8, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "decimals" - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n p.odometer as odometer\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n convert_km(odometer::numeric, '$length_unit') AS odometer_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND max_charger_voltage >= '$voltage'\n AND duration_min >= '$min_duration_min'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", charge_energy_added\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy added", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", greatest(charge_energy_added, charge_energy_used)\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 13, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", cost\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost", - "transparent": true, - "type": "stat" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min duration (minutes) here", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min voltage here", - "name": "voltage", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charges", - "uid": "TSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats-lfp.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats-lfp.json deleted file mode 100644 index 90364ab8931..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats-lfp.json +++ /dev/null @@ -1,1900 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats - LFP", - "uid": "UcjFKmUtpt", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats.json deleted file mode 100644 index 3b176f386ad..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/charging-stats.json +++ /dev/null @@ -1,1920 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 91 - } - ] - } - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats", - "uid": "-pkIkhmRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/drive-stats.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/drive-stats.json deleted file mode 100644 index ce134792864..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/drive-stats.json +++ /dev/null @@ -1,1148 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1644505954964, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 20, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date_trunc('day', start_date) as \"time\",\n count(*)\nFROM drives\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nGROUP BY 1\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Number of drives", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 16, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', date)::date AS date,\n\t\tmax(odometer) - min(odometer) AS distance\n\tFROM positions\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since) , now(), '1 day'::interval) dd\n)\nSELECT \n $__time(base_line.date), \n convert_km(COALESCE(distance, 0)::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM base_line\nLEFT JOIN actual ON actual.date = base_line.date\nWHERE $__timeFilter(base_line.date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "$length_unit driven", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 22, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(start_date),\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency AS energy\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "kWh used", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 26, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM drives\nWHERE car_id = $car_id AND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance of a drive", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 5 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(distance) AS distance\n\tFROM drives\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.distance, 0) as distance\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') AS \"distance_$length_unit\"\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance driven per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 5 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency) AS energy\n\tFROM drives\n\tJOIN cars car ON car.id = car_id\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.energy, 0) as energy\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY energy) AS energy\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average kWh used per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 32, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km((((SELECT odometer FROM last_position) - (SELECT odometer\tFROM first_position)) /\n\tEXTRACT(days FROM (SELECT date FROM last_position) - (SELECT date\tFROM first_position)) * \n\t(365/12))::numeric, '$length_unit') AS \"mileage_$length_unit\";", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated monthly mileage", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 30, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km(((lp.odometer - fp.odometer) /\n\tEXTRACT(days FROM lp.date - fp.date) * \n\t365)::numeric, '$length_unit') AS \"mileage_$length_unit\" from first_position as fp, last_position as lp;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated annual mileage", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "displayName": "$__cell_0", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 24, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:3]), ', ')) as name,\n\tcount(*) AS visited\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE t.car_id = $car_id AND $__timeFilter(t.start_date)\nGROUP BY 1\nORDER BY visited DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top Destinations", - "type": "bargauge" - } - ], - "refresh": false, - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Stats", - "uid": "_7WkNSyWk", - "version": 1 -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/drives.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/drives.json deleted file mode 100644 index 8113735f987..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/drives.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642770916740, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kWh" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FFA6B0", - "value": null - }, - { - "color": "#FFCB7D", - "value": 0.65 - }, - { - "color": "#C8F2C2", - "value": 0.99 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/(start|end)_path/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_str" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": "❄" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "color": "transparent", - "index": 1, - "text": "." - }, - "true": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 5 - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated consumption may be incorrect and is therefore sometimes hidden.", - "url": "" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n case when (start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level) = true then true else false end as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed,\n power_max\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 $__timeFilter(start_date) AND drives.car_id = $car_id AND convert_km(distance::numeric, '$length_unit') >= $min_dist AND convert_km(distance::numeric, '$length_unit') / NULLIF(duration_min, 0) * 60 >= $min_speed\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_$temp_unit,\n convert_km(avg_speed::numeric, '$length_unit') AS speed_avg_$length_unit,\n power_max,\n reduced_range as has_reduced_range,\n range_diff * car_efficiency as \"consumption_kWh\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit,\n CASE WHEN is_sufficiently_precise THEN distance / range_diff\n ELSE NULL\n END AS efficiency\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Drive", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min distance here", - "name": "min_dist", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min speed here", - "name": "min_speed", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives", - "uid": "Y8upc6ZRk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/efficiency.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/efficiency.json deleted file mode 100644 index 3a2b3439a65..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/efficiency.json +++ /dev/null @@ -1,1227 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1598013087999, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 4, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (net)", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 6, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "max", - "value": 1.15 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 200 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Temperature" - } - ] - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH t AS (\n\tSELECT\n\t CASE WHEN '$temp_unit' = 'C' THEN ROUND(cast(outside_temp_avg AS numeric) / 5, 0) * 5 \n\t\t\t WHEN '$temp_unit' = 'F' THEN ROUND(cast(convert_celsius(outside_temp_avg, '$temp_unit') AS numeric) / 10, 0) * 10\n\t\tEND AS outside_temp,\n\t\tsum(start_ideal_range_km - end_ideal_range_km) AS total_ideal_range,\n\t\tsum(start_rated_range_km - end_rated_range_km) AS total_rated_range,\n\t\tsum(distance) AS total_distance,\n\t\tsum(duration_min) as duration,\n\t\tcar_id\n\tFROM\n\t\tdrives\n\tWHERE\n\t\tdistance IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND convert_km(distance::numeric, '$length_unit') >= $min_distance \n\t\tAND start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km > 0.1\n\tGROUP BY\n\t\t1,\n\t\tcar_id\n)\n\nSELECT\n\toutside_temp as outside_temp_$temp_unit,\n total_distance / total_[[preferred_range]]_range AS efficiency,\n\ttotal_[[preferred_range]]_range / total_distance * c.efficiency * 1000 * \n CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END AS consumption_$length_unit,\n convert_km(total_distance::numeric, '$length_unit') as total_distance_$length_unit,\n\t(total_distance / duration) * 60 / (CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END) avg_speed_$length_unit\nFROM\n\tt\nJOIN cars c ON t.car_id = c.id\nWHERE outside_temp IS NOT NULL\norder by 1 desc\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature – Efficiency", - "type": "table" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 2, - "x": 0, - "y": 16 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 2, - "y": 16 - }, - "id": 12, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_ideal_range_km - start_ideal_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n count(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_ideal_range_km IS NOT NULL\n AND end_ideal_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived ideal efficiencies", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "Efficiency" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 13, - "y": 16 - }, - "id": 15, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n\tcount(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_rated_range_km IS NOT NULL\n AND end_rated_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived rated efficiencies", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "1", - "value": "1" - }, - "hide": 0, - "includeAll": false, - "label": "min. distance per drive", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": true, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - } - ], - "query": "1, 5, 10, 25, 50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Efficiency", - "uid": "fu4SiQgWz", - "version": 1 -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/charge-details.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/charge-details.json deleted file mode 100644 index 8706c5e162b..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/charge-details.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656106965302, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 100, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charger_voltage" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "displayName", - "value": "Charging Voltage" - }, - { - "id": "unit", - "value": "volt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^range_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_pilot_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current (pilot)" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^outside_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Outdoor Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_phases" - }, - "properties": [ - { - "id": "displayName", - "value": "Phases" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 17, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n battery_level,\n charger_power,\n (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as battery_heater,\n convert_km([[preferred_range]]_battery_range_km, '$length_unit') as range_$length_unit,\n charger_voltage,\n (case when charger_phases = 2 then 3 when charger_phases = 1 then 1 else 0 end) as charger_phases,\n charger_actual_current,\n charger_pilot_current,\n convert_celsius(outside_temp, '$temp_unit') outside_temp_$temp_unit\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Details", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "Added", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 17, - "y": 0 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select coalesce(cp.charge_energy_added, c.charge_energy_added)\r\nfrom charging_processes cp\r\njoin charges c\r\n\ton cp.id = c.charging_process_id\r\nwhere car_id = $car_id\r\nAND cp.id = $charging_process_id\r\nORDER BY c.date desc\r\nfetch first row only", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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": 3, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 6, - "links": [ - { - "title": "Set cost", - "url": "[[base_url:raw]]/charge-cost/${charging_process_id}" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT cost from charging_processes where id = $charging_process_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 7, - "x": 17, - "y": 3 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses ON addresses.id = c.address_id\n\tLEFT JOIN geofences g ON g.id = geofence_id\nWHERE\n\tc.id = $charging_process_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 15, - "w": 7, - "x": 17, - "y": 5 - }, - "id": 4, - "links": [], - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "fixed": "dark-blue" - }, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 7, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "filterData": { - "id": "byRefId", - "options": "A" - }, - "location": { - "latitude": "latitude", - "longitude": "longitude", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tunnest(ARRAY[latitude, latitude]) AS latitude,\n\tunnest(ARRAY[longitude, longitude]) AS longitude\nFROM\n\tcharging_processes c\n\tJOIN positions p ON c.position_id = p.id\nWHERE\n\t$__timeFilter(date)\n\tAND c.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 11, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": {}, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "fixed": "blue" - }, - "x": "avg SOC [%]", - "y": "avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"SOC [%]\",\n charger_power as \"Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"avg SOC [%]\",\n avg(charger_power) as \"avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nGROUP BY\n battery_level, fast_charger_present\nORDER BY\n battery_level ASC ", - "refId": "B", - "select": [ - [ - { - "params": ["odometer"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging curve", - "type": "xychart" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "label": "", - "name": "charging_process_id", - "options": [ - { - "selected": false, - "text": "NULL", - "value": "NULL" - } - ], - "query": "NULL", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Details", - "uid": "BHhxFeZRz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/drive-details.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/drive-details.json deleted file mode 100644 index b0b8f9a01c5..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/internal/drive-details.json +++ /dev/null @@ -1,2059 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:31", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658136653681, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "icon": "", - "tags": [], - "title": "GpxExport", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]/drive/$drive_id/gpx" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_kmh$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mph$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "speed_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "left" - }, - { - "id": "displayName", - "value": "Power" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "usable_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "usable SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_estimated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (est.)" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_km(speed::numeric, '$length_unit') AS speed_[[length_unit]]h,\n\tpower,\n\tbattery_heater::integer,\n\tconvert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range_[[preferred_range]]_[[length_unit]],\n\tconvert_km(est_battery_range_km, '$length_unit') AS range_estimated_[[length_unit]],\n\tbattery_level,\n\tusable_battery_level\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Distance", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT ${__to:date:seconds} - ${__from:date:seconds}", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Selected duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 2 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "displayName": "Consumption", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 200 - }, - { - "color": "red", - "value": 250 - } - ] - }, - "unit": "none" - }, - "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": 2, - "w": 6, - "x": 18, - "y": 2 - }, - "id": 18, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 27, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 4, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Map", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": ["logmin", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n $__time(date),\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS tpms_pressure_front_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS tpms_pressure_front_right_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS tpms_pressure_rear_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS tpms_pressure_rear_right_$pressure_unit\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "pos", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "feet" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tROUND(convert_m(elevation, '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "rgb(210, 203, 203)", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#96D98D", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "outside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#8AB8FF", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Outside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "inside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2CC0C", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Inside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "driver_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Driver Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "passenger_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Passenger Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Climate" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "displayName", - "value": "Fan status" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(outside_temp, '$temp_unit') AS outside_temp_$temp_unit,\n\tconvert_celsius(inside_temp, '$temp_unit') AS inside_temp_$temp_unit,\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as driver_temp_$temp_unit,\n\tconvert_celsius(passenger_temp_setting, '$temp_unit') as passenger_temp_$temp_unit,\n is_climate_on::integer,\n\tfan_status\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Temperatures", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 12, - "y": 31 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT CONCAT_WS(' - ', round(convert_km(start_km::numeric, '$length_unit')), round(convert_km(end_km::numeric, '$length_unit'))) ||' $length_unit' as \"Odometer\"\nFROM drives d\nWHERE d.id = $drive_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 0, - "y": 39 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "targets": [ - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\nORDER BY\n\tdate ASC\n\t)\n\t\n\nselect convert_m(sum(diff), '$alternative_length_unit') || ' $alternative_length_unit' as \"UP\" from height where diff > 0", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation Summary", - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "name": "drive_id", - "options": [ - { - "selected": true, - "text": "NULL", - "value": "NULL" - } - ], - "query": "3217", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1", - "value": "1" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "bar", - "value": "bar" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Details", - "uid": "zm7wN6Zgz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate/reports/dutch-tax.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate/reports/dutch-tax.json deleted file mode 100644 index b242b5da143..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate/reports/dutch-tax.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1602596446244, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "ID" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ts" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "start_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "Start Odometer" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "end_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "End Odometer" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "End Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start|end)_address" - }, - "properties": [ - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Address" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "End Address" - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start Time" - } - ] - }, - "pluginVersion": "7.2.2", - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "alias": "", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.id as drive_id,\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n start_km,\n end_km,\n CONCAT_WS(', ', CONCAT_WS(' ', start_address.road, start_address.house_number), start_address.city) AS start_address,\n CONCAT_WS(', ', CONCAT_WS(' ', end_address.road, end_address.house_number), end_address.city) AS end_address,\n duration_min,\n distance\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 cars car ON car.id = drives.car_id\n WHERE $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY drive_id DESC\n)\nSELECT\n drive_id,\n start_date_ts,\n convert_km(start_km::numeric, '$length_unit') as start_$length_unit,\n start_address,\n end_date_ts,\n convert_km(end_km::numeric, '$length_unit') as end_$length_unit,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "rated", - "value": "rated" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "value": null - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/y", - "to": "now/y" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives - Dutch tax", - "uid": "lBIoQIggk", - "version": 1 -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/locations.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/locations.json deleted file mode 100644 index 05c61277df3..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/locations.json +++ /dev/null @@ -1,1120 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642771806943, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select count(*) from addresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total addresses", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 20, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT city)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 14, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT state)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 0 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT country)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Countries", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - }, - { - "color": "super-light-green", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcity,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tcity IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - }, - { - "color": "super-light-orange", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 3 - }, - "id": 14, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tstate,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tstate IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "City" - }, - "properties": [ - { - "id": "custom.width" - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 22, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n max(end_date) as \"Date\",\n count(*) as visited,\n COALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:2]), ', ')) AS \"Address\",\n\tCOALESCE(city, neighbourhood) as \"City\"\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE a.display_name ilike '%$address_filter%' or g.name ilike '%$address_filter%'\nGROUP BY 3,4\nORDER BY visited DESC\nLIMIT 100", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last visited", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "visited": true - }, - "indexByName": {}, - "renameByName": {} - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "updated_at" - }, - "properties": [ - { - "id": "displayName", - "value": "Updated at" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "neighbourhood" - }, - "properties": [ - { - "id": "displayName", - "value": "Neighbourhood" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "city" - }, - "properties": [ - { - "id": "displayName", - "value": "City" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "state" - }, - "properties": [ - { - "id": "displayName", - "value": "State" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "country" - }, - "properties": [ - { - "id": "displayName", - "value": "Country" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 18, - "x": 0, - "y": 22 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n CONCAT('new?lat=', latitude, '&lng=', longitude) as path,\n\tCOALESCE(name, CONCAT(road, ' ', house_number)) AS name,\n\tneighbourhood,\n\tcity,\n\tstate,\n\tcountry\nFROM addresses\nWHERE display_name ilike '%$address_filter%'\nORDER BY inserted_at DESC\nLIMIT 100;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Addresses", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "displayName", - "value": "Time" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.id.numeric:raw}/edit" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 6, - "x": 18, - "y": 22 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id, name \nFROM geofences \nORDER BY inserted_at DESC\nLIMIT 512;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Geo-fences", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 1, - "includeAll": true, - "label": "Car", - "multi": true, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Address", - "name": "address_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Locations", - "uid": "ZzhF-aRWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/mileage.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/mileage.json deleted file mode 100644 index 16b27614c75..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/mileage.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100778202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "mileage_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Mileage" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH o AS (SELECT\n start_date AS time,\n car_id,\n start_km AS \"odometer\"\nFROM drives\nUNION ALL\nSELECT\n end_date,\n car_id,\n end_km AS \"odometer\"\nFROM drives)\n\nSELECT\n time, \n convert_km(odometer::numeric, '$length_unit') as mileage_$length_unit\nFROM o\nWHERE\n\tcar_id = $car_id AND\n\t$__timeFilter(time)\norder by 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage", - "uid": "NjtMTFggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview-lfp.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview-lfp.json deleted file mode 100644 index 2c5f42578b5..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview-lfp.json +++ /dev/null @@ -1,1631 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 170, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Drive details", - "url": "/d/zm7wN6Zgz/drive-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Details", - "url": "/d/BHhxFeZRz/charge-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview - LFP", - "uid": "EVzVGnwSq", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview.json deleted file mode 100644 index 0848c5211d5..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/overview.json +++ /dev/null @@ -1,1640 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Charge Level", - "url": "/d/WopVO_mgz/charge-level?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Stats", - "url": "/d/-pkIkhmRz/charging-stats?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "targetBlank": true, - "title": "States", - "url": "/d/xo4BNRkZz/states?orgId=1&${__url_time_range}" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview", - "uid": "kOuP_Fggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/projected-range.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/projected-range.json deleted file mode 100644 index e2032ed2dd9..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/projected-range.json +++ /dev/null @@ -1,772 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - }, - { - "datasource": "TeslaMate", - "enable": false, - "hide": false, - "iconColor": "rgba(255, 96, 96, 1)", - "limit": 100, - "name": "Charged", - "rawQuery": "SELECT\n$__time(start_date),\nend_date as timeend,\nconcat('Charged: ',round(cast(charge_energy_added as numeric),2),' kWh') AS text\nFROM charging_processes\nWHERE\n$__timeFilter(start_date) AND duration_min > 5\nORDER BY start_date DESC", - "showIn": 0, - "tags": [], - "type": "tags" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Mileage.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Mileage" - }, - { - "id": "min" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, [[interval]]) AS time,\n\tconvert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') AS \"Projected [[preferred_range]] range [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nhaving convert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') is not null\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(avg(odometer)::numeric, '$length_unit') AS \"Mileage [$length_unit]\"\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Mileage", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Battery.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "max", - "value": 100 - }, - { - "id": "custom.axisLabel", - "value": "Battery Level" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level)[$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n\t$__timeGroup(date,[[interval]]) AS time,\n avg(battery_level) AS \"Battery Level [%]\", avg(coalesce(usable_battery_level, battery_level)) as \"Usable Battery Level [%]\"\nfrom\n (SELECT\n battery_level, usable_battery_level\n , date\n FROM\n positions\n WHERE\n car_id = $car_id AND\n $__timeFilter(date) and ideal_battery_range_km is not null\n UNION ALL\n select\n battery_level, null as usable_battery_level\n , date\n from charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id) as data\n\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Battery Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Temp.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Temp" - }, - { - "id": "min" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using usable_battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#56A64B", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C8F2C2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 43 - }, - "id": 5, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level) [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tavg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor Temperature [°$temp_unit]\"\n\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Outdoor Temp", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 36, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "6h", - "value": "6h" - }, - "hide": 1, - "label": "Time Resolution", - "name": "interval", - "options": [ - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "15m", - "value": "15m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "3h", - "value": "3h" - }, - { - "selected": true, - "text": "6h", - "value": "6h" - } - ], - "query": "5m,15m,30m,1h,3h,6h", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Projected Range", - "uid": "riqUfXgRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/states.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/states.json deleted file mode 100644 index 95e38b0635c..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/states.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642780620514, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsLocal" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "based on any data ever recorded.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select 1 - sum(duration_min) / (EXTRACT(EPOCH FROM (max(end_date) - min(start_date))) / 60), 1 as time from drives where car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "parked (%)", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0 - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 14, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-2d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "States", - "uid": "xo4BNRkZz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/statistics.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/statistics.json deleted file mode 100644 index d3dd8f2d54e..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/statistics.json +++ /dev/null @@ -1,971 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642773094879, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 195 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy charged" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg cost per kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "maxPerRow": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "format": "table", - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "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", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "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", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "per ${period}", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_kwh", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_consumption_kwh" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_km", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_mi", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": false, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_cost_km": 19, - "avg_cost_mi": 20, - "avg_cost_kwh": 11, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 17, - "date_to": 18, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 15, - "efficiency_charged_net_mi": 16, - "efficiency_net_km": 13, - "efficiency_net_mi": 14, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_cost_km": "Avg cost per km", - "avg_cost_mi": "Avg cost per mi", - "avg_cost_kwh": "Avg cost per kWh", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - }, - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - } - ], - "query": "day,week,month,year", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "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" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "browser", - "title": "Statistics", - "uid": "1EZnXszMk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/timeline.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/timeline.json deleted file mode 100644 index 7c19e598087..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/timeline.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642862616523, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["tesla"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.start_date_ts}&to=${__data.fields.end_date_ts}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC Diff" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 152 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Duration" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Start Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_f/" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/odometer_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/distance_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_diff_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range Diff" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/outside_temp_avg_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/end_range_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Range" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Slot details", - "url": "${__data.fields.slotlink:raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "slotlink" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 22, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🚗 Driving' AS \"Action\",\r\n drives.duration_min AS \"Duration\",\r\n CASE WHEN start_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(start_geofence_id, '/edit')\r\n END AS start_path,\r\n CASE WHEN end_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(end_geofence_id, '/edit')\r\n END AS end_path,\r\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\",\r\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\",\r\n convert_km(end_km::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n convert_km(distance::NUMERIC, '$length_unit') AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n TP2.battery_level AS \"SoC\",\r\n TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/zm7wN6Zgz/drive-details?from=', ROUND(EXTRACT(EPOCH FROM start_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date))*1000, '&var-car_id=', drives.car_id, '&var-drive_id=', drives.id) AS slotlink\r\nFROM drives\r\n LEFT OUTER JOIN positions AS TP1 on drives.start_position_id = TP1.id\r\n LEFT OUTER JOIN positions AS TP2 on drives.end_position_id = TP2.id\r\n LEFT JOIN addresses start_address ON start_address_id = start_address.id\r\n LEFT JOIN addresses end_address ON end_address_id = end_address.id\r\n LEFT JOIN geofences start_geofence ON start_geofence_id = start_geofence.id\r\n LEFT JOIN geofences end_geofence ON end_geofence_id = end_geofence.id\r\n JOIN cars ON cars.id = drives.car_id\r\nWHERE \r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND '🚗 Driving' in ($action_filter)\r\n AND\r\n (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%' or\r\n COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city))::TEXT like '%$text_filter%')\r\n\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🔋 Charging' AS \"Action\",\r\n charging_processes.duration_min AS \"Duration\",\r\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', address.latitude, '&lng=', address.longitude)\r\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n charging_processes.charge_energy_added AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit, \r\n end_battery_level AS \"SoC\",\r\n end_battery_level - start_battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/BHhxFeZRz/charge-details?from=', ROUND(EXTRACT(EPOCH FROM start_date)-10)*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date)+10)*1000, '&var-car_id=', charging_processes.car_id, '&var-charging_process_id=', charging_processes.id) AS slotlink\r\nFROM charging_processes\r\n INNER JOIN positions AS position ON position_id = position.id\r\n LEFT JOIN addresses address ON address_id = address.id\r\n LEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n $__timeFilter(charging_processes.start_date)\r\n AND charging_processes.charge_energy_added > 0\r\n AND charging_processes.car_id = $car_id\r\n AND '🔋 Charging' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nUNION\r\nSELECT\r\n d.end_date AS \"Start\",\r\n LEAD(d.start_date) over w AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM d.end_date)) * 1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000 AS end_date_ts,\r\n '🅿️ Parking' AS \"Action\",\r\n EXTRACT(EPOCH FROM LEAD(d.start_date) over w - d.end_date)/60 AS \"Duration\",\r\n CASE WHEN d.end_geofence_id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\r\n WHEN d.end_geofence_id IS NOT NULL THEN CONCAT(d.end_geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(end_position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(LEAD(d.start_[[preferred_range]]_range_km) over w::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n LEAD(start_position.battery_level) over w AS \"SoC\",\r\n LEAD(start_position.battery_level) over w - end_position.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/FkUpJpQZk/trip?from=', ROUND(EXTRACT(EPOCH FROM d.end_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000, '&var-car_id=', d.car_id) AS slotlink\r\nFROM\r\n drives AS d\r\n LEFT OUTER JOIN positions start_position on d.start_position_id = start_position.id\r\n LEFT OUTER JOIN positions end_position on d.end_position_id = end_position.id\r\n LEFT JOIN addresses address ON d.end_address_id = address.id\r\n LEFT JOIN geofences geofence ON d.end_geofence_id = geofence.id\r\n JOIN cars ON cars.id = d.car_id\r\nWHERE\r\n $__timeFilter(d.end_date)\r\n AND d.car_id=$car_id\r\n AND '🅿️ Parking' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nWINDOW w as (ORDER BY d.id ASC)\r\n\r\nUNION\r\nSELECT\r\n\tT1.end_date +(1 * interval '1 second') AS \"Start\", -- added 1 sec to get it after the corresponding Parking row\r\n\tT2.start_date AS \"End\",\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS start_date_ts,\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS end_date_ts,\r\n\t'❓ Missing' AS \"Action\",\r\n\t-- EXTRACT(EPOCH FROM T2.start_date - T1.end_date)/60 AS \"Duration\",\r\n\tNULL AS \"Duration\",\r\n\tCASE WHEN T1.end_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n\t\tWHEN T1.end_geofence_id IS NOT NULL THEN CONCAT(T1.end_geofence_id, '/edit')\r\n\tEND AS start_path,\r\n\tCASE WHEN T2.start_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n\t\tWHEN T2.start_geofence_id IS NOT NULL THEN CONCAT(T2.start_geofence_id, '/edit')\r\n\tEND AS end_path,\r\n\tCOALESCE(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\",\r\n\tCOALESCE(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\",\r\n\tconvert_km(TP2.odometer::INTEGER, '$length_unit') AS odometer_$length_unit,\r\n\tconvert_km((TP2.odometer - TP1.odometer)::INTEGER, '$length_unit') AS distance_$length_unit,\r\n convert_km(T2.end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit')::INTEGER * efficiency AS \"kWh\",\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit') AS range_diff_$length_unit,\r\n\tNULL AS \"SoC\",\r\n\tNULL AS \"SoC Diff\",\r\n\tNULL AS outside_temp_avg_$temp_unit,\r\n\tNULL AS slotlink\r\n\t-- TP2.battery_level AS \"SoC\",\r\n\t-- TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n\t-- (T1.outside_temp_avg+T2.outside_temp_avg)/2 AS outside_temp_avg_$temp_unit\r\nFROM\r\n\t(SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives) AS T1\r\n\tLEFT OUTER JOIN (SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives ) AS T2 on T1.time_id + 1 = T2.time_id\r\n\tLEFT OUTER JOIN positions AS TP1 on T1.end_position_id = TP1.id\r\n\tLEFT OUTER JOIN positions AS TP2 on T2.start_position_id = TP2.id\r\n\tLEFT JOIN addresses start_address ON T1.end_address_id = start_address.id\r\n\tLEFT JOIN addresses end_address ON T2.start_address_id = end_address.id\r\n\tLEFT JOIN geofences start_geofence ON T1.end_geofence_id = start_geofence.id\r\n\tLEFT JOIN geofences end_geofence ON T2.start_geofence_id = end_geofence.id\r\n\tJOIN cars ON cars.id = T2.car_id\r\nWHERE\r\n\t$__timeFilter(T1.end_date)\r\n\tAND T1.car_id=$car_id \r\n\tAND T2.car_id=$car_id \r\n\tAND TP2.car_id=$car_id \r\n\tAND TP1.car_id=$car_id \r\n\tAND TP2.odometer - TP1.odometer > 0.5\r\n\tAND T1.end_address_id <> T2.start_address_id AND ((T1.end_geofence_id IS NOT NULL OR T2.end_geofence_id IS NOT NULL) OR T1.end_geofence_id <> T2.start_geofence_id)\r\n\tAND '❓ Missing' in ($action_filter)\r\n\tAND (\r\n\t (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%') or\r\n\t (COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city)))::TEXT like '%$text_filter%')\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts, \r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts, \r\n '💾 Updating' AS \"Action\",\r\n\tEXTRACT(EPOCH FROM end_date - start_date)/60 AS \"Duration\",\r\n NULL AS start_path,\r\n NULL AS end_path,\r\n version AS \"Start Address\",\r\n '' AS \"End Address\",\r\n NULL AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n NULL AS end_range_$length_unit,\r\n NULL AS \"kWh\",\r\n NULL AS range_diff_$length_unit,\r\n NULL AS \"SoC\",\r\n NULL AS \"SoC Diff\",\r\n NULL AS outside_temp_avg_$temp_unit,\r\n CONCAT('https://www.notateslaapp.com/software-updates/version/', split_part(version, ' ', 1), '/release-notes') AS slotlink\r\nFROM updates\r\nWHERE \r\n $__timeFilter(start_date)\r\n AND car_id = $car_id \r\n AND '💾 Updating' in ($action_filter)\r\n AND version::TEXT like '%$text_filter%'\r\n\r\nORDER BY \"Start\" DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "candata", - "timeColumn": "datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "End": true, - "start_date_ts": false - }, - "indexByName": { - "Action": 2, - "Duration": 7, - "End": 1, - "End Address": 4, - "SoC": 15, - "SoC Diff": 16, - "Start": 0, - "Start Address": 3, - "distance_km": 8, - "distance_mi": 9, - "end_date_ts": 22, - "end_path": 20, - "end_range_km": 10, - "end_range_mi": 11, - "kWh": 13, - "odometer_km": 5, - "odometer_mi": 6, - "outside_temp_avg_c": 17, - "outside_temp_avg_f": 18, - "range_diff_km": 12, - "range_diff_mi": 13, - "start_date_ts": 21, - "start_path": 19 - }, - "renameByName": { - "action": "", - "end_address": "End", - "km_diff": "Km", - "kwh": "", - "minutediff": "Time", - "odometer": "", - "outside_temp_avg": "Temperature", - "rangediff": "Range Difference", - "soc": "", - "soc_diff": "SoC Difference", - "start_address": "Start", - "start_date": "Date", - "start_date_ts": "" - } - } - } - ], - "type": "table" - } - ], - "refresh": "1h", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Action", - "multi": true, - "name": "action_filter", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "🚗 Driving", - "value": "🚗 Driving" - }, - { - "selected": false, - "text": "🔋 Charging", - "value": "🔋 Charging" - }, - { - "selected": false, - "text": "🅿️ Parking", - "value": "🅿️ Parking" - }, - { - "selected": false, - "text": "❓ Missing", - "value": "❓ Missing" - }, - { - "selected": false, - "text": "💾 Updating", - "value": "💾 Updating" - } - ], - "query": "🚗 Driving,🔋 Charging,🅿️ Parking,❓ Missing,💾 Updating", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Text Filter", - "name": "text_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-14d", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Timeline", - "uid": "SUBgwtigz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/trip.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/trip.json deleted file mode 100644 index e057c567268..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/trip.json +++ /dev/null @@ -1,2643 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:30", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656104359102, - "links": [ - { - "icon": "doc", - "tags": [], - "targetBlank": true, - "title": "Select last three drives", - "type": "link", - "url": "/d/FkUpJpQZk?from=$from" - }, - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 13, - "x": 0, - "y": 1 - }, - "id": 6, - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s') AS time,\n\tavg(latitude) AS latitude,\n\tavg(longitude) AS longitude\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n\t$__timeFilter(date)\nGROUP BY\n\t1\nORDER BY\n\t1 ASC", - "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" - } - ] - } - ], - "transformations": [], - "transparent": true, - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM positions\nWHERE car_id = $car_id AND $__timeFilter(date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charging (AC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging (DC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "driving" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5794F2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 19, - "y": 1 - }, - "id": 38, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent"], - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tnow() AS time,\n\tsum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec,\n\t'driving' as metric\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n \textract(epoch FROM LEAST(end_date, $__timeTo()) - GREATEST(start_date, $__timeFrom())) as duration_sec,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'charging (DC)'\n\t\t\t\t ELSE 'charging (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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ncharges_total AS (\n SELECT\n \tsum(duration_sec) AS duration_sec,\n \tcurrent AS metric\n FROM charges_current\n GROUP BY 2\n ORDER BY metric\n)\n\nSELECT\n\tnow() AS time,\n\tcoalesce(duration_sec, 0) as duration_sec,\n metric\nFROM\n\tcharges_total;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 3 - }, - "id": 26, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n convert_km(sum(end_position.odometer - start_position.odometer)::numeric, '$length_unit') / (sum(extract(epoch FROM end_position.date - start_position.date)) / 3600) as \"speed_$length_unit\"\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date)", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 5 - }, - "id": 28, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH dc_charges AS (\n SELECT\n\t\tcp.id,\n extract(epoch FROM cp.end_date - cp.start_date) as duration_sec,\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 cp.charge_energy_added > 0\n AND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ndata AS (\n (\n SELECT\n sum(end_position.odometer - start_position.odometer) as distance, \n sum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec\n FROM\n drives\n JOIN positions start_position ON start_position_id = start_position.id\n JOIN positions end_position ON end_position_id = end_position.id\n WHERE\n drives.car_id = $car_id\n AND $__timeFilter(start_date)\n ) UNION ALL (\n SELECT\n NULL as distance,\n sum(duration_sec)\n FROM\n dc_charges\n WHERE\n current = 'DC'\n )\n)\n\nSELECT convert_km(sum(distance)::numeric, '$length_unit') / (sum(duration_sec) / 3600) as \"speed_$length_unit\"\nfrom data", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "net" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "net" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 13, - "y": 7 - }, - "id": 30, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "gross" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 16, - "y": 7 - }, - "id": 32, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "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": 9 - }, - "id": 22, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "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" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "${__cell_0}", - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-orange", - "value": 100 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 11, - "x": 13, - "y": 11 - }, - "id": 40, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n\tSELECT range_loss FROM range_loss_between_charges\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_before_first_charge\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_after_last_charge\n)\n\nSELECT 'used' as metric, sum(range_loss * c.efficiency) AS value\nFROM total_range_loss\nLEFT JOIN cars c ON c.id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added as energy_added,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'added (DC)'\n\t\t\t\t ELSE 'added (AC)'\n\t\tEND AS metric\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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n)\n\nSELECT metric, sum(energy_added) AS energy_added\nFROM charges_current\nGROUP BY 1\nORDER BY 1 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 20, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 1, - "showValue": "never", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "state-timeline" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "links", - "value": [ - { - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start_path|end_path|duration_str|car_id|drive_id)" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed\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 $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drives", - "transformations": [], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D" - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 36, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n charge_energy_added,\n charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n c.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n c.car_id,\n cost\n FROM\n charging_processes c\n LEFT JOIN positions p ON p.id = c.position_id\n LEFT JOIN cars ON cars.id = c.car_id\n LEFT JOIN addresses ON addresses.id = c.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n (charge_energy_added IS NULL OR charge_energy_added > 0) AND\n c.car_id = $car_id AND\n $__timeFilter(start_date)\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n charge_energy_added,\n charge_energy_used,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\nORDER BY\n start_date DESC;\n ", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 42, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM positions\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND car_id = $car_id\n GROUP BY 1\n) UNION ALL (\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM charges c\n LEFT JOIN charging_processes p ON c.charging_process_id = p.id\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND p.car_id = $car_id\n GROUP BY 1\n)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Level & Range", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthft" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 8, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s'),\n\tROUND(convert_m(avg(elevation), '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day')\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1642593521525", - "value": "1642593521525" - }, - "datasource": "TeslaMate", - "definition": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "from", - "options": [], - "query": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Trip", - "uid": "FkUpJpQZk", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/updates.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/updates.json deleted file mode 100644 index c63eedfb66f..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/updates.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:15", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1643273221821, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["count"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT count(*)\nFROM updates\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Updates", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 16, - "x": 8, - "y": 1 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY since_last_update) FROM (\n\tSELECT extract(EPOCH FROM start_date - lag(start_date) OVER (ORDER BY start_date)) AS since_last_update\n\tFROM updates\n\tWHERE $__timeFilter(start_date) AND car_id = $car_id\n) d;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Median time between updates", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "time" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "update_duration" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "since_last_update" - }, - "properties": [ - { - "id": "custom.width", - "value": 160 - }, - { - "id": "displayName", - "value": "Since Previous Update" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "displayName", - "value": "Installed Version" - }, - { - "id": "custom.align", - "value": "right" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "${__data.fields[version]} release notes", - "url": "https://www.notateslaapp.com/software-updates/version/${__data.fields[version]}/release-notes" - } - ] - }, - { - "id": "unit", - "value": "string" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_ct" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "# of Charges" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - } - ] - }, - "gridPos": { - "h": 28, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:68", - "alias": "Date", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "start_date", - "type": "date" - }, - { - "$$hashKey": "object:69", - "alias": "End Date", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "end_date", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "$$hashKey": "object:70", - "alias": "Installed Version", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTargetBlank": true, - "linkTooltip": "${__cell} release info", - "linkUrl": "https://www.notateslaapp.com/software-updates/version/${__cell}/release-notes", - "mappingType": 1, - "pattern": "version", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:202", - "alias": "Duration", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "update_duration", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:392", - "alias": "Since Previous Update", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "since_last_update", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:71", - "alias": "# of Charges", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "pattern": "chg_ct", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with u as (\r\n select *, coalesce(lag(start_date) over(order by start_date desc), now()) as next_start_date \r\n from updates\r\n where car_id = $car_id and $__timeFilter(start_date)\r\n),\r\nrng as (\r\n SELECT\r\n\t to_timestamp(floor(extract(epoch from date)/21600)*21600) AS date,\r\n\t (sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100 ) AS \"battery_rng\"\r\n FROM (\r\n select battery_level, usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from positions\r\n where car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\r\n union all\r\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from charges c\r\n join charging_processes p ON p.id = c.charging_process_id \r\n where $__timeFilter(date) and p.car_id = $car_id\r\n ) as data\r\n GROUP BY 1\r\n)\r\n\r\nselect\t\r\n u.start_date as time,\r\n\textract(EPOCH FROM u.end_date - u.start_date) AS update_duration,\r\n\textract(EPOCH FROM u.start_date - lag(u.start_date) OVER (ORDER BY u.start_date)) AS since_last_update,\r\n\tsplit_part(u.version, ' ', 1) as version,\r\n\tcount(distinct cp.id) as chg_ct,\r\n\tconvert_km(avg(r.battery_rng), '$length_unit')::numeric(6,2) AS avg_[[preferred_range]]_range_[[length_unit]]\r\nfrom u u\r\nleft join charging_processes cp\r\n\tON u.car_id = cp.car_id\r\n \tand cp.start_date between u.start_date and u.next_start_date\r\nleft join rng r\r\n\tON r.date between u.start_date and u.next_start_date\r\ngroup by u.car_id,\r\n\tu.start_date,\r\n\tu.end_date,\r\n\tnext_start_date,\r\n\tsplit_part(u.version, ' ', 1)", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Updates", - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Updates", - "uid": "IiC07mgWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/vampire-drain.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/vampire-drain.json deleted file mode 100644 index 033b382c37a..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/vampire-drain.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642779900099, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "displayName", - "value": "End" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "displayName", - "value": "Period" - }, - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(133, 142, 133)", - "value": null - }, - { - "color": "#56A64B", - "value": 43200 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "standby" - }, - "properties": [ - { - "id": "displayName", - "value": "Standby" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FF7383", - "value": null - }, - { - "color": "#FFB357", - "value": 0.3 - }, - { - "color": "#56A64B", - "value": 0.85 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Ø-Power" - }, - { - "id": "unit", - "value": "watt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": " " - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "transparent", - "index": 1, - "text": " " - }, - "1": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated range loss cannot be estimated correctly and is therefore hidden.", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 5 - } - ] - } - ] - }, - "gridPos": { - "h": 23, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with merge as (\n SELECT \n c.start_date AS start_date,\n c.end_date AS end_date,\n c.start_ideal_range_km AS start_ideal_range_km,\n c.end_ideal_range_km AS end_ideal_range_km,\n c.start_rated_range_km AS start_rated_range_km,\n c.end_rated_range_km AS end_rated_range_km,\n start_battery_level,\n end_battery_level,\n p.usable_battery_level AS start_usable_battery_level,\n NULL AS end_usable_battery_level,\n p.odometer AS start_km,\n p.odometer AS end_km\n FROM charging_processes c\n JOIN positions p ON c.position_id = p.id\n WHERE c.car_id = $car_id AND $__timeFilter(start_date)\n UNION\n SELECT \n d.start_date AS start_date,\n d.end_date AS end_date,\n d.start_ideal_range_km AS start_ideal_range_km,\n d.end_ideal_range_km AS end_ideal_range_km,\n d.start_rated_range_km AS start_rated_range_km,\n d.end_rated_range_km AS end_rated_range_km,\n start_position.battery_level AS start_battery_level,\n end_position.battery_level AS end_battery_level,\n start_position.usable_battery_level AS start_usable_battery_level,\n end_position.usable_battery_level AS end_usable_battery_level,\n d.start_km AS start_km,\n d.end_km AS end_km\n FROM drives d\n JOIN positions start_position ON d.start_position_id = start_position.id\n JOIN positions end_position ON d.end_position_id = end_position.id\n WHERE d.car_id = $car_id AND $__timeFilter(start_date)\n), \nv as (\n SELECT\n lag(t.end_date) OVER w AS start_date,\n t.start_date AS end_date,\n lag(t.end_[[preferred_range]]_range_km) OVER w AS start_range,\n t.start_[[preferred_range]]_range_km AS end_range,\n lag(t.end_km) OVER w AS start_km,\n t.start_km AS end_km,\n EXTRACT(EPOCH FROM age(t.start_date, lag(t.end_date) OVER w)) AS duration,\n lag(t.end_battery_level) OVER w AS start_battery_level,\n lag(t.end_usable_battery_level) OVER w AS start_usable_battery_level,\n\t\tstart_battery_level AS end_battery_level,\n\t\tstart_usable_battery_level AS end_usable_battery_level,\n\t\tstart_battery_level > COALESCE(start_usable_battery_level, start_battery_level) AS has_reduced_range\n FROM merge t\n WINDOW w AS (ORDER BY t.start_date ASC)\n ORDER BY start_date DESC\n)\n\nSELECT\n round(extract(epoch FROM v.start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM v.end_date)) * 1000 AS end_date_ts,\n -- Columns\n v.start_date,\n v.end_date,\n v.duration,\n (coalesce(s_asleep.sleep, 0) + coalesce(s_offline.sleep, 0)) / v.duration as standby,\n\t-greatest(v.start_battery_level - v.end_battery_level, 0) as soc_diff,\n\tCASE WHEN has_reduced_range THEN 1 ELSE 0 END as has_reduced_range,\n\tconvert_km(CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range)::numeric END, '$length_unit') AS range_diff_$length_unit,\n CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range) * c.efficiency END AS consumption,\n CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) * c.efficiency) / (v.duration / 3600) * 1000 END as avg_power,\n convert_km(CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) / (v.duration / 3600))::numeric END, '$length_unit') AS range_lost_per_hour_[[length_unit]]\nFROM v,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'asleep' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_asleep,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'offline' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_offline\nJOIN cars c ON c.id = $car_id\nWHERE\n v.duration > ($duration * 60 * 60)\n AND v.start_range - v.end_range >= 0\n AND v.end_km - v.start_km < 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Vampire Drain", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "tags": [], - "text": "6", - "value": "6" - }, - "hide": 0, - "includeAll": false, - "label": "min. Idle Time (h)", - "multi": false, - "name": "duration", - "options": [ - { - "selected": false, - "text": "0", - "value": "0" - }, - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "3", - "value": "3" - }, - { - "selected": true, - "text": "6", - "value": "6" - }, - { - "selected": false, - "text": "12", - "value": "12" - }, - { - "selected": false, - "text": "18", - "value": "18" - }, - { - "selected": false, - "text": "24", - "value": "24" - } - ], - "query": "0,1,3,6,12,18,24", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Vampire Drain", - "uid": "zhHx2Fggk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/visited.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate1/visited.json deleted file mode 100644 index 08ff417b4e1..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate1/visited.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 10000000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "latitude": "lat", - "longitude": "long", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "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", - "refId": "Positions", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - } - } - ], - "title": "MAP", - "type": "geomap" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Visited", - "uid": "RG_DxSmgk", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/BatteryHealth.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/BatteryHealth.json deleted file mode 100644 index 2ad8139b02f..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/BatteryHealth.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "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)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 37, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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", - "group": [], - "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;", - "refId": "Odometer", - "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" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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", - "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", - "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 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 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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "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", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 2024-03-19\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health V2", - "uid": "jchmRiqUfXgRx", - "version": 23, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/BrowseCharges.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/BrowseCharges.json deleted file mode 100644 index 673f9f3e164..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/BrowseCharges.json +++ /dev/null @@ -1,1486 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "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 --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1686816148286, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "filterable": false, - "inspect": false, - "minWidth": 150 - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 160 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.minWidth", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 300 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.displayMode", - "value": "basic" - }, - { - "id": "color", - "value": { - "mode": "continuous-RdYlGr" - } - }, - { - "id": "max", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 80 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_type" - }, - "properties": [ - { - "id": "displayName", - "value": "Type" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.minWidth", - "value": 40 - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n CASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC' ELSE 'AC' END AS charge_type\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n charge_type,\n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND duration_min >= '$min_duration_min'\n AND CASE WHEN $cost = 0 THEN (cost IS NULL OR cost >= 0) ELSE cost >= $cost END\n AND charge_type = ANY(CASE WHEN array_to_string(ARRAY[$charge_type], ',') = 'DC' THEN ARRAY['DC'] WHEN array_to_string(ARRAY[$charge_type], ',') = 'AC' THEN ARRAY['AC'] ELSE ARRAY['DC', 'AC'] END)\n AND address ILIKE '%$location%'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges: $charge_type", - "transformations": [], - "type": "table" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 0, - "y": 21 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy added", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_added"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 7, - "y": 21 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy used", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_used"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 14, - "y": 21 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Cost", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["cost"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 19, - "y": 21 - }, - "id": 15, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Average Duration", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["duration_min"] - } - } - } - ], - "transparent": true, - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Type a text contained in Location", - "hide": 0, - "label": "Location", - "name": "location", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "allValue": "", - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Type", - "multi": true, - "name": "charge_type", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "AC", - "value": "AC" - }, - { - "selected": false, - "text": "DC", - "value": "DC" - } - ], - "query": "AC, DC", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Cost >=", - "name": "cost", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Duration (minutes) >=", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Browse Charges", - "uid": "jchmTSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCostsStats.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCostsStats.json deleted file mode 100644 index 459607f6d62..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCostsStats.json +++ /dev/null @@ -1,3404 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "title": "Summary", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 10, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Energy Used", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 33, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost = 0;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Free Energy", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 64, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH energy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id),\r\nsince as (\r\n\tSELECT date FROM positions\r\n\tWHERE car_id = $car_id\r\n\tORDER BY date ASC\r\n\tLIMIT 1\r\n)\r\nSELECT (energy.charged_kWh / $distance_driven) as \"kwh_per_$length_unit\" FROM energy", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "kWh per $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "times" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 1 - }, - "id": 38, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_used > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "For this section, it's important that you have geo-fences called \"Home\" and \"Work\" if you want to see a bar with the energy charged on those places.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 49, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "/^energy$/", - "values": true - }, - "showUnfilled": false, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT location, SUM(charge_energy_used) AS Energy\r\nFROM (\r\nSELECT\r\n CASE\r\n WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Home%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Work%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%' THEN 'Superchargers'\r\n\t ELSE 'Other'\r\n END AS location, charge_energy_used\r\nFROM\r\n\tcharging_processes c\r\nLEFT JOIN addresses address ON c.address_id = address.id\r\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n\t car_id = $car_id\r\n\tAND $__timeFilter(end_date)\r\n\tAND c.charge_energy_used > 0\r\n) ChargeLocations\r\nGROUP BY location\r\nORDER BY Energy DESC", - "refId": "A", - "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" - } - ] - } - ], - "title": "Main locations", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of all the charges in a given period (last 10 years by default). You can see the distance driven, number of charges, total charging cost, etc., both in summary or in separated lists.\n\nYou can expand/collapse the rows as needed.\n\nFrom the Monthly Stats row, you will have a table with links to other Teslamate Dashboards to have a look on a specific period, charge or trip.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 51, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.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 cp.charge_energy_used > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_used) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Use the dropdown at the top to choose the Geofence to display energy added from", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 4 - }, - "id": 66, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes cp\r\nINNER JOIN geofences g ON g.id = cp.geofence_id\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id AND g.name = '$geofence'\r\nGROUP BY g.name),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at $geofence", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 4 - }, - "id": 65, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n\tAND cost = 0),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added free (no cost)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 4 - }, - "id": 67, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH suc_data AS (\r\n\tSELECT c.charging_process_id\r\n\tFROM charges c\r\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\r\n\tLEFT JOIN addresses addr ON addr.id = cp.address_id\r\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\r\n\tWHERE \r\n cp.car_id = $car_id AND c.fast_charger_present\r\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\r\n AND $__timeFilter(end_date)\r\n\tGROUP BY 1\r\n), suc_energy AS (\r\n SELECT coalesce(sum(charge_energy_used), 0) AS charged_kWh\r\n FROM charging_processes cp\r\n INNER JOIN suc_data ON suc_data.charging_process_id = cp.id\r\n), energy AS(\r\n SELECT\r\n\t sum(charge_energy_used) AS charged_kWh\r\n FROM charging_processes\r\n WHERE $__timeFilter(end_date)\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * suc_energy.charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, suc_energy;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 4 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $distance_driven as \"distance_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Driven", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 7 - }, - "id": 56, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $ACCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at AC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 7 - }, - "id": 44, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $DCCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at DC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 7 - }, - "id": 14, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $SucCost", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 7 - }, - "id": 27, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $TotalCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Costs", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 10 - }, - "id": 40, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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) / $distance_driven * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 10 - }, - "id": 42, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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_used, charge_energy_used))\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average kWh Cost", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Net is the efficiency while driving", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 10 - }, - "id": 69, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Gross is all consumption (including while idle, phantom drains, sentry mode, etc)", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 10 - }, - "id": 71, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 60, - "panels": [], - "title": "Top 10 Charges", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 0, - "y": 14 - }, - "id": 46, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 General Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 6, - "y": 14 - }, - "id": 4, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost > 0\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Paid Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 14 - }, - "id": 34, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%'\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 SuperCharger Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 14 - }, - "id": 32, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND cost = 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Free Stations (Charged)", - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 62, - "panels": [], - "title": "Monthly Stats", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy used" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsSystem" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "noValue", - "value": "--" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "NaN": { - "index": 0, - "text": "--" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 15, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 58, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.4.0", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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 date_trunc('month', (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('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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 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 sum(distance)/sum(range_diff) AS efficiency\nFROM data WHERE\n car_id = $car_id\nGROUP BY date\nORDER BY date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n charging_processes.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM charging_processes)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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_used,charge_energy_used)) AS sum_consumption_kwh,\n sum(greatest(charge_energy_used,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 (charge_energy_used IS NULL OR charge_energy_used > 0.1)\nGROUP BY date\nORDER BY date", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM drives)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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\nGROUP BY date\nORDER BY date", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per month", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 8, - "avg_outside_temp_c": 3, - "cnt_charges": 7, - "cost_charges": 5, - "date": 1, - "date_from": 11, - "date_to": 12, - "display": 0, - "efficiency": 4, - "efficiency_charged_net_km": 10, - "efficiency_charged_net_km_temp": 13, - "efficiency_net_km": 9, - "sum_consumption_kwh": 6, - "sum_distance_km": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy used", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "TotalCost", - "options": [], - "query": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "SucCost", - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "DCCost", - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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);", - "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);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "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": 2, - "includeAll": false, - "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, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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)", - "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)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name FROM geofences ORDER BY id", - "description": "Geofence to display energy added at", - "hide": 0, - "includeAll": false, - "label": "Geofence", - "multi": false, - "name": "geofence", - "options": [], - "query": "SELECT name FROM geofences ORDER BY id", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Costs Stats", - "uid": "jchmDdLe5uFVk", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCurveStats.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCurveStats.json deleted file mode 100644 index e5f60191d7c..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ChargingCurveStats.json +++ /dev/null @@ -1,870 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd", - "seriesBy": "last" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 10 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 29, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]", - "fixed": "super-light-yellow" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - SOC [%]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Supercharger Charging Curve", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 10, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Other DC Charging Curve", - "type": "xychart" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 40, - "panels": [], - "title": "Fast Charging Sessions", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the charging curve sessions on Tesla Supercharges or other Fast Charging Station.\n\nAlso, you can see number of fast charging sessions you've done on each type of chargers and the count of max power (kW) reached on a session.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 4, - "x": 0, - "y": 15 - }, - "id": 38, - "options": { - "displayLabels": ["value", "percent"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_summary AS (\n SELECT\n cp.id,\n COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.road, addr.house_number), '')), addr.city)) AS location,\n COUNT(c.charging_process_id)\n FROM\n charging_processes cp\n LEFT JOIN \n addresses addr ON addr.id = address_id\n LEFT JOIN\n geofences geo ON geo.id = geofence_id\n LEFT JOIN\n charges c ON cp.id = c.charging_process_id\n WHERE\n $__timeFilter(date) AND\n cp.car_id = $car_id AND cp.charge_energy_added > 0.01 AND c.fast_charger_present \n GROUP BY 1, 2\n)\nSELECT \n CASE\n WHEN location ILIKE '%supercharger%' THEN 'Tesla Supercharger'\n ELSE 'Other DC Stations' END AS location,\n COUNT(location) AS n\nFROM charges_summary\nGROUP BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-greens" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 90, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "Number of times" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 20, - "x": 4, - "y": 15 - }, - "id": 34, - "links": [], - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xField": "Power [kW]", - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH power_summary AS (\n SELECT ROUND(MAX(charges.charger_power) / 5, 0) * 5 AS \"power\"\n FROM charging_processes\n LEFT JOIN charges ON charging_processes.id = charges.charging_process_id\n WHERE $__timeFilter(date) AND charging_processes.car_id = $car_id AND charging_processes.charge_energy_added > 0.01 AND charges.fast_charger_present\n GROUP BY charging_processes.id\n)\nSELECT power_summary.power AS \"Power [kW]\", COUNT(power_summary.power) AS n\nFROM power_summary\nWHERE power_summary.power >= $filter_power_from AND power_summary.power <= $filter_power_to\nGROUP BY 1\nORDER BY 1 DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Max Power", - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Power >=", - "name": "filter_power_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "260", - "value": "260" - }, - "hide": 0, - "label": "Power <=", - "name": "filter_power_to", - "options": [ - { - "selected": true, - "text": "260", - "value": "260" - } - ], - "query": "260", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "SOC >=", - "name": "filter_soc_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "100", - "value": "100" - }, - "hide": 0, - "label": "SOC <=", - "name": "filter_soc_to", - "options": [ - { - "selected": true, - "text": "100", - "value": "100" - } - ], - "query": "100", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Curve Stats", - "uid": "jchmXpkIkhmRz", - "version": 9, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ContinuousTrips.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ContinuousTrips.json deleted file mode 100644 index 93d06f58ebe..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/ContinuousTrips.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View Trip details", - "url": "d/FkUpJpQZk?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-BlPu" - } - }, - { - "id": "max", - "value": 400 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "custom.minWidth", - "value": 180 - }, - { - "id": "displayName", - "value": "End Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "custom.minWidth", - "value": 120 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitykmh" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitymph" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/%/" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_km" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_temp_c" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.minWidth", - "value": 150 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 90 - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-red", - "value": null - }, - { - "color": "super-light-yellow", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - } - ] - }, - "gridPos": { - "h": 30, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH \r\ntrip AS (\r\n SELECT start_date sd, end_date ed, distance, duration_min, start_usable_battery_level, end_usable_battery_level, \r\n outside_temp_avg, power_max, speed_max, start_[[preferred_range]]_range_km, end_[[preferred_range]]_range_km\r\n FROM drives INNER JOIN (\r\n SELECT drive_id, MIN(usable_battery_level) AS end_usable_battery_level, MAX(usable_battery_level) AS start_usable_battery_level\r\n FROM (\r\n SELECT p.drive_id, p.usable_battery_level, ROW_NUMBER() OVER (PARTITION BY p.drive_id ORDER BY date) AS row_num\r\n FROM drives d INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE d.car_id = $car_id\r\n AND $__timeFilter(p.date)\r\n AND d.end_date IS NOT NULL\r\n AND d.duration_min > 0\r\n AND d.start_[[preferred_range]]_range_km > d.end_[[preferred_range]]_range_km\r\n AND p.usable_battery_level IS NOT NULL\r\n ) AS pos\r\n GROUP BY drive_id\r\n ) AS filter_drives ON filter_drives.drive_id = drives.id\r\n),\r\ncp AS (\r\n SELECT car_id, start_date, end_date, COALESCE(LAG(start_date) OVER(ORDER BY start_date DESC), now()) next_date, start_battery_level, end_battery_level\r\n FROM charging_processes WHERE $__timeFilter(start_date) AND car_id = $car_id\r\n),\r\ndriven AS (\r\nSELECT cp.car_id, cp.start_date, cp.end_date, cp.next_date, \r\n MIN(trip.sd) trip_start_date, \r\n MAX(trip.ed) trip_end_date,\r\n SUM(convert_km(trip.distance::numeric, '$length_unit')) AS distance_$length_unit, \r\n MAX(convert_km(trip.speed_max::numeric, '$length_unit')) AS speed_max_$length_unit,\r\n SUM(trip.duration_min) duration_min,\r\n MAX(trip.start_usable_battery_level) start_soc, \r\n MIN(trip.end_usable_battery_level) end_soc, \r\n AVG(convert_celsius(trip.outside_temp_avg, '$temp_unit')) AS avg_temp_$temp_unit, \r\n MAX(trip.power_max) AS power_max, \r\n convert_km((MAX(trip.start_[[preferred_range]]_range_km) - MIN(trip.end_[[preferred_range]]_range_km))::numeric, '$length_unit') AS range_diff_$length_unit \r\n\tFROM cp\tINNER JOIN trip ON trip.sd BETWEEN cp.start_date and cp.next_date\r\n GROUP BY cp.car_id, cp.start_date, cp.end_date, cp.next_date\r\n)\r\nSELECT \r\n ROUND(EXTRACT(epoch FROM start_date) - 10) * 1000 AS start_date_ts, ROUND(EXTRACT(epoch FROM next_date) + 10) * 1000 AS end_date_ts, start_date, next_date end_date,\r\n distance_$length_unit, duration_min * 60 as duration_min, \r\n (distance_$length_unit / duration_min * 60) as speed_$length_unit, \r\n start_soc as \"% Start\", end_soc as \"% End\", avg_temp_$temp_unit, power_max, speed_max_$length_unit,\r\n (range_diff_$length_unit * car.efficiency) consumption_kwh, \r\n (range_diff_$length_unit * car.efficiency / distance_$length_unit * 1000.0) consumption_kWh_$length_unit,\r\n (distance_$length_unit / range_diff_$length_unit) efficiency\r\nFROM driven\r\nINNER JOIN cars car ON car.id = driven.car_id\r\nWHERE distance_$length_unit >= $min_dist AND (distance_$length_unit / duration_min * 60) >= $min_avg_speed\r\nORDER BY start_date DESC\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Long Trips", - "transformations": [], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings limit 1", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_temperature FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "SELECT unit_of_temperature FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Distance >=", - "name": "min_dist", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Avg Speed >=", - "name": "min_avg_speed", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Continuous Trips", - "uid": "jchmY8upc6ZRk", - "version": 5, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentChargeView.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentChargeView.json deleted file mode 100644 index 5e30f174b5f..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentChargeView.json +++ /dev/null @@ -1,1953 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["Custom"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Charge", - "tooltip": "Show Current Charge Data", - "type": "link", - "url": "d/jchm9RxutVS7a/current-charge-view?kiosk&var-car_id=${car_id}&from=${current_charge_time}&to=${current_end_time}&var-BatteryCapacity=${BatteryCapacity}&var-charging_processes=${charging_processes}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 8, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level as \"SOC [%]\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 33, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kWh$/", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level * $BatteryCapacity / 100 as \"kWh\", $BatteryCapacity AS Total FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Load this dashboard to while you are in a charging session. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Charge\" button at the top right corner, to enter in Kiosk mode:\n\n- If you are charging, you will see the information from the start time of the current charge session until now and it will refesh automatically every 30 seconds.\n\n- If you are just browsing (not charging) you will see the information of the last charge session.", - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 51, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
    \n\n
    ", - "mode": "html" - }, - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "decimals": 2, - "mappings": [], - "max": 49, - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 36, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^Added$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "kWh Added", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(charge_energy_added) as \"Added\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 37, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city)) FROM \tcharging_processes c \tLEFT JOIN addresses ON addresses.id = c.address_id \tLEFT JOIN geofences g ON g.id = geofence_id WHERE \tc.id = $charging_processes", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 51, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SOC [%]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 12, - "x": 0, - "y": 2 - }, - "id": 28, - "options": { - "legend": { - "calcs": ["mean", "min", "max", "last"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "alias": "Power [kW]", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["none"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level as \"SOC [%]\", (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]\", (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as \"Battery heater\" FROM charges c JOIN charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) and p.car_id = $car_id ORDER BY 1", - "refId": "Power", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "tags": [], - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-green", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": " SELECT battery_level as \"Initial SOC\" FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1", - "refId": "Inital SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT battery_level - (SELECT battery_level as \"Added\" FROM charges where charging_process_id=$charging_processes\tORDER BY DATE ASC \tLIMIT 1) as \"Added\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "clocks" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Elapsed Time", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "WITH start_process AS ( SELECT date FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1 ) SELECT EXTRACT(EPOCH FROM (charges.date - start_process.date)) AS \"Elapsed\" FROM charges, start_process WHERE charging_process_id = $charging_processes AND $__timeFilter(charges.date) order by charges.date desc LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["utc"], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 6, - "x": 18, - "y": 4 - }, - "id": 50, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 20, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-yellow", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "Km" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 7 - }, - "id": 16, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"Odometer\" from positions where car_id = $car_id order by date desc limit 1;", - "refId": "odometer", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 10 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Initial Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 asc limit 1", - "refId": "Initial Range", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Rated Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Rated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Estimated", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(est_battery_range_km, '$length_unit')) as \"Estimated Range\" FROM positions WHERE $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Estimated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Current" - }, - "properties": [ - { - "id": "unit", - "value": "amp" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 49, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_actual_current else ((2.85 + (usable_battery_level * 0.013)) * 96) * charger_power / 100 end) as \"Current\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 14 - }, - "id": 47, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^Volt$/", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_voltage else charger_power / GREATEST(0.1, (((2.85 + (usable_battery_level * 0.013)) * 96.0) * charger_power / 100.0)) * 1000.0 end) as \"Volt\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "orange", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 18 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(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\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "celsius" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 18 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Outdoor", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(inside_temp, '$temp_unit')) AS \"Inside\" FROM positions WHERE car_id = $car_id and inside_temp is not null AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Inside", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \t$__timeGroupAlias(date,$__interval), \tavg(convert_celsius(driver_temp_setting, '$temp_unit')) as \"Driver\" FROM positions WHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Driver", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_charge_time", - "options": [], - "query": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "charging_processes", - "options": [], - "query": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_end_time", - "options": [], - "query": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Current Charge View", - "uid": "jchm9RxutVS7a", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentDriveView.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentDriveView.json deleted file mode 100644 index 0917402bf8a..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentDriveView.json +++ /dev/null @@ -1,1858 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Drive", - "tooltip": "Adjust to current drive", - "type": "link", - "url": "d/jchmkOuP_Fggz/current-drive-view?kiosk&var-car_id=${car_id}&from=${current_drive_start_time}&to=${current_drive_end_time}&var-current_drive=${current_drive}&var-BatteryCapacity=${BatteryCapacity}&var-efficiency=${efficiency}&var-preferred_range=${preferred_range}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This is a special dashboard to load while driving. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Drive\" button at the top right corner, to enter in Kiosk mode:\n\n - If you are driving, you will see the information from the start time of the current drive until now and it will refesh automatically every 30 seconds.\n\n - If you are just browsing (not driving) you will see the information of the last drive.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-orange", - "mode": "fixed", - "seriesBy": "last" - } - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "dark-green", - "value": 0 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 26, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tavg(power) AS Power,\n\tavg(battery_heater::integer) AS \"Battery heater\",\n\tavg(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Elevation", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Power", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Consumption", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 3 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN $efficiency\n\t WHEN '$length_unit' = 'mi' THEN $efficiency * 1.60934\n\tEND as \"efficiency_$length_unit\"\nFROM settings\nWHERE\tid = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 20, - "y": 6 - }, - "id": 29, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 22, - "y": 6 - }, - "id": 31, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 12 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 12 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 12 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 12 - }, - "id": 27, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 12 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 15, - "y": 12 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 33, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - } - ], - "refresh": "10s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive", - "options": [], - "query": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_start_time", - "options": [], - "query": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_end_time", - "options": [], - "query": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "efficiency", - "options": [], - "query": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current Drive View", - "uid": "jchmkOuP_Fggz", - "version": 8, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentState.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentState.json deleted file mode 100644 index 4c487639572..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/CurrentState.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "state-timeline", - "name": "State timeline", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsSystem" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 4, - "y": 0 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 69, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "$preferred_range range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 70, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km(est_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND est_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km(ideal_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "estimated range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 85, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date FROM positions WHERE car_id = $car_id AND $__timeFilter(date) ORDER BY date DESC LIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 71, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS \"Front left\",\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS \"Front right\",\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS \"Rear left\",\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS \"Rear right\"\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure ($pressure_unit)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 86, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 59, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 63, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 4 - }, - "id": 61, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC \nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 8 - }, - "id": 79, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\n\tFROM drives d\n\tLEFT JOIN addresses ON addresses.id = d.end_address_id\n\tLEFT JOIN geofences g ON g.id = d.end_geofence_id\nWHERE\n\t $__timeFilter(d.end_date) AND d.car_id = $car_id \nORDER BY d.end_date DESC\nLIMIT 1", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Location", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "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" - } - ], - "noValue": "0", - "unit": "dtdhms" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 9, - "x": 15, - "y": 8 - }, - "id": 41, - "options": { - "displayLabels": ["percent", "name"], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^total_time$/", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [2, 0]) AS state\r\n FROM charging_processes\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [1, 0]) AS state\r\n FROM drives\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n start_date AS date,\r\n CASE\r\n WHEN state = 'offline' THEN 3\r\n WHEN state = 'asleep' THEN 4\r\n WHEN state = 'online' THEN 5\r\n END AS state\r\n FROM states\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [6, 0]) AS state\r\n FROM updates\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n), aux AS (\r\n SELECT $__timeFrom() :: timestamp AS date, (SELECT state FROM states WHERE date <= $__timeFrom() ORDER BY date DESC LIMIT 1) AS state, false AS include\r\n UNION\r\n SELECT date, state, true AS include FROM states\r\n UNION\r\n SELECT $__timeTo() :: timestamp as date, NULL AS state, true as include\r\n ORDER BY date\r\n), states_elapsed AS (\r\n SELECT \r\n date, state AS current_state, include,\r\n LAG(state) OVER (ORDER BY date) AS state,\r\n LAG(date) OVER (ORDER BY date) AS last_state_time,\r\n date - LAG(date) OVER (ORDER BY date) AS elapsed_time\r\n FROM aux \r\n)\r\nSELECT \r\n CASE\r\n WHEN state = 0 OR state = 5 THEN 'online'\r\n WHEN state = 1 THEN 'driving'\r\n WHEN state = 2 THEN 'charging'\r\n WHEN state = 3 THEN 'offline'\r\n WHEN state = 4 THEN 'asleep'\r\n WHEN state = 6 THEN 'updating'\r\n END AS state,\r\n EXTRACT(EPOCH FROM SUM(elapsed_time)) as Total_Time\r\nFROM states_elapsed\r\nWHERE $__timeFilter(date) AND include\r\nGROUP BY 1\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 11 - }, - "id": 55, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id AND $__timeFilter(date)\norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 57, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id AND start_date <= $__timeTo()\norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 83, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current State", - "uid": "jchmo4BNRkZz", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/DCChargingCurvesByCarrier.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/DCChargingCurvesByCarrier.json deleted file mode 100644 index 427731fac92..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/DCChargingCurvesByCarrier.json +++ /dev/null @@ -1,1026 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%'\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charger Carrier Contains: $carrier", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 44, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n COALESCE(g.name, a.name) AS name\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id, g.name, a.name\r\n)\r\nSELECT name AS \"Charger Carrier\" FROM data GROUP BY name\r\n\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 16 - }, - "id": 35, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_added)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Added", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 6, - "y": 16 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_used)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Used", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 11, - "y": 16 - }, - "id": 34, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(duration_min)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Time", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 16 - }, - "id": 37, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.cost)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 16 - }, - "id": 38, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n AVG(p.charge_energy_used) AS charge_energy_used, AVG(p.cost) AS cost \r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id\r\n)\r\nSELECT AVG(cost) / AVG(charge_energy_used) cost_kwh FROM data", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost per kWh", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "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" - } - ], - "title": "Help", - "type": "row" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Carrier Name", - "hide": 0, - "label": "Carrier", - "name": "carrier", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "DC Charging Curves by Carrier", - "uid": "jchmXpkcccIkh", - "version": 6, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/DatabaseDashboadInfo.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/DatabaseDashboadInfo.json deleted file mode 100644 index 1607e0f4915..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/DatabaseDashboadInfo.json +++ /dev/null @@ -1,1233 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 5, - "y": 0 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Charges\" FROM charging_processes WHERE car_id=$car_id \n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives\" FROM drives WHERE car_id=$car_id ", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 10, - "y": 0 - }, - "id": 39, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Nº Car Updates\"\nFROM Updates \nWHERE car_id = $car_id\n", - "refId": "Car Updates", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as \"Current Car Firmware\" \r\nfrom updates \r\nwhere car_id = $car_id \r\norder by start_date desc \r\nlimit 1", - "refId": "Firmware", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Software", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 15, - "y": 0 - }, - "id": 42, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Charges not closed\"\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives not closed\"\r\nFROM drives \r\nWHERE car_id = $car_id AND end_date is null", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Incomplete Data", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 40, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "You can go to the \nIncomplete Data dashboard
    \nto see details of the **Drives** or **Charges** not closed.\n", - "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" - } - ] - } - ], - "title": "About incomplete data", - "type": "text" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 34, - "panels": [], - "title": "Database Information", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Size" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 0, - "y": 5 - }, - "id": 33, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT \r\n relname AS \"Table\",\r\n pg_size_pretty(pg_total_relation_size(relid)) As \"Size\"\r\nFROM \r\n pg_catalog.pg_statio_user_tables\r\nORDER BY \r\n pg_total_relation_size(relid) DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Row Count" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 5, - "y": 5 - }, - "id": 38, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT table_name AS \"Table Name\", \r\n (xpath('/row/cnt/text()', xml_count))[1]::text::int AS \"Row Count\"\r\nFROM (\r\n SELECT table_name, \r\n query_to_xml(format('SELECT count(*) as cnt FROM %I.%I', table_schema, table_name), false, true, '') AS xml_count\r\n FROM information_schema.tables\r\n WHERE table_schema NOT IN ('pg_catalog', 'information_schema')\r\n) AS t\r\nORDER BY 2 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "These statistics can help you evaluate the efficiency of your indexes.\n\nYou should reindex all the database periodically.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 14, - "x": 10, - "y": 5 - }, - "id": 41, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\r\n relname AS \"Table\",\r\n indexrelname AS \"Index\",\r\n idx_scan AS \"Index Scans\",\r\n idx_tup_read AS \"Tuples Read\",\r\n idx_tup_fetch AS \"Tuples Fetched\"\r\nFROM\r\n pg_stat_all_indexes\r\nWHERE\r\n schemaname NOT LIKE 'pg_%' AND\r\n indexrelname IS NOT NULL\r\nORDER BY 3 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Indexes", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 0, - "y": 21 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n pg_size_pretty(SUM(pg_total_relation_size(relid))) As \"Size\"\nFROM \n pg_catalog.pg_statio_user_tables;", - "refId": "DistanceLogged", - "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" - } - ] - } - ], - "title": "Database Total Size", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [ - { - "targetBlank": true, - "title": "Click to check last Version", - "url": "https://github.com/jheredianet/Teslamate-CustomGrafanaDashboards/releases/" - } - ], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 14, - "x": 10, - "y": 21 - }, - "id": 43, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "SELECT '2024.04.02' AS \"Current Version\"", - "refId": "DashboardVersion", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "About Teslamate Custom Dashboards", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "description": "", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Database Information", - "uid": "jchm_dbInfo", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/IncompleteData.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/IncompleteData.json deleted file mode 100644 index 84e5fce4dcc..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/IncompleteData.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1686842645876, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": false - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT 'Car ID: ' || id as id, 'Name: '|| name as name , 'Model: '|| model as model, 'VIN: '|| vin as vin, \n 'Color: '|| exterior_color as color, 'Wheels: '|| wheel_type, 'Efficiency: '|| efficiency as efficiency \nFROM cars\nWHERE id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Car Information 🚘", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "content": "#### Incomplete Data\n\nFrom here you can check if you have incomplete data of **Drives** and **Charges**. If so, you may follow the official guide by Manually fixing data", - "mode": "markdown" - }, - "pluginVersion": "8.5.15", - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 15, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id AS \"Drive ID\", start_date, end_date, distance, duration_min \nFROM drives \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Drives 🛣️", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 22, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id as \"Charging Process ID\", start_date, end_date, charge_energy_added, charge_energy_used, start_battery_level, end_battery_level, duration_min\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Charges 🪫", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Incomplete Data", - "uid": "jchmIDopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/MileageStats.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/MileageStats.json deleted file mode 100644 index 27ca8a4fe6f..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/MileageStats.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "dtdurations" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "max", - "value": 1 - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 9, - "x": 0, - "y": 1 - }, - "id": 10, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "10.1.2", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per ${period}", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 16, - "date_to": 17, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 14, - "efficiency_charged_net_mi": 15, - "efficiency_net_km": 12, - "efficiency_net_mi": 13, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 80, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cnt" - }, - "properties": [ - { - "id": "unit", - "value": "drives" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Count" - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 27, - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0.7, - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "always", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.6", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 \"Period\",\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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "${length_unit} & drives per ${period}", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["sum_distance_km", "cnt", "Period"] - } - } - } - ], - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - }, - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - } - ], - "query": "month,year,day,week", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage Stats", - "uid": "jchmNjtMTFx", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/SpeedRates.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/SpeedRates.json deleted file mode 100644 index 666e8f8c3cc..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/SpeedRates.json +++ /dev/null @@ -1,1218 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "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": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "avg_consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "min" - }, - { - "id": "max" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "max" - }, - { - "id": "min" - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (km/h)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (mph)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Avg. Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n BinnedData.speed_bin AS speed_range_$length_unit,\r\n convert_km(BinnedData.total_odometer_distance::numeric, '$length_unit') AS avg_distance_$length_unit,\r\n BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END AS avg_speed_$length_unit,\r\n ((BinnedData.total_energy_consumed / (BinnedData.total_distance * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END)) * 1000 ) / (BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END) AS avg_consumption_$length_unit,\r\n avg_power\r\nFROM\r\n (SELECT\r\n CASE\r\n WHEN elevation_diff >= 1 THEN 'Uphill'\r\n WHEN elevation_diff <= -1 THEN 'Downhill'\r\n ELSE 'Flat'\r\n END AS terrain_type,\r\n ROUND(speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END / 10, 0) * 10 AS speed_bin,\r\n AVG(power) AS avg_power,\r\n SUM(power::integer * speed::integer / 60.0) AS total_energy_consumed,\r\n SUM(speed / 60.0) AS total_distance,\r\n SUM(odometer_distance) AS total_odometer_distance,\r\n AVG(speed) AS avg_speed,\r\n car_id\r\n FROM\r\n (SELECT\r\n drives.car_id,\r\n positions.speed,\r\n positions.power,\r\n positions.elevation - LAG(positions.elevation) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS elevation_diff,\r\n positions.odometer - LAG(positions.odometer) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS odometer_distance\r\n FROM\r\n drives\r\n JOIN positions ON drives.id = positions.drive_id\r\n WHERE\r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND drives.end_date IS NOT NULL\r\n AND drives.distance >= convert_km($min_distance::numeric, '$length_unit')\r\n ) AS DifferentialData\r\n GROUP BY speed_bin, terrain_type, car_id\r\n ) AS BinnedData\r\nJOIN cars ON BinnedData.car_id = cars.id\r\nWHERE BinnedData.terrain_type = '$terrain_type'\r\n AND BinnedData.total_distance > 0 \r\n AND BinnedData.total_odometer_distance > 0\r\n AND BinnedData.speed_bin >= $min_speed_segment\r\nORDER BY BinnedData.speed_bin DESC;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption by speed - $terrain_type Terrain", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere $__timeFilter(end_date) and car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 14, - "y": 6 - }, - "id": 4, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere $__timeFilter(end_date) \n and distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 17, - "y": 6 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t $__timeFilter(end_date)\n\t and end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance > 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 20, - "y": 6 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "seconds_elapsed" - }, - "properties": [ - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 16, - "links": [], - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \r\n speed_section_$length_unit || CASE WHEN '$length_unit' = 'km' THEN ' km/h' WHEN '$length_unit' = 'mi' THEN ' mph' END AS speed,\r\n SUM(seconds_elapsed) AS seconds_elapsed\r\nFROM (\r\n SELECT\r\n ROUND(convert_km(p.speed::numeric, '$length_unit') / 10,0) * 10 AS speed_section_$length_unit,\r\n EXTRACT(EPOCH FROM (LEAD(p.\"date\") OVER (ORDER BY p.\"date\") - p.\"date\")) AS seconds_elapsed\r\n FROM drives d\r\n INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE\r\n $__timeFilter(d.start_date)\r\n AND d.car_id = $car_id \r\n AND d.end_date IS NOT NULL\r\n AND d.distance >= convert_km($min_distance::numeric,'$length_unit')\r\n AND p.speed > 0.1\r\n) AS drivedata\r\nWHERE speed_section_$length_unit >= $min_speed_segment\r\nGROUP BY speed_section_$length_unit\r\nORDER BY speed_section_$length_unit DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Speeds", - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "50", - "value": "50" - }, - "hide": 0, - "includeAll": false, - "label": "Min. speed segment", - "multi": false, - "name": "min_speed_segment", - "options": [ - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "20", - "value": "20" - }, - { - "selected": false, - "text": "30", - "value": "30" - }, - { - "selected": false, - "text": "40", - "value": "40" - }, - { - "selected": true, - "text": "50", - "value": "50" - } - ], - "query": "10,20,30,40,50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": true, - "text": "25", - "value": "25" - }, - "hide": 0, - "includeAll": false, - "label": "Min. driving distance", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": true, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": false, - "text": "150", - "value": "150" - }, - { - "selected": false, - "text": "200", - "value": "200" - } - ], - "query": "1,5,10,25,50,100,150,200", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - "hide": 0, - "includeAll": false, - "label": "Terrain Type", - "multi": false, - "name": "terrain_type", - "options": [ - { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - { - "selected": false, - "text": "Uphill", - "value": "Uphill" - }, - { - "selected": false, - "text": "Downhill", - "value": "Downhill" - } - ], - "query": "Flat, Uphill, Downhill", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": false, - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Speed Rates", - "uid": "jchmfu4SiQgWz", - "version": 10, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/TrackingDrives.json b/incubator/TeslaMate/0.0.16/dashboards/teslamate2/TrackingDrives.json deleted file mode 100644 index 47a5a0d8b45..00000000000 --- a/incubator/TeslaMate/0.0.16/dashboards/teslamate2/TrackingDrives.json +++ /dev/null @@ -1,1363 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater (On/Off)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power (kW)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation (m)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (km/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (mi/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC (%)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater (On/Off)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "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", - "options": "Power (kW)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Rated Efficiency (kWh/100km)" - }, - "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": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Elevation (m)" - }, - "properties": [ - { - "id": "decimals", - "value": 0 - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 15, - "x": 0, - "y": 0 - }, - "hideTimeOverride": false, - "id": 8, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n\t$__time(date),\n\tAVG(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h,\n\tAVG(power) AS Power,\n\tAVG(battery_level) AS SOC,\n\tAVG(battery_heater::integer * 100) AS battery_heater,\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 20, - "w": 9, - "x": 15, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n $__time(date), latitude, longitude\nFROM positions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nORDER BY date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "sec_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 17 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "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", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 5, - "y": 17 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 17 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 17 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Year", - "options": [], - "query": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Month", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Day", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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;", - "hide": 0, - "includeAll": false, - "label": "Journey", - "multi": false, - "name": "journey", - "options": [], - "query": "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;", - "refresh": 1, - "regex": "/route=\"(?[^\"]+)|id=\"(?[^\"]+)/g", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "2023-11-28T12:32:29.961Z", - "to": "2023-11-28T12:40:33.863Z" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Tracking Drives", - "uid": "jchmX8upc6ZRk", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/0.0.16/icon-small.webp b/incubator/TeslaMate/0.0.16/icon-small.webp deleted file mode 100644 index 06f97ddfd5f87d7c972ecb515d4014afa6488852..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 394 zcmV;50d@XTNk&G30RRA3MM6+kP&il$0000G0000V0018V06|PpNWK6700DrqZQHWu z!QCY}jRwu;ZjCgTM%zK#FK~-qEiGDO$$j13mvBD+zUPZ;5itS4U!Huv9gqTk^pGHk zaypFVn9mWcnOO^leCUPXdEY4$6xt&M?gsgp=L&@2?5Lhg+WkbJ-XtU}nyoT{T-uN` zdI%9)7%4IO{ylmb2{Eb}ilqWpeoD#!sJXy7hyb@T^(X8zDFfcF)e^triW7uN8m{@A zR7wC*JMzc&J*)!cz-EacimPrAv132o00IG4P&go-0001x0|1=?Dj)zL00ICsC8Pin zU^y|tz?ax$YJ2NN!H(UtZe<_<0RH(9blPKk_dm~BA;C@uwcc-c#zoiav#)cBfJxvQ z`d;~F=@~qr^)$;yhD`dvKcM2LQXKGVKcV~VKUQz)t9@a58u0Ji|4*D&gK~mnE`2=0 ok_w|8siR6Za@8B31{EY3AJ%W{hs0_E8sx>!g@MUM*LnZ|07!PLy8r+H diff --git a/incubator/TeslaMate/0.0.16/icon.webp b/incubator/TeslaMate/0.0.16/icon.webp deleted file mode 100644 index c68d6fd7df6a04725889d4e15afec70d644b339a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1988 zcmV;#2RryuNk&Gz2LJ$9MM6+kP&il$0000G0001$005N$06|PpNYw-Y00E!{0ALx( zN;+D5*1Na%o^SVT+qP}nwr$%tw`be-t!+(rn&kO)+GM^SB4PpnB|Ul_{hXine05z* zU^;S6LoWTy)+0kv+J_?@)zCEHT-xt=o=5%|W!za@)5a8Vs4*p`5R<=XNI5hx(vo!+ zft?RzlE3|Vc|%Vn%Q*9j+Y^bH==BtD4P=(eXXcw+gD8Ygxz*bqvWfE_bml8h#76nA zcD8b6kz0%9k9cC#EZvl9){Nn-%Ma6K5u?ZM?iiwi?0_1#dM7f86j9vj2nQ82G!@pS z>9HgTD)=_tAF=^POu3bWh*WXO&y&498Nm7W-T6*WB%SkMWotV~H>I}r?571p@|n6J zQ8paCpmlJ!OL`(ll)bNsmpQf64UQCJB2%2QybPohj9&F38xz?YQg2Q6r;u65gwwG+ zk#*twy}g_jbW!`XTl+~*WS@U;Mne~l9?&sr{9R0_SbV-us0}5c(zes(VnWTdz4gsG zDwx+f_Pr3(L&$r*GEgNy%cuo+GXz3aee9*NL27xaBL?pOfeCemSL-_XK>2VU4VJz} zgvv!XCqz5SgtPP-_OzH#J4e?}tATQGY=1Y?fa!(#GTo9#} zmO6U!#Y94X^!4DtFen{OV8^Xr5n*D{izN+QmC{f-R+<%CLYP_buwR&sLJA&(ULe9! zEa+O;8qcoB$=D*o*xYyPYI4R=_|LkVMc6CE9q(lYji7X&`=x|1Irm0a3n-pLw^T$J zUG%W5nP^;vw*p~y@p5m`wEcO)ZuC8x6D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2Ei9$+qSyp=xSj6>b)OBU;l>xCfwyc2}{2z&MI!K WQm1xc!%47n0V*8herjL<0002EX|MhO diff --git a/incubator/TeslaMate/0.0.16/ix_values.yaml b/incubator/TeslaMate/0.0.16/ix_values.yaml deleted file mode 100644 index dc76692a496..00000000000 --- a/incubator/TeslaMate/0.0.16/ix_values.yaml +++ /dev/null @@ -1,84 +0,0 @@ -image: - repository: teslamate/teslamate - pullPolicy: IfNotPresent - tag: 1.28.5@sha256:aa3f37ecccc7ea77fa1e259391c8f2a05533e208228a42ebb4dbe560828db057 - -securityContext: - container: - readOnlyRootFilesystem: false - -service: - main: - ports: - main: - protocol: http - port: 4000 - -workload: - main: - replicas: 1 - strategy: RollingUpdate - podSpec: - containers: - main: - env: - ENCRYPTION_KEY: - secretKeyRef: - name: teslamate-secrets - key: TESLAMATE_ENCRYPTION_KEY - DATABASE_USER: "{{ .Values.cnpg.main.user }}" - DATABASE_PASS: - secretKeyRef: - name: cnpg-main-user - key: password - DATABASE_NAME: "{{ .Values.cnpg.main.database }}" - DATABASE_HOST: - secretKeyRef: - name: cnpg-main-urls - key: host - DISABLE_MQTT: true - MQTT_HOST: "" - MQTT_PORT: 1883 - MQTT_USERNAME: "" - MQTT_PASSWORD: "" - -configmap: - datasource: - enabled: true - labels: - grafana_datasources: "1" - data: - datasourceteslamatepsql.yaml: |- - apiVersion: 1 - datasources: - - name: TeslaMate - type: postgres - uid: TeslaMate - url: {{ printf "%s.%s:5432" (.Values.cnpg.main.creds.host | trimAll "\"") .Release.Namespace }} - access: proxy - user: {{ .Values.cnpg.main.user }} - secureJsonData: - password: {{ .Values.cnpg.main.creds.password | default "na" }} - jsonData: - database: {{ .Values.cnpg.main.database }} - sslmode: 'disable' # disable/require/verify-ca/verify-full - maxOpenConns: 100 # Grafana v5.4+ - maxIdleConns: 100 # Grafana v5.4+ - maxIdleConnsAuto: true # Grafana v9.5.1+ - connMaxLifetime: 14400 # Grafana v5.4+ - postgresVersion: 1500 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10 - timescaledb: false - -portal: - open: - enabled: true - -cnpg: - main: - enabled: true - user: teslamate - database: teslamate - cluster: - initdb: - postInitApplicationSQL: - - ALTER USER teslamate WITH SUPERUSER diff --git a/incubator/TeslaMate/0.0.16/questions.yaml b/incubator/TeslaMate/0.0.16/questions.yaml deleted file mode 100755 index 10d51835f68..00000000000 --- a/incubator/TeslaMate/0.0.16/questions.yaml +++ /dev/null @@ -1,3031 +0,0 @@ -groups: - - name: Image - description: | - Configured the images to be used for the Chart. - It's wise to use "digest pinned" tags and to avoid using "latest". - - Checkout the following documentation for more information: - - https://truecharts.org/common/#images - - - - name: General - description: | - For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general. - - Checkout the following documentation for more information: - - https://truecharts.org/common/global/ - - https://truecharts.org/common/#tz - - https://truecharts.org/common/podoptions/ - - Image Pull Secrets - - - - name: Workload - description: | - These settings configure how the actual Pods and containers are running. - Generally, on SCALE, we only expose a limited subset of these settings for the primary workload and container. - - Checkout the following documentation for more information: - - https://truecharts.org/common/workload/ - - https://truecharts.org/common/container/ - - - - name: App Configuration - description: | - Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application. - Most options should have a Tooltip (Circled Question Mark) to further describe said option. - - To find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/ - - - name: Services - description: | - Service and Networking options for any applications are contained here. - Some applications may have complicated networking setups with multiple options or some may have no options here at all. - - Options here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes. - - Checkout the following documentation for more information: - - https://truecharts.org/common/service/ - - - name: Networking - description: | - Contains advanced networking options that are not actively supported by the TrueCharts team. - Currently only contains scaleExternalInterfaces. - - Checkout the following documentation for more information: - - https://truecharts.org/common/scaleexternalinterface/ - - - name: Persistence - description: | - Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types. - This storage is called Persistence since it is not deleted upon restart or upgrade of an application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/ - - https://truecharts.org/scale/guides/nfs-share/ - - https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath - - - - name: Ingress - description: | - Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names). - If you choose to enable this you must have a "Ingress Provider" aka "Reverse Proxy" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/) - It also requiresa DNS service to actually resolve the DNS name of the FQDN specified. - - Checkout the following documentation for more information: - - https://truecharts.org/common/ingress/ - - - - name: SecurityContext - description: | - The security settings for each application and/or permissions that each application may have for the files/directories created. - Each application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities. - - Unless necessary users are advised to keep this section mostly to defaults. - - Checkout the following documentation for more information: - - https://truecharts.org/common/securitycontext/ - - - - name: Resources - description: | - Resources limits that have been defined by each application are in this section. - Most will have a specific default that some users may want to change based on their specific hardware or needs. - - This also contains the options to mount GPUs or, more precisely, "request" GPU's to be mounted. - - Checkout the following documentation for more information: - - https://truecharts.org/common/resources/ - - - name: Devices - description: | - These are special "mountpoints" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts. - For clearity we've decided to seperate this from persistence on SCALE. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/device/ - - https://truecharts.org/scale/guides/pci-passthrough/ - - - name: Middlewares - description: Traefik Middlewares - - - name: StorageClass - description: | - StorageClasses define where to storage Storage. - - Checkout the following documentation for more information: - - - name: Metrics - description: | - Contains options to configure Prometheus metrics for the application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/metrics/ - - - - name: Addons - description: | - Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application’s defaults. - Things included here are VPN addons, Codeserver for editing files inside the application’s container, Netshoot for network troubelshooting, etc. - - Generally not required for use but may be necessary or usefull at times for specific applications. - - Checkout the following documentation for more information: - - https://truecharts.org/common/addons/ - - https://truecharts.org/scale/guides/vpn-setup/ - - - - name: Experimental - description: | - Experimental Configuration Options - Often these are not fully flushed-out, could randomly break or might not work at-all. - - - name: Postgresql - description: | - For Postgresql we use "CloudNative-PG" as a backend, which has to be installed first. - - Checkout the following documentation for more information: - - https://truecharts.org/common/cnpg/ - - https://truecharts.org/scale/guides/sql-export/ - - https://truecharts.org/scale/guides/recover-cnpg/ - - - name: Dependencies - description: | - contains dependency setting for which we, currently, do not have seperate catagories (yet) - - - - name: Documentation - description: | - We added this section to make everyone aware that OpenSource isn't always easy. - It doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects. - - Before installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/ - We would also advice going over our https://truecharts.org/scale/guides/scale-intro/ - and many of the other documentation pages... - -portals: - open: - protocols: - - "$kubernetes-resource_configmap_tcportal-open_protocol" - host: - - "$kubernetes-resource_configmap_tcportal-open_host" - ports: - - "$kubernetes-resource_configmap_tcportal-open_port" - -questions: - - variable: global - group: General - label: "Global Settings" - schema: - additional_attrs: true - type: dict - attrs: - - variable: stopAll - label: Stop All - description: "Stops All Running pods and hibernates cnpg" - schema: - type: boolean - default: false - - - variable: workload - group: "Workload" - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type (Advanced) - schema: - type: string - default: Deployment - enum: - - value: Deployment - description: Deployment - - value: DaemonSet - description: DaemonSet - - - variable: replicas - label: Replicas (Advanced) - description: Set the number of Replicas - schema: - type: int - show_if: [["type", "!=", "DaemonSet"]] - default: 1 - - - variable: podSpec - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: containers - label: Containers - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: Main Container - schema: - additional_attrs: true - type: dict - attrs: - - - 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]] - - - variable: envList - label: Extra Environment Variables - description: "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting..." - schema: - type: list - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - - variable: value - label: Value - schema: - type: string - - variable: extraArgs - label: Extra Args - schema: - type: list - default: [] - items: - - variable: arg - label: Arg - schema: - type: string - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: command - label: Command - schema: - type: list - default: [] - items: - - variable: param - label: Param - schema: - type: string - - - variable: TZ - label: Timezone - group: "General" - schema: - type: string - default: "Etc/UTC" - $ref: - - "definitions/timezone" - - - variable: podOptions - group: "General" - label: "Global Pod Options (Advanced)" - schema: - additional_attrs: true - type: dict - attrs: - - variable: expertPodOpts - label: "Expert - Pod Options" - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hostNetwork - label: "Host Networking" - schema: - type: boolean - default: false - - variable: dnsConfig - label: "DNS Configuration" - schema: - type: dict - additional_attrs: true - attrs: - - variable: options - label: "Options" - schema: - type: list - default: [{"name": "ndots", "value": "1"}] - items: - - variable: optionsEntry - label: "Option Entry" - schema: - type: dict - additional_attrs: true - attrs: - - variable: name - label: "Name" - schema: - type: string - required: true - - variable: value - label: "Value" - schema: - type: string - - variable: nameservers - label: "Nameservers" - schema: - type: list - default: [] - items: - - variable: nsEntry - label: "Nameserver Entry" - schema: - type: string - required: true - - variable: searches - label: "Searches" - schema: - type: list - default: [] - items: - - variable: searchEntry - label: "Search Entry" - schema: - type: string - required: true - - - variable: imagePullSecretList - group: "General" - label: "Image Pull Secrets" - schema: - type: list - default: [] - items: - - variable: pullsecretentry - label: "Pull Secret" - schema: - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: true - - variable: data - label: Data - schema: - type: dict - additional_attrs: true - attrs: - - variable: registry - label: "Registry" - schema: - type: string - required: true - default: "https://index.docker.io/v1/" - - variable: username - label: "Username" - schema: - type: string - required: true - default: "" - - variable: password - label: "Password" - schema: - type: string - required: true - private: true - default: "" - - variable: email - label: "Email" - schema: - type: string - required: true - default: "" - - - variable: service - group: Services - label: Configure Service(s) - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Service - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "Service's Port(s) Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service Port Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: "Port" - description: "This port exposes the container port on the service" - schema: - type: int - default: 10038 - required: true - - variable: scaleExternalInterface - description: 'Add External Interfaces (Experimental, might change or be removed without further notice)' - label: Add external Interfaces (Experimental) - group: Networking - schema: - type: list - items: - - variable: interfaceConfiguration - description: Interface Configuration - label: Interface Configuration - schema: - additional_attrs: true - type: dict - $ref: - - "normalize/interfaceConfiguration" - attrs: - - variable: hostInterface - description: Please Specify Host Interface - label: Host Interface - schema: - type: string - required: true - $ref: - - "definitions/interface" - - variable: ipam - description: Define how IP Address will be managed - label: IP Address Management - schema: - additional_attrs: true - type: dict - required: true - attrs: - - variable: type - description: Specify type for IPAM - label: IPAM Type - schema: - type: string - required: true - enum: - - value: dhcp - description: Use DHCP - - value: static - description: Use Static IP - - variable: staticIPConfigurations - label: Static IP Addresses - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticIP - label: Static IP - schema: - type: ipaddr - cidr: true - - variable: staticRoutes - label: Static Routes - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticRouteConfiguration - label: Static Route Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: destination - label: Destination - schema: - type: ipaddr - cidr: true - required: true - - variable: gateway - label: Gateway - schema: - type: ipaddr - cidr: false - required: true - - - - variable: serviceList - label: Add Manual Custom Services - group: Services - schema: - type: list - default: [] - items: - - variable: serviceListEntry - label: Custom Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the service - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - value: Simple - description: Deprecated CHANGE THIS - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: advancedsvcset - label: Show Advanced Service Settings - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: externalIPs - label: "External IP's" - description: "External IP's" - schema: - type: list - default: [] - items: - - variable: externalIP - label: External IP - schema: - type: string - - variable: ipFamilyPolicy - label: IP Family Policy - description: Specify the IP Policy - schema: - type: string - default: SingleStack - enum: - - value: SingleStack - description: SingleStack - - value: PreferDualStack - description: PreferDualStack - - value: RequireDualStack - description: RequireDualStack - - variable: ipFamilies - label: IP Families - description: (Advanced) The IP Families that should be used - schema: - type: list - default: [] - items: - - variable: ipFamily - label: IP Family - schema: - type: string - - variable: portsList - label: Additional Service Ports - schema: - type: list - default: [] - items: - - variable: portsListEntry - label: Custom ports - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Port - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Port Name - schema: - type: string - default: "" - - variable: protocol - label: Port Type - schema: - type: string - default: tcp - enum: - - value: http - description: HTTP - - value: https - description: HTTPS - - value: tcp - description: TCP - - value: udp - description: UDP - - variable: targetPort - label: Target Port - description: This port exposes the container port on the service - schema: - type: int - required: true - - variable: port - label: Container Port - schema: - type: int - required: true - - - variable: persistence - label: Integrated Persistent Storage - description: Integrated Persistent Storage - group: Persistence - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: pvc - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - value: iscsi - description: iSCSI Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
    - Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size quotum of Storage (Do NOT REDUCE after installation) - description: This value can ONLY be INCREASED after the installation - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: disabled - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: persistenceList - label: Additional App Storage - group: Persistence - schema: - type: list - default: [] - items: - - variable: persistenceListEntry - label: Custom Storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the storage - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: hostPath - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
    - Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: mountPath - label: Mount Path - description: Path inside the container the storage is mounted - schema: - type: string - default: "" - required: true - valid_chars: '^\/([a-zA-Z0-9._-]+(\s?[a-zA-Z0-9._-]+|\/?))+$' - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size Quotum of Storage - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: "disabled" - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: ingress - label: "" - group: Ingress - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name (Optional) - description: Defaults to chart name - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description (Optional) - description: Defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: icon - label: Icon (Optional) - description: Defaults to chart icon - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - variable: widget - label: Widget Settings - schema: - type: dict - additional_attrs: true - show_if: [["enabled", "=", true]] - attrs: - - variable: enabled - label: Enable Widget - description: When disabled all widget annotations are skipped. - schema: - type: boolean - default: true - - variable: custom - label: Options - schema: - type: dict - additional_attrs: true - attrs: - - variable: key - label: API-key (key) - schema: - type: string - default: "" - - variable: customkv - label: Custom Options - schema: - type: list - default: [] - items: - - variable: option - label: Option - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - default: "" - required: true - - variable: value - label: Value - schema: - type: string - default: "" - required: true - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - - variable: ingressList - label: Add Manual Custom Ingresses - group: Ingress - schema: - type: list - default: [] - items: - - variable: ingressListEntry - label: Custom Ingress - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: ingressClassName - label: IngressClass Name - schema: - type: string - default: "" - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: overrideService - label: Linked Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Service Name - schema: - type: string - default: "" - - variable: port - label: Service Port - schema: - type: int - - variable: tls - label: TLS-Settings - schema: - type: list - default: [] - show_if: [["certificateIssuer", "=", ""]] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: Use Custom Secret (Advanced) - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: "Allow Cross Origin Requests" - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: namespace - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description - description: defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - - variable: securityContext - group: SecurityContext - label: Security Context - schema: - additional_attrs: true - type: dict - attrs: - - variable: container - label: Container - schema: - additional_attrs: true - type: dict - attrs: - # Settings from questions.yaml get appended here on a per-app basis - - - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" - schema: - type: int - default: 568 - - variable: runAsGroup - label: "runAsGroup" - description: "The groupID of the user running the application" - schema: - type: int - default: 568 - # Settings from questions.yaml get appended here on a per-app basis - - variable: PUID - label: Process User ID - PUID - description: When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps - schema: - type: int - show_if: [["runAsUser", "=", 0]] - default: 568 - - variable: UMASK - label: UMASK - description: When supported by the container, this sets the UMASK for the App. Not supported by all Apps - schema: - type: string - default: "0022" - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: privileged - label: "Privileged mode" - schema: - type: boolean - default: false - - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" - schema: - type: boolean - default: true - - - variable: pod - label: Pod - schema: - additional_attrs: true - type: dict - attrs: - - variable: fsGroupChangePolicy - label: "When should we take ownership?" - schema: - type: string - default: OnRootMismatch - enum: - - value: OnRootMismatch - description: OnRootMismatch - - value: Always - description: Always - - variable: supplementalGroups - label: Supplemental Groups - schema: - type: list - default: [] - items: - - variable: supplementalGroupsEntry - label: Supplemental Group - schema: - type: int - # Settings from questions.yaml get appended here on a per-app basis - - - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." - schema: - type: int - default: 568 - - variable: resources - group: Resources - label: "Resource Limits" - schema: - additional_attrs: true - type: dict - attrs: - - variable: limits - label: Advanced Limit Resource Consumption - schema: - additional_attrs: true - type: dict - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 4000m - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: RAM - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 8Gi - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: 'gpu.intel.com/i915' - label: Add Intel i915 GPUs - schema: - type: int - default: 0 - - variable: 'nvidia.com/gpu' - label: Add NVIDIA GPUs (Experimental) - schema: - type: int - default: 0 - - variable: 'amd.com/gpu' - label: Add AMD GPUs - schema: - type: int - default: 0 - - variable: requests - label: "Minimum Resources Required (request)" - schema: - additional_attrs: true - type: dict - hidden: true - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 10m - hidden: true - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: "RAM" - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 50Mi - hidden: true - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: deviceList - label: Mount USB Devices - group: Devices - schema: - type: list - default: [] - items: - - variable: deviceListEntry - label: Device - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Storage - schema: - type: boolean - default: true - - variable: type - label: (Advanced) Type of Storage - description: Sets the persistence type - schema: - type: string - default: device - hidden: true - - variable: readOnly - label: readOnly - schema: - type: boolean - default: false - - variable: hostPath - label: Host Device Path - description: Path to the device on the host system - schema: - type: path - - variable: mountPath - label: Container Device Path - description: Path inside the container the device is mounted - schema: - type: string - default: "/dev/ttyACM0" - - - variable: metrics - group: Metrics - label: Prometheus Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: Main Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - - variable: prometheusRule - label: PrometheusRule - description: Enable and configure Prometheus Rules for the App. - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - # TODO: Rule List section - -# - variable: horizontalPodAutoscaler -# group: Experimental -# label: (Advanced) Horizontal Pod Autoscaler -# schema: -# type: list -# default: [] -# items: -# - variable: hpaEntry -# label: HPA Entry -# schema: -# additional_attrs: true -# type: dict -# attrs: -# - variable: name -# label: Name -# schema: -# type: string -# required: true -# default: "" -# - variable: enabled -# label: Enabled -# schema: -# type: boolean -# default: false -# show_subquestions_if: true -# subquestions: -# - variable: target -# label: Target -# description: Deployment name, Defaults to Main Deployment -# schema: -# type: string -# default: "" -# - variable: minReplicas -# label: Minimum Replicas -# schema: -# type: int -# default: 1 -# - variable: maxReplicas -# label: Maximum Replicas -# schema: -# type: int -# default: 5 -# - variable: targetCPUUtilizationPercentage -# label: Target CPU Utilization Percentage -# schema: -# type: int -# default: 80 -# - variable: targetMemoryUtilizationPercentage -# label: Target Memory Utilization Percentage -# schema: -# type: int -# default: 80 - - variable: networkPolicy - group: Experimental - label: (Advanced) Network Policy - schema: - type: list - default: [] - items: - - variable: netPolicyEntry - label: Network Policy Entry - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - default: "" - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: policyType - label: Policy Type - schema: - type: string - default: "" - enum: - - value: "" - description: Default - - value: ingress - description: Ingress - - value: egress - description: Egress - - value: ingress-egress - description: Ingress and Egress - - variable: egress - label: Egress - schema: - type: list - default: [] - items: - - variable: egressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: to - label: To - schema: - type: list - default: [] - items: - - variable: toEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - variable: ingress - label: Ingress - schema: - type: list - default: [] - items: - - variable: ingressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: from - label: From - schema: - type: list - default: [] - items: - - variable: fromEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - - variable: addons - group: Addons - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: codeserver - label: Codeserver - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: service - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: NodePort - description: Deprecated CHANGE THIS - - value: ClusterIP - description: ClusterIP - - value: LoadBalancer - description: LoadBalancer - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: codeserver - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - default: 36107 - - variable: ingress - label: "Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - variable: scaleCert - label: 'Use TrueNAS SCALE Certificate (Deprecated)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: int - $ref: - - "definitions/certificate" - - variable: envList - label: Codeserver Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: netshoot - label: Netshoot - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: envList - label: Netshoot Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: vpn - label: VPN - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Type - schema: - type: string - default: disabled - enum: - - value: disabled - description: disabled - - value: gluetun - description: Gluetun - - value: tailscale - description: Tailscale - - value: openvpn - description: OpenVPN (Deprecated) - - value: wireguard - description: Wireguard (Deprecated) - - variable: openvpn - label: OpenVPN Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "openvpn"]] - attrs: - - variable: username - label: Authentication Username (Optional) - description: Authentication Username, Optional - schema: - type: string - default: "" - - variable: password - label: Authentication Password - description: Authentication Credentials - schema: - type: string - show_if: [["username", "!=", ""]] - default: "" - required: true - - variable: tailscale - label: Tailscale Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "tailscale"]] - attrs: - - variable: authkey - label: Authentication Key - description: Provide an auth key to automatically authenticate the node as your user account. - schema: - type: string - private: true - default: "" - - variable: auth_once - label: Auth Once - description: Only attempt to log in if not already logged in. - schema: - type: boolean - default: true - - variable: accept_dns - label: Accept DNS - description: Accept DNS configuration from the admin console. - schema: - type: boolean - default: false - - variable: userspace - label: Userspace - description: Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device. - schema: - type: boolean - default: false - - variable: routes - label: Routes - description: Expose physical subnet routes to your entire Tailscale network. - schema: - type: string - default: "" - - variable: dest_ip - label: Destination IP - description: Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched. - schema: - type: string - default: "" - - variable: sock5_server - label: Sock5 Server - description: The address on which to listen for SOCKS5 proxying into the tailscale net. - schema: - type: string - default: "" - - variable: outbound_http_proxy_listen - label: Outbound HTTP Proxy Listen - description: The address on which to listen for HTTP proxying into the tailscale net. - schema: - type: string - default: "" - - variable: extra_args - label: Extra Args - description: Extra Args - schema: - type: string - default: "" - - variable: daemon_extra_args - label: Tailscale Daemon Extra Args - description: Tailscale Daemon Extra Args - schema: - type: string - default: "" - - variable: killSwitch - label: Enable Killswitch - schema: - type: boolean - show_if: [["type", "!=", "disabled"]] - default: true - - variable: excludedNetworks_IPv4 - label: Killswitch Excluded IPv4 networks - description: List of Killswitch Excluded IPv4 Addresses - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv4 - label: IPv4 Network - schema: - type: string - required: true - - variable: excludedNetworks_IPv6 - label: Killswitch Excluded IPv6 networks - description: "List of Killswitch Excluded IPv6 Addresses" - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv6 - label: IPv6 Network - schema: - type: string - required: true - - variable: configFile - label: VPN Config File Location - schema: - type: string - show_if: [["type", "!=", "disabled"]] - default: "" - - - variable: envList - label: VPN Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - max_length: 10240 - - - variable: docs - group: Documentation - label: Please read the documentation at https://truecharts.org - description: Please read the documentation at -
    https://truecharts.org - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDocs - label: I have checked the documentation - schema: - type: boolean - default: true - - variable: donateNag - group: Documentation - label: Please consider supporting TrueCharts, see https://truecharts.org/sponsor - description: Please consider supporting TrueCharts, see -
    https://truecharts.org/sponsor - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDonate - label: I have considered donating - schema: - type: boolean - default: true - hidden: true - diff --git a/incubator/TeslaMate/0.0.16/templates/NOTES.txt b/incubator/TeslaMate/0.0.16/templates/NOTES.txt deleted file mode 100644 index efcb74cb772..00000000000 --- a/incubator/TeslaMate/0.0.16/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/incubator/TeslaMate/0.0.16/templates/_configmap.tpl b/incubator/TeslaMate/0.0.16/templates/_configmap.tpl deleted file mode 100644 index 70d78d4d3fb..00000000000 --- a/incubator/TeslaMate/0.0.16/templates/_configmap.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{{/* Define the configmap */}} -{{- define "teslamate.configmaps" -}} -{{- $rootDir := "dashboards/" -}} -{{- $dirs := dict -}} -{{- range $path, $_ := .Files.Glob (printf "%s**/*.json" $rootDir) }} - {{- $pathElements := splitList "/" $path -}} - {{- $dirName := index $pathElements 1 }} - {{- $existingFiles := get $dirs $dirName | default list -}} - {{- $updatedFiles := append $existingFiles $path -}} - {{- $_ := set $dirs $dirName $updatedFiles }} -{{- end }} - -{{- range $dir, $files := $dirs }} -{{- range $files }} -{{- $fileName := lower (base .) }} -{{- $fileNameWithoutExt := trimSuffix ".json" $fileName }} -{{- $configMapKey := printf "%s-%s-%s" "dashboard" $dir $fileNameWithoutExt }} -{{ $configMapKey | quote }}: - enabled: true - annotations: - k8s-sidecar-target-directory: "TeslaMate" - labels: - grafana_dashboard: "1" - data: - {{ $fileName | quote }}: | -{{ $.Files.Get . | indent 6 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/incubator/TeslaMate/0.0.16/templates/_secrets.tpl b/incubator/TeslaMate/0.0.16/templates/_secrets.tpl deleted file mode 100644 index 5f1092a2032..00000000000 --- a/incubator/TeslaMate/0.0.16/templates/_secrets.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Define the secrets */}} -{{- define "teslamate.secrets" -}} -{{- $secretName := (printf "%s-teslamate-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} - -{{- $encryptionKey := randAlphaNum 64 -}} - - {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} - {{- $encryptionKey = index .data "TESLAMATE_ENCRYPTION_KEY" | b64dec -}} - {{- end }} -enabled: true -data: - TESLAMATE_ENCRYPTION_KEY: {{ $encryptionKey }} -{{- end -}} diff --git a/incubator/TeslaMate/0.0.16/templates/common.yaml b/incubator/TeslaMate/0.0.16/templates/common.yaml deleted file mode 100644 index cf915e29079..00000000000 --- a/incubator/TeslaMate/0.0.16/templates/common.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{/* Make sure all variables are set properly */}} -{{- include "tc.v1.common.loader.init" . -}} - -{{/* Render secrets for teslamate */}} -{{- $secrets := include "teslamate.secrets" . | fromYaml -}} -{{- if $secrets -}} - {{- $_ := set .Values.secret "teslamate-secrets" $secrets -}} -{{- end -}} - -{{/* Render configmaps for dashboards */}} -{{- $configmaps := include "teslamate.configmaps" . | fromYaml -}} -{{- if $configmaps -}} - {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} -{{- end -}} - -{{/* Render the templates */}} -{{- include "tc.v1.common.loader.apply" . -}} diff --git a/incubator/TeslaMate/0.0.16/values.yaml b/incubator/TeslaMate/0.0.16/values.yaml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/incubator/TeslaMate/1.0.3/.helmignore b/incubator/TeslaMate/1.0.3/.helmignore deleted file mode 100644 index feb7464da6f..00000000000 --- a/incubator/TeslaMate/1.0.3/.helmignore +++ /dev/null @@ -1,32 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -# OWNERS file for Kubernetes -OWNERS -# helm-docs templates -*.gotmpl -# docs folder -/docs -# icon -icon.png -icon.webp -icon-small.webp diff --git a/incubator/TeslaMate/1.0.3/CHANGELOG.md b/incubator/TeslaMate/1.0.3/CHANGELOG.md deleted file mode 100644 index 941abb8a218..00000000000 --- a/incubator/TeslaMate/1.0.3/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -*for the complete changelog, please refer to the website* - -**Important:** \ No newline at end of file diff --git a/incubator/TeslaMate/1.0.3/Chart.yaml b/incubator/TeslaMate/1.0.3/Chart.yaml deleted file mode 100644 index 474f1801596..00000000000 --- a/incubator/TeslaMate/1.0.3/Chart.yaml +++ /dev/null @@ -1,40 +0,0 @@ -annotations: - max_scale_version: 24.04.1 - min_scale_version: 24.04.0 - truecharts.org/SCALE-support: "true" - truecharts.org/category: metrics - truecharts.org/max_helm_version: "3.14" - truecharts.org/min_helm_version: "3.11" - truecharts.org/train: incubator -apiVersion: v2 -appVersion: 1.28.5 -dependencies: - - name: common - version: 22.0.3 - repository: oci://tccr.io/truecharts - condition: "" - alias: "" - tags: [] - import-values: [] -deprecated: false -description: A self-hosted data logger for your Tesla -home: https://truecharts.org/charts/incubator/TeslaMate -icon: https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp -keywords: - - analytics - - monitoring - - metrics - - logs -kubeVersion: ">=1.24.0-0" -maintainers: - - name: TrueCharts - email: info@truecharts.org - url: https://truecharts.org -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.3 diff --git a/incubator/TeslaMate/1.0.3/README.md b/incubator/TeslaMate/1.0.3/README.md deleted file mode 100644 index 26c9055c690..00000000000 --- a/incubator/TeslaMate/1.0.3/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: README ---- - -## General Info - -TrueCharts can be installed as both _normal_ Helm Charts or as TrueNAS SCALE Apps. -Both solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible - -For more information about this Chart, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incubator/TeslaMate) - -**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)** - -## Installation - -### Helm-Chart installation - -To install TrueCharts Helm charts using Helm, you can use our OCI Repository. - -`helm install mychart oci://tccr.io/truecharts/CHARTNAME` - -For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/ - - -### TrueNAS SCALE Apps - -For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the [quick-start guides for TrueNAS SCALE](https://truecharts.org/scale/guides/scale-intro). - -## Configuration Options - -To view the chart specific options, please view Values.yaml included in the chart. - -All our Charts use a shared "common" library chart that contains most of the templating and options. -For the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/ - -## Chart Specific Guides and information - -All our charts have dedicated documentation pages. -The documentation for this chart can be found here: -https://truecharts.org/charts/incubator/TeslaMate - -## Support - - -- See the [Website](https://truecharts.org) -- Check our [Discord](https://discord.gg/tVsPTHWTtr) -- Open a [issue](https://github.com/truecharts/charts/issues/new/choose) - ---- - -## Sponsor TrueCharts - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/general/sponsor) or contributing back to the project any way you can! - -_All Rights Reserved - The TrueCharts Project_ diff --git a/incubator/TeslaMate/1.0.3/app-changelog.md b/incubator/TeslaMate/1.0.3/app-changelog.md deleted file mode 100644 index f4d5f548d1c..00000000000 --- a/incubator/TeslaMate/1.0.3/app-changelog.md +++ /dev/null @@ -1,55 +0,0 @@ - - -## [teslamate-1.0.3]teslamate-1.0.3 (2024-04-30) - -### Chore - - - -- bump common - -- bump charts to ensure new icons are released - -- bump everything to release new doc pages - -- update groups html ([#21121](https://github.com/truecharts/charts/issues/21121)) - -- bump charts to release new docs to fix broken links - -- bump everything to regenerate readme's and site index - -- update ignored updates to v20.3.11[@dae6129](https://github.com/dae6129) by renovate ([#21059](https://github.com/truecharts/charts/issues/21059)) - -- update ignored updates to v20.3.10[@c2f262c](https://github.com/c2f262c) by renovate ([#21034](https://github.com/truecharts/charts/issues/21034)) - -- update ignored updates to v20.3.9[@370bb36](https://github.com/370bb36) by renovate ([#20917](https://github.com/truecharts/charts/issues/20917)) - -- update ignored updates to v20.3.8[@52f4118](https://github.com/52f4118) by renovate ([#20876](https://github.com/truecharts/charts/issues/20876)) - -- update ignored by renovate (patch) ([#21171](https://github.com/truecharts/charts/issues/21171)) - -- update ignored updates to v20.3.7[@8cf9fc9](https://github.com/8cf9fc9) by renovate ([#20777](https://github.com/truecharts/charts/issues/20777)) - -- update ignored updates to v20.3.6[@27edfed](https://github.com/27edfed) by renovate ([#20711](https://github.com/truecharts/charts/issues/20711)) - -### Chore - - - -- rework SCALE catagories/groups to match helm and remove deprecated charts ([#21111](https://github.com/truecharts/charts/issues/21111)) - -### Feat - - - -- Add VolSync support and move CNPG backup credentials on SCALE ([#21443](https://github.com/truecharts/charts/issues/21443)) - -### Fix - - - -- fixup all chart volsync/credentials settings - -- adapt for common cnpg/volsync pathing changes ([#21445](https://github.com/truecharts/charts/issues/21445)) - -- replace serviceexpert with externalinterfaces/networking-group in the SCALE GUI ([#21154](https://github.com/truecharts/charts/issues/21154)) \ No newline at end of file diff --git a/incubator/TeslaMate/1.0.3/app-readme.md b/incubator/TeslaMate/1.0.3/app-readme.md deleted file mode 100644 index eb228d07050..00000000000 --- a/incubator/TeslaMate/1.0.3/app-readme.md +++ /dev/null @@ -1,8 +0,0 @@ -A self-hosted data logger for your Tesla - -This App is supplied by TrueCharts, for more information visit the manual: [https://truecharts.org/charts/incubator/TeslaMate](https://truecharts.org/charts/incubator/TeslaMate) - ---- - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can! diff --git a/incubator/TeslaMate/1.0.3/charts/common-22.0.3.tgz b/incubator/TeslaMate/1.0.3/charts/common-22.0.3.tgz deleted file mode 100644 index d5b19af2e0b0a77746103b909e90c0fb4031cf5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97709 zcmV)sK$yQDiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0POvHbK5wwFb>b(`V=T7TN}@7$-2wdIoWy~+mrD#j;&)knLY15 zTV9BSB&;cdLx6HLnSA$O;Y#o-$(HS8R@|+LMFNdRqtWPYG#U<>&xwCY_=OeG&{X!r_pRSo4p?z%~q$={{b|f0GG@YQ3k^w8jo%( z-MR1Nfxb@|WSIDLPyqmj3{RlLX3@Bg$$~mfba?aguQx2LzyN6ZxJ9x{8R;5Tw%bL z0UBuZDhrKEt5t8*+m)B*>)o^7qvZbrdJ&>ev;dUK|7N4#?)B61zu#``>~gHWh8`CbmBou zFX0>kHiHb@W6uL)1R{!Dv9LhT1H(@zR6#g_KL1P>C=4SHxgbCx|1Lh;Ad^jUEI<&F zF#=rVif`iQjS#?GRAh9n;t)@^Az$iu1Hhb;syDhZRZTW`;zfMXJ0IrY z$d>@hknh--#xEs+VBut|UL(F@8DazrN4|-NB~@Yg=>&}M??@Nte-A*j(Rh!ug+HC# z#Dy0QD=o|+A3F}B6mTw)g9pV6@q3_@lp453(ET;U3|;w74vM_h44{R>jvoL^4L_bE z5;1DAfO?|=alOn()cghj`ze%YLq5RsdijL=$|M2CQBe0S0gGXUGRWLN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;gI2rvNHRC|ykt~^t_ zN3*j%1O+>20Myh36h%n%Wtlge+BADPP3eDHL(oF= z&(xYz>qzuWL{cSwn6v{9iI5U{p7!j%m(g_GRRXyjTQO16S@q(@|CHovxR_L*1!P0?qqvlk^l+BdU`}zSRM-ef9bRygvP5N9NP}_H*#V+nc|G%Uf`L^Y;78 z^NVxv_NsS!B~Z@kEx5cD8vfPk?d9!27kPUFzP-4)c=aPVzq~zreR}!k7M#9*4SqPi zxjDVMyS%ssr&s6T?CsV0<=y4mtJ|I4#eZGjT-@G*w>RMO&GqZci}M|Dd3E;syYtJd zZ@{x3F7Lj5``sOQefj3{?o^c7wyC}Sy7%Vd=Iql^ycpJ?7P>eH{klao9nl?7dznU?bYt()z>$dSKnN`xwyL95nT1|F7IAn40=6- zP|Au%s#(VL{z&Z#i;n*Hzy3d_Fcl{`dX;liV*@E-h>)sciW24I&Pi>hfig1RJX1=^1=R~^hG^@!H!Y_Nh{Qu2~i8sdK6Pl^k7k5 zblL>LlquRwZ()k&89`TSMFi!R?H=WxIi+M0B}Wua6k}ENLJSLP4$lMNAk@553xw*j zq+EuQsl4AP@hQ~ifCD)y2#fK337*02f>>(PQ{t8kjg-%4BrH713gUQ@5g|8IhZ~9n zLRDB;V_!9~9qeZVE-3F(ii{!H{XayvJiFfpIAw@(tt#JhF@jel6=OH(^$y(`X9J5t zulHgAu83S(YD?j&EUikksQ}IfAA`}?O4|N=b8&k9=3+33S5Zgf{V(7D&;G&Q=Kj}u zQho~ZTKVbk_5Sh~a0Mqq+1*BCG(o-IF3?w9Pos!TQ~t6Cz^)0W`x5+P>+5NfT)_$Y zhy3BKSPRVlzPsfTP 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total energy added" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tround(ceil(sum(charge_energy_added) / ('$aux'::json -> 'MaxCapacity')::text::numeric),0) AS \"Estimated charging cycles\"\nFROM charging_processes WHERE car_id = $car_id;", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data form the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Estimated charging cycles are based on the whole energy added to the battery. So the more data you logged the better. \n", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n round(('$aux'::json -> 'LastChargekWhAdded')::text::numeric,1) || ' kWh' as \"Last Energy added\",\n round(('$aux'::json -> 'LastMileageAdded')::text::numeric,1) || ' $length_unit' as \"Last Range added\"", - "refId": "LastChanging", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 6 - }, - "id": 34, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "hidden", - "placement": "bottom" - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Added", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\nSELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "kWh" - }, - "x": "odometer", - "y": "kWh" - }, - { - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km) * ('$aux'::json -> 'RatedEfficiency')::text::float / AVG(c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tGROUP BY 3", - "refId": "Median", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Battery Health - LFP", - "uid": "DuertWeceu", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/battery-health.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/battery-health.json deleted file mode 100644 index 9db33cbfcf4..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/battery-health.json +++ /dev/null @@ -1,1704 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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 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 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\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", - "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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health", - "uid": "jchmRiqUfXgTM", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charge-level.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/charge-level.json deleted file mode 100644 index 41af0d8bc8e..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charge-level.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100496202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Charge Level", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tbattery_level AS \"Battery Level\",\n\tusable_battery_level AS \"Usable Battery Level\"\nfrom positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n\tORDER BY Time ASC\n;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-7d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Level", - "uid": "WopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charges.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/charges.json deleted file mode 100644 index 46d4456da3c..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charges.json +++ /dev/null @@ -1,1335 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642763869363, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 8, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "decimals" - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n p.odometer as odometer\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n convert_km(odometer::numeric, '$length_unit') AS odometer_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND max_charger_voltage >= '$voltage'\n AND duration_min >= '$min_duration_min'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", charge_energy_added\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy added", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", greatest(charge_energy_added, charge_energy_used)\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 13, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", cost\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost", - "transparent": true, - "type": "stat" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min duration (minutes) here", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min voltage here", - "name": "voltage", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charges", - "uid": "TSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats-lfp.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats-lfp.json deleted file mode 100644 index 90364ab8931..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats-lfp.json +++ /dev/null @@ -1,1900 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats - LFP", - "uid": "UcjFKmUtpt", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats.json deleted file mode 100644 index 3b176f386ad..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/charging-stats.json +++ /dev/null @@ -1,1920 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 91 - } - ] - } - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats", - "uid": "-pkIkhmRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/drive-stats.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/drive-stats.json deleted file mode 100644 index ce134792864..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/drive-stats.json +++ /dev/null @@ -1,1148 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1644505954964, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 20, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date_trunc('day', start_date) as \"time\",\n count(*)\nFROM drives\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nGROUP BY 1\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Number of drives", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 16, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', date)::date AS date,\n\t\tmax(odometer) - min(odometer) AS distance\n\tFROM positions\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since) , now(), '1 day'::interval) dd\n)\nSELECT \n $__time(base_line.date), \n convert_km(COALESCE(distance, 0)::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM base_line\nLEFT JOIN actual ON actual.date = base_line.date\nWHERE $__timeFilter(base_line.date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "$length_unit driven", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 22, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(start_date),\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency AS energy\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "kWh used", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 26, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM drives\nWHERE car_id = $car_id AND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance of a drive", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 5 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(distance) AS distance\n\tFROM drives\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.distance, 0) as distance\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') AS \"distance_$length_unit\"\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance driven per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 5 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency) AS energy\n\tFROM drives\n\tJOIN cars car ON car.id = car_id\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.energy, 0) as energy\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY energy) AS energy\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average kWh used per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 32, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km((((SELECT odometer FROM last_position) - (SELECT odometer\tFROM first_position)) /\n\tEXTRACT(days FROM (SELECT date FROM last_position) - (SELECT date\tFROM first_position)) * \n\t(365/12))::numeric, '$length_unit') AS \"mileage_$length_unit\";", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated monthly mileage", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 30, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km(((lp.odometer - fp.odometer) /\n\tEXTRACT(days FROM lp.date - fp.date) * \n\t365)::numeric, '$length_unit') AS \"mileage_$length_unit\" from first_position as fp, last_position as lp;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated annual mileage", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "displayName": "$__cell_0", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 24, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:3]), ', ')) as name,\n\tcount(*) AS visited\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE t.car_id = $car_id AND $__timeFilter(t.start_date)\nGROUP BY 1\nORDER BY visited DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top Destinations", - "type": "bargauge" - } - ], - "refresh": false, - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Stats", - "uid": "_7WkNSyWk", - "version": 1 -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/drives.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/drives.json deleted file mode 100644 index 8113735f987..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/drives.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642770916740, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kWh" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FFA6B0", - "value": null - }, - { - "color": "#FFCB7D", - "value": 0.65 - }, - { - "color": "#C8F2C2", - "value": 0.99 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/(start|end)_path/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_str" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": "❄" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "color": "transparent", - "index": 1, - "text": "." - }, - "true": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 5 - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated consumption may be incorrect and is therefore sometimes hidden.", - "url": "" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n case when (start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level) = true then true else false end as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed,\n power_max\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 $__timeFilter(start_date) AND drives.car_id = $car_id AND convert_km(distance::numeric, '$length_unit') >= $min_dist AND convert_km(distance::numeric, '$length_unit') / NULLIF(duration_min, 0) * 60 >= $min_speed\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_$temp_unit,\n convert_km(avg_speed::numeric, '$length_unit') AS speed_avg_$length_unit,\n power_max,\n reduced_range as has_reduced_range,\n range_diff * car_efficiency as \"consumption_kWh\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit,\n CASE WHEN is_sufficiently_precise THEN distance / range_diff\n ELSE NULL\n END AS efficiency\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Drive", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min distance here", - "name": "min_dist", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min speed here", - "name": "min_speed", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives", - "uid": "Y8upc6ZRk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/efficiency.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/efficiency.json deleted file mode 100644 index 3a2b3439a65..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/efficiency.json +++ /dev/null @@ -1,1227 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1598013087999, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 4, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (net)", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 6, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "max", - "value": 1.15 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 200 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Temperature" - } - ] - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH t AS (\n\tSELECT\n\t CASE WHEN '$temp_unit' = 'C' THEN ROUND(cast(outside_temp_avg AS numeric) / 5, 0) * 5 \n\t\t\t WHEN '$temp_unit' = 'F' THEN ROUND(cast(convert_celsius(outside_temp_avg, '$temp_unit') AS numeric) / 10, 0) * 10\n\t\tEND AS outside_temp,\n\t\tsum(start_ideal_range_km - end_ideal_range_km) AS total_ideal_range,\n\t\tsum(start_rated_range_km - end_rated_range_km) AS total_rated_range,\n\t\tsum(distance) AS total_distance,\n\t\tsum(duration_min) as duration,\n\t\tcar_id\n\tFROM\n\t\tdrives\n\tWHERE\n\t\tdistance IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND convert_km(distance::numeric, '$length_unit') >= $min_distance \n\t\tAND start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km > 0.1\n\tGROUP BY\n\t\t1,\n\t\tcar_id\n)\n\nSELECT\n\toutside_temp as outside_temp_$temp_unit,\n total_distance / total_[[preferred_range]]_range AS efficiency,\n\ttotal_[[preferred_range]]_range / total_distance * c.efficiency * 1000 * \n CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END AS consumption_$length_unit,\n convert_km(total_distance::numeric, '$length_unit') as total_distance_$length_unit,\n\t(total_distance / duration) * 60 / (CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END) avg_speed_$length_unit\nFROM\n\tt\nJOIN cars c ON t.car_id = c.id\nWHERE outside_temp IS NOT NULL\norder by 1 desc\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature – Efficiency", - "type": "table" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 2, - "x": 0, - "y": 16 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 2, - "y": 16 - }, - "id": 12, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_ideal_range_km - start_ideal_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n count(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_ideal_range_km IS NOT NULL\n AND end_ideal_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived ideal efficiencies", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "Efficiency" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 13, - "y": 16 - }, - "id": 15, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n\tcount(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_rated_range_km IS NOT NULL\n AND end_rated_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived rated efficiencies", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "1", - "value": "1" - }, - "hide": 0, - "includeAll": false, - "label": "min. distance per drive", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": true, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - } - ], - "query": "1, 5, 10, 25, 50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Efficiency", - "uid": "fu4SiQgWz", - "version": 1 -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/charge-details.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/charge-details.json deleted file mode 100644 index 8706c5e162b..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/charge-details.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656106965302, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 100, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charger_voltage" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "displayName", - "value": "Charging Voltage" - }, - { - "id": "unit", - "value": "volt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^range_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_pilot_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current (pilot)" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^outside_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Outdoor Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_phases" - }, - "properties": [ - { - "id": "displayName", - "value": "Phases" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 17, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n battery_level,\n charger_power,\n (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as battery_heater,\n convert_km([[preferred_range]]_battery_range_km, '$length_unit') as range_$length_unit,\n charger_voltage,\n (case when charger_phases = 2 then 3 when charger_phases = 1 then 1 else 0 end) as charger_phases,\n charger_actual_current,\n charger_pilot_current,\n convert_celsius(outside_temp, '$temp_unit') outside_temp_$temp_unit\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Details", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "Added", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 17, - "y": 0 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select coalesce(cp.charge_energy_added, c.charge_energy_added)\r\nfrom charging_processes cp\r\njoin charges c\r\n\ton cp.id = c.charging_process_id\r\nwhere car_id = $car_id\r\nAND cp.id = $charging_process_id\r\nORDER BY c.date desc\r\nfetch first row only", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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": 3, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 6, - "links": [ - { - "title": "Set cost", - "url": "[[base_url:raw]]/charge-cost/${charging_process_id}" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT cost from charging_processes where id = $charging_process_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 7, - "x": 17, - "y": 3 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses ON addresses.id = c.address_id\n\tLEFT JOIN geofences g ON g.id = geofence_id\nWHERE\n\tc.id = $charging_process_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 15, - "w": 7, - "x": 17, - "y": 5 - }, - "id": 4, - "links": [], - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "fixed": "dark-blue" - }, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 7, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "filterData": { - "id": "byRefId", - "options": "A" - }, - "location": { - "latitude": "latitude", - "longitude": "longitude", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tunnest(ARRAY[latitude, latitude]) AS latitude,\n\tunnest(ARRAY[longitude, longitude]) AS longitude\nFROM\n\tcharging_processes c\n\tJOIN positions p ON c.position_id = p.id\nWHERE\n\t$__timeFilter(date)\n\tAND c.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 11, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": {}, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "fixed": "blue" - }, - "x": "avg SOC [%]", - "y": "avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"SOC [%]\",\n charger_power as \"Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"avg SOC [%]\",\n avg(charger_power) as \"avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nGROUP BY\n battery_level, fast_charger_present\nORDER BY\n battery_level ASC ", - "refId": "B", - "select": [ - [ - { - "params": ["odometer"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging curve", - "type": "xychart" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "label": "", - "name": "charging_process_id", - "options": [ - { - "selected": false, - "text": "NULL", - "value": "NULL" - } - ], - "query": "NULL", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Details", - "uid": "BHhxFeZRz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/drive-details.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/drive-details.json deleted file mode 100644 index b0b8f9a01c5..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/internal/drive-details.json +++ /dev/null @@ -1,2059 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:31", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658136653681, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "icon": "", - "tags": [], - "title": "GpxExport", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]/drive/$drive_id/gpx" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_kmh$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mph$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "speed_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "left" - }, - { - "id": "displayName", - "value": "Power" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "usable_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "usable SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_estimated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (est.)" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_km(speed::numeric, '$length_unit') AS speed_[[length_unit]]h,\n\tpower,\n\tbattery_heater::integer,\n\tconvert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range_[[preferred_range]]_[[length_unit]],\n\tconvert_km(est_battery_range_km, '$length_unit') AS range_estimated_[[length_unit]],\n\tbattery_level,\n\tusable_battery_level\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Distance", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT ${__to:date:seconds} - ${__from:date:seconds}", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Selected duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 2 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "displayName": "Consumption", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 200 - }, - { - "color": "red", - "value": 250 - } - ] - }, - "unit": "none" - }, - "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": 2, - "w": 6, - "x": 18, - "y": 2 - }, - "id": 18, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 27, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 4, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Map", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": ["logmin", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n $__time(date),\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS tpms_pressure_front_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS tpms_pressure_front_right_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS tpms_pressure_rear_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS tpms_pressure_rear_right_$pressure_unit\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "pos", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "feet" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tROUND(convert_m(elevation, '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "rgb(210, 203, 203)", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#96D98D", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "outside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#8AB8FF", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Outside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "inside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2CC0C", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Inside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "driver_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Driver Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "passenger_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Passenger Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Climate" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "displayName", - "value": "Fan status" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(outside_temp, '$temp_unit') AS outside_temp_$temp_unit,\n\tconvert_celsius(inside_temp, '$temp_unit') AS inside_temp_$temp_unit,\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as driver_temp_$temp_unit,\n\tconvert_celsius(passenger_temp_setting, '$temp_unit') as passenger_temp_$temp_unit,\n is_climate_on::integer,\n\tfan_status\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Temperatures", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 12, - "y": 31 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT CONCAT_WS(' - ', round(convert_km(start_km::numeric, '$length_unit')), round(convert_km(end_km::numeric, '$length_unit'))) ||' $length_unit' as \"Odometer\"\nFROM drives d\nWHERE d.id = $drive_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 0, - "y": 39 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "targets": [ - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\nORDER BY\n\tdate ASC\n\t)\n\t\n\nselect convert_m(sum(diff), '$alternative_length_unit') || ' $alternative_length_unit' as \"UP\" from height where diff > 0", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation Summary", - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "name": "drive_id", - "options": [ - { - "selected": true, - "text": "NULL", - "value": "NULL" - } - ], - "query": "3217", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1", - "value": "1" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "bar", - "value": "bar" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Details", - "uid": "zm7wN6Zgz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate/reports/dutch-tax.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate/reports/dutch-tax.json deleted file mode 100644 index b242b5da143..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate/reports/dutch-tax.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1602596446244, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "ID" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ts" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "start_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "Start Odometer" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "end_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "End Odometer" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "End Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start|end)_address" - }, - "properties": [ - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Address" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "End Address" - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start Time" - } - ] - }, - "pluginVersion": "7.2.2", - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "alias": "", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.id as drive_id,\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n start_km,\n end_km,\n CONCAT_WS(', ', CONCAT_WS(' ', start_address.road, start_address.house_number), start_address.city) AS start_address,\n CONCAT_WS(', ', CONCAT_WS(' ', end_address.road, end_address.house_number), end_address.city) AS end_address,\n duration_min,\n distance\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 cars car ON car.id = drives.car_id\n WHERE $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY drive_id DESC\n)\nSELECT\n drive_id,\n start_date_ts,\n convert_km(start_km::numeric, '$length_unit') as start_$length_unit,\n start_address,\n end_date_ts,\n convert_km(end_km::numeric, '$length_unit') as end_$length_unit,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "rated", - "value": "rated" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "value": null - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/y", - "to": "now/y" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives - Dutch tax", - "uid": "lBIoQIggk", - "version": 1 -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/locations.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/locations.json deleted file mode 100644 index 05c61277df3..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/locations.json +++ /dev/null @@ -1,1120 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642771806943, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select count(*) from addresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total addresses", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 20, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT city)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 14, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT state)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 0 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT country)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Countries", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - }, - { - "color": "super-light-green", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcity,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tcity IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - }, - { - "color": "super-light-orange", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 3 - }, - "id": 14, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tstate,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tstate IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "City" - }, - "properties": [ - { - "id": "custom.width" - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 22, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n max(end_date) as \"Date\",\n count(*) as visited,\n COALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:2]), ', ')) AS \"Address\",\n\tCOALESCE(city, neighbourhood) as \"City\"\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE a.display_name ilike '%$address_filter%' or g.name ilike '%$address_filter%'\nGROUP BY 3,4\nORDER BY visited DESC\nLIMIT 100", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last visited", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "visited": true - }, - "indexByName": {}, - "renameByName": {} - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "updated_at" - }, - "properties": [ - { - "id": "displayName", - "value": "Updated at" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "neighbourhood" - }, - "properties": [ - { - "id": "displayName", - "value": "Neighbourhood" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "city" - }, - "properties": [ - { - "id": "displayName", - "value": "City" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "state" - }, - "properties": [ - { - "id": "displayName", - "value": "State" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "country" - }, - "properties": [ - { - "id": "displayName", - "value": "Country" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 18, - "x": 0, - "y": 22 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n CONCAT('new?lat=', latitude, '&lng=', longitude) as path,\n\tCOALESCE(name, CONCAT(road, ' ', house_number)) AS name,\n\tneighbourhood,\n\tcity,\n\tstate,\n\tcountry\nFROM addresses\nWHERE display_name ilike '%$address_filter%'\nORDER BY inserted_at DESC\nLIMIT 100;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Addresses", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "displayName", - "value": "Time" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.id.numeric:raw}/edit" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 6, - "x": 18, - "y": 22 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id, name \nFROM geofences \nORDER BY inserted_at DESC\nLIMIT 512;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Geo-fences", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 1, - "includeAll": true, - "label": "Car", - "multi": true, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Address", - "name": "address_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Locations", - "uid": "ZzhF-aRWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/mileage.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/mileage.json deleted file mode 100644 index 16b27614c75..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/mileage.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100778202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "mileage_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Mileage" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH o AS (SELECT\n start_date AS time,\n car_id,\n start_km AS \"odometer\"\nFROM drives\nUNION ALL\nSELECT\n end_date,\n car_id,\n end_km AS \"odometer\"\nFROM drives)\n\nSELECT\n time, \n convert_km(odometer::numeric, '$length_unit') as mileage_$length_unit\nFROM o\nWHERE\n\tcar_id = $car_id AND\n\t$__timeFilter(time)\norder by 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage", - "uid": "NjtMTFggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview-lfp.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview-lfp.json deleted file mode 100644 index 2c5f42578b5..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview-lfp.json +++ /dev/null @@ -1,1631 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 170, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Drive details", - "url": "/d/zm7wN6Zgz/drive-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Details", - "url": "/d/BHhxFeZRz/charge-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview - LFP", - "uid": "EVzVGnwSq", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview.json deleted file mode 100644 index 0848c5211d5..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/overview.json +++ /dev/null @@ -1,1640 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Charge Level", - "url": "/d/WopVO_mgz/charge-level?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Stats", - "url": "/d/-pkIkhmRz/charging-stats?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "targetBlank": true, - "title": "States", - "url": "/d/xo4BNRkZz/states?orgId=1&${__url_time_range}" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview", - "uid": "kOuP_Fggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/projected-range.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/projected-range.json deleted file mode 100644 index e2032ed2dd9..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/projected-range.json +++ /dev/null @@ -1,772 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - }, - { - "datasource": "TeslaMate", - "enable": false, - "hide": false, - "iconColor": "rgba(255, 96, 96, 1)", - "limit": 100, - "name": "Charged", - "rawQuery": "SELECT\n$__time(start_date),\nend_date as timeend,\nconcat('Charged: ',round(cast(charge_energy_added as numeric),2),' kWh') AS text\nFROM charging_processes\nWHERE\n$__timeFilter(start_date) AND duration_min > 5\nORDER BY start_date DESC", - "showIn": 0, - "tags": [], - "type": "tags" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Mileage.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Mileage" - }, - { - "id": "min" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, [[interval]]) AS time,\n\tconvert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') AS \"Projected [[preferred_range]] range [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nhaving convert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') is not null\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(avg(odometer)::numeric, '$length_unit') AS \"Mileage [$length_unit]\"\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Mileage", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Battery.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "max", - "value": 100 - }, - { - "id": "custom.axisLabel", - "value": "Battery Level" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level)[$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n\t$__timeGroup(date,[[interval]]) AS time,\n avg(battery_level) AS \"Battery Level [%]\", avg(coalesce(usable_battery_level, battery_level)) as \"Usable Battery Level [%]\"\nfrom\n (SELECT\n battery_level, usable_battery_level\n , date\n FROM\n positions\n WHERE\n car_id = $car_id AND\n $__timeFilter(date) and ideal_battery_range_km is not null\n UNION ALL\n select\n battery_level, null as usable_battery_level\n , date\n from charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id) as data\n\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Battery Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Temp.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Temp" - }, - { - "id": "min" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using usable_battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#56A64B", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C8F2C2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 43 - }, - "id": 5, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level) [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tavg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor Temperature [°$temp_unit]\"\n\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Outdoor Temp", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 36, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "6h", - "value": "6h" - }, - "hide": 1, - "label": "Time Resolution", - "name": "interval", - "options": [ - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "15m", - "value": "15m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "3h", - "value": "3h" - }, - { - "selected": true, - "text": "6h", - "value": "6h" - } - ], - "query": "5m,15m,30m,1h,3h,6h", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Projected Range", - "uid": "riqUfXgRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/states.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/states.json deleted file mode 100644 index 95e38b0635c..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/states.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642780620514, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsLocal" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "based on any data ever recorded.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select 1 - sum(duration_min) / (EXTRACT(EPOCH FROM (max(end_date) - min(start_date))) / 60), 1 as time from drives where car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "parked (%)", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0 - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 14, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-2d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "States", - "uid": "xo4BNRkZz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/statistics.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/statistics.json deleted file mode 100644 index d3dd8f2d54e..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/statistics.json +++ /dev/null @@ -1,971 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642773094879, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 195 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy charged" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg cost per kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "maxPerRow": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "format": "table", - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "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", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "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", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "per ${period}", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_kwh", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_consumption_kwh" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_km", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_mi", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": false, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_cost_km": 19, - "avg_cost_mi": 20, - "avg_cost_kwh": 11, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 17, - "date_to": 18, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 15, - "efficiency_charged_net_mi": 16, - "efficiency_net_km": 13, - "efficiency_net_mi": 14, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_cost_km": "Avg cost per km", - "avg_cost_mi": "Avg cost per mi", - "avg_cost_kwh": "Avg cost per kWh", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - }, - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - } - ], - "query": "day,week,month,year", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "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" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "browser", - "title": "Statistics", - "uid": "1EZnXszMk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/timeline.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/timeline.json deleted file mode 100644 index 7c19e598087..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/timeline.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642862616523, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["tesla"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.start_date_ts}&to=${__data.fields.end_date_ts}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC Diff" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 152 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Duration" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Start Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_f/" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/odometer_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/distance_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_diff_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range Diff" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/outside_temp_avg_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/end_range_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Range" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Slot details", - "url": "${__data.fields.slotlink:raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "slotlink" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 22, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🚗 Driving' AS \"Action\",\r\n drives.duration_min AS \"Duration\",\r\n CASE WHEN start_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(start_geofence_id, '/edit')\r\n END AS start_path,\r\n CASE WHEN end_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(end_geofence_id, '/edit')\r\n END AS end_path,\r\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\",\r\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\",\r\n convert_km(end_km::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n convert_km(distance::NUMERIC, '$length_unit') AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n TP2.battery_level AS \"SoC\",\r\n TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/zm7wN6Zgz/drive-details?from=', ROUND(EXTRACT(EPOCH FROM start_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date))*1000, '&var-car_id=', drives.car_id, '&var-drive_id=', drives.id) AS slotlink\r\nFROM drives\r\n LEFT OUTER JOIN positions AS TP1 on drives.start_position_id = TP1.id\r\n LEFT OUTER JOIN positions AS TP2 on drives.end_position_id = TP2.id\r\n LEFT JOIN addresses start_address ON start_address_id = start_address.id\r\n LEFT JOIN addresses end_address ON end_address_id = end_address.id\r\n LEFT JOIN geofences start_geofence ON start_geofence_id = start_geofence.id\r\n LEFT JOIN geofences end_geofence ON end_geofence_id = end_geofence.id\r\n JOIN cars ON cars.id = drives.car_id\r\nWHERE \r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND '🚗 Driving' in ($action_filter)\r\n AND\r\n (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%' or\r\n COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city))::TEXT like '%$text_filter%')\r\n\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🔋 Charging' AS \"Action\",\r\n charging_processes.duration_min AS \"Duration\",\r\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', address.latitude, '&lng=', address.longitude)\r\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n charging_processes.charge_energy_added AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit, \r\n end_battery_level AS \"SoC\",\r\n end_battery_level - start_battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/BHhxFeZRz/charge-details?from=', ROUND(EXTRACT(EPOCH FROM start_date)-10)*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date)+10)*1000, '&var-car_id=', charging_processes.car_id, '&var-charging_process_id=', charging_processes.id) AS slotlink\r\nFROM charging_processes\r\n INNER JOIN positions AS position ON position_id = position.id\r\n LEFT JOIN addresses address ON address_id = address.id\r\n LEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n $__timeFilter(charging_processes.start_date)\r\n AND charging_processes.charge_energy_added > 0\r\n AND charging_processes.car_id = $car_id\r\n AND '🔋 Charging' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nUNION\r\nSELECT\r\n d.end_date AS \"Start\",\r\n LEAD(d.start_date) over w AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM d.end_date)) * 1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000 AS end_date_ts,\r\n '🅿️ Parking' AS \"Action\",\r\n EXTRACT(EPOCH FROM LEAD(d.start_date) over w - d.end_date)/60 AS \"Duration\",\r\n CASE WHEN d.end_geofence_id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\r\n WHEN d.end_geofence_id IS NOT NULL THEN CONCAT(d.end_geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(end_position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(LEAD(d.start_[[preferred_range]]_range_km) over w::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n LEAD(start_position.battery_level) over w AS \"SoC\",\r\n LEAD(start_position.battery_level) over w - end_position.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/FkUpJpQZk/trip?from=', ROUND(EXTRACT(EPOCH FROM d.end_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000, '&var-car_id=', d.car_id) AS slotlink\r\nFROM\r\n drives AS d\r\n LEFT OUTER JOIN positions start_position on d.start_position_id = start_position.id\r\n LEFT OUTER JOIN positions end_position on d.end_position_id = end_position.id\r\n LEFT JOIN addresses address ON d.end_address_id = address.id\r\n LEFT JOIN geofences geofence ON d.end_geofence_id = geofence.id\r\n JOIN cars ON cars.id = d.car_id\r\nWHERE\r\n $__timeFilter(d.end_date)\r\n AND d.car_id=$car_id\r\n AND '🅿️ Parking' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nWINDOW w as (ORDER BY d.id ASC)\r\n\r\nUNION\r\nSELECT\r\n\tT1.end_date +(1 * interval '1 second') AS \"Start\", -- added 1 sec to get it after the corresponding Parking row\r\n\tT2.start_date AS \"End\",\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS start_date_ts,\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS end_date_ts,\r\n\t'❓ Missing' AS \"Action\",\r\n\t-- EXTRACT(EPOCH FROM T2.start_date - T1.end_date)/60 AS \"Duration\",\r\n\tNULL AS \"Duration\",\r\n\tCASE WHEN T1.end_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n\t\tWHEN T1.end_geofence_id IS NOT NULL THEN CONCAT(T1.end_geofence_id, '/edit')\r\n\tEND AS start_path,\r\n\tCASE WHEN T2.start_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n\t\tWHEN T2.start_geofence_id IS NOT NULL THEN CONCAT(T2.start_geofence_id, '/edit')\r\n\tEND AS end_path,\r\n\tCOALESCE(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\",\r\n\tCOALESCE(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\",\r\n\tconvert_km(TP2.odometer::INTEGER, '$length_unit') AS odometer_$length_unit,\r\n\tconvert_km((TP2.odometer - TP1.odometer)::INTEGER, '$length_unit') AS distance_$length_unit,\r\n convert_km(T2.end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit')::INTEGER * efficiency AS \"kWh\",\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit') AS range_diff_$length_unit,\r\n\tNULL AS \"SoC\",\r\n\tNULL AS \"SoC Diff\",\r\n\tNULL AS outside_temp_avg_$temp_unit,\r\n\tNULL AS slotlink\r\n\t-- TP2.battery_level AS \"SoC\",\r\n\t-- TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n\t-- (T1.outside_temp_avg+T2.outside_temp_avg)/2 AS outside_temp_avg_$temp_unit\r\nFROM\r\n\t(SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives) AS T1\r\n\tLEFT OUTER JOIN (SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives ) AS T2 on T1.time_id + 1 = T2.time_id\r\n\tLEFT OUTER JOIN positions AS TP1 on T1.end_position_id = TP1.id\r\n\tLEFT OUTER JOIN positions AS TP2 on T2.start_position_id = TP2.id\r\n\tLEFT JOIN addresses start_address ON T1.end_address_id = start_address.id\r\n\tLEFT JOIN addresses end_address ON T2.start_address_id = end_address.id\r\n\tLEFT JOIN geofences start_geofence ON T1.end_geofence_id = start_geofence.id\r\n\tLEFT JOIN geofences end_geofence ON T2.start_geofence_id = end_geofence.id\r\n\tJOIN cars ON cars.id = T2.car_id\r\nWHERE\r\n\t$__timeFilter(T1.end_date)\r\n\tAND T1.car_id=$car_id \r\n\tAND T2.car_id=$car_id \r\n\tAND TP2.car_id=$car_id \r\n\tAND TP1.car_id=$car_id \r\n\tAND TP2.odometer - TP1.odometer > 0.5\r\n\tAND T1.end_address_id <> T2.start_address_id AND ((T1.end_geofence_id IS NOT NULL OR T2.end_geofence_id IS NOT NULL) OR T1.end_geofence_id <> T2.start_geofence_id)\r\n\tAND '❓ Missing' in ($action_filter)\r\n\tAND (\r\n\t (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%') or\r\n\t (COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city)))::TEXT like '%$text_filter%')\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts, \r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts, \r\n '💾 Updating' AS \"Action\",\r\n\tEXTRACT(EPOCH FROM end_date - start_date)/60 AS \"Duration\",\r\n NULL AS start_path,\r\n NULL AS end_path,\r\n version AS \"Start Address\",\r\n '' AS \"End Address\",\r\n NULL AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n NULL AS end_range_$length_unit,\r\n NULL AS \"kWh\",\r\n NULL AS range_diff_$length_unit,\r\n NULL AS \"SoC\",\r\n NULL AS \"SoC Diff\",\r\n NULL AS outside_temp_avg_$temp_unit,\r\n CONCAT('https://www.notateslaapp.com/software-updates/version/', split_part(version, ' ', 1), '/release-notes') AS slotlink\r\nFROM updates\r\nWHERE \r\n $__timeFilter(start_date)\r\n AND car_id = $car_id \r\n AND '💾 Updating' in ($action_filter)\r\n AND version::TEXT like '%$text_filter%'\r\n\r\nORDER BY \"Start\" DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "candata", - "timeColumn": "datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "End": true, - "start_date_ts": false - }, - "indexByName": { - "Action": 2, - "Duration": 7, - "End": 1, - "End Address": 4, - "SoC": 15, - "SoC Diff": 16, - "Start": 0, - "Start Address": 3, - "distance_km": 8, - "distance_mi": 9, - "end_date_ts": 22, - "end_path": 20, - "end_range_km": 10, - "end_range_mi": 11, - "kWh": 13, - "odometer_km": 5, - "odometer_mi": 6, - "outside_temp_avg_c": 17, - "outside_temp_avg_f": 18, - "range_diff_km": 12, - "range_diff_mi": 13, - "start_date_ts": 21, - "start_path": 19 - }, - "renameByName": { - "action": "", - "end_address": "End", - "km_diff": "Km", - "kwh": "", - "minutediff": "Time", - "odometer": "", - "outside_temp_avg": "Temperature", - "rangediff": "Range Difference", - "soc": "", - "soc_diff": "SoC Difference", - "start_address": "Start", - "start_date": "Date", - "start_date_ts": "" - } - } - } - ], - "type": "table" - } - ], - "refresh": "1h", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Action", - "multi": true, - "name": "action_filter", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "🚗 Driving", - "value": "🚗 Driving" - }, - { - "selected": false, - "text": "🔋 Charging", - "value": "🔋 Charging" - }, - { - "selected": false, - "text": "🅿️ Parking", - "value": "🅿️ Parking" - }, - { - "selected": false, - "text": "❓ Missing", - "value": "❓ Missing" - }, - { - "selected": false, - "text": "💾 Updating", - "value": "💾 Updating" - } - ], - "query": "🚗 Driving,🔋 Charging,🅿️ Parking,❓ Missing,💾 Updating", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Text Filter", - "name": "text_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-14d", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Timeline", - "uid": "SUBgwtigz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/trip.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/trip.json deleted file mode 100644 index e057c567268..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/trip.json +++ /dev/null @@ -1,2643 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:30", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656104359102, - "links": [ - { - "icon": "doc", - "tags": [], - "targetBlank": true, - "title": "Select last three drives", - "type": "link", - "url": "/d/FkUpJpQZk?from=$from" - }, - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 13, - "x": 0, - "y": 1 - }, - "id": 6, - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s') AS time,\n\tavg(latitude) AS latitude,\n\tavg(longitude) AS longitude\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n\t$__timeFilter(date)\nGROUP BY\n\t1\nORDER BY\n\t1 ASC", - "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" - } - ] - } - ], - "transformations": [], - "transparent": true, - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM positions\nWHERE car_id = $car_id AND $__timeFilter(date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charging (AC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging (DC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "driving" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5794F2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 19, - "y": 1 - }, - "id": 38, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent"], - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tnow() AS time,\n\tsum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec,\n\t'driving' as metric\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n \textract(epoch FROM LEAST(end_date, $__timeTo()) - GREATEST(start_date, $__timeFrom())) as duration_sec,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'charging (DC)'\n\t\t\t\t ELSE 'charging (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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ncharges_total AS (\n SELECT\n \tsum(duration_sec) AS duration_sec,\n \tcurrent AS metric\n FROM charges_current\n GROUP BY 2\n ORDER BY metric\n)\n\nSELECT\n\tnow() AS time,\n\tcoalesce(duration_sec, 0) as duration_sec,\n metric\nFROM\n\tcharges_total;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 3 - }, - "id": 26, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n convert_km(sum(end_position.odometer - start_position.odometer)::numeric, '$length_unit') / (sum(extract(epoch FROM end_position.date - start_position.date)) / 3600) as \"speed_$length_unit\"\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date)", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 5 - }, - "id": 28, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH dc_charges AS (\n SELECT\n\t\tcp.id,\n extract(epoch FROM cp.end_date - cp.start_date) as duration_sec,\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 cp.charge_energy_added > 0\n AND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ndata AS (\n (\n SELECT\n sum(end_position.odometer - start_position.odometer) as distance, \n sum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec\n FROM\n drives\n JOIN positions start_position ON start_position_id = start_position.id\n JOIN positions end_position ON end_position_id = end_position.id\n WHERE\n drives.car_id = $car_id\n AND $__timeFilter(start_date)\n ) UNION ALL (\n SELECT\n NULL as distance,\n sum(duration_sec)\n FROM\n dc_charges\n WHERE\n current = 'DC'\n )\n)\n\nSELECT convert_km(sum(distance)::numeric, '$length_unit') / (sum(duration_sec) / 3600) as \"speed_$length_unit\"\nfrom data", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "net" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "net" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 13, - "y": 7 - }, - "id": 30, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "gross" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 16, - "y": 7 - }, - "id": 32, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "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": 9 - }, - "id": 22, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "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" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "${__cell_0}", - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-orange", - "value": 100 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 11, - "x": 13, - "y": 11 - }, - "id": 40, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n\tSELECT range_loss FROM range_loss_between_charges\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_before_first_charge\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_after_last_charge\n)\n\nSELECT 'used' as metric, sum(range_loss * c.efficiency) AS value\nFROM total_range_loss\nLEFT JOIN cars c ON c.id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added as energy_added,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'added (DC)'\n\t\t\t\t ELSE 'added (AC)'\n\t\tEND AS metric\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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n)\n\nSELECT metric, sum(energy_added) AS energy_added\nFROM charges_current\nGROUP BY 1\nORDER BY 1 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 20, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 1, - "showValue": "never", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "state-timeline" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "links", - "value": [ - { - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start_path|end_path|duration_str|car_id|drive_id)" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed\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 $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drives", - "transformations": [], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D" - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 36, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n charge_energy_added,\n charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n c.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n c.car_id,\n cost\n FROM\n charging_processes c\n LEFT JOIN positions p ON p.id = c.position_id\n LEFT JOIN cars ON cars.id = c.car_id\n LEFT JOIN addresses ON addresses.id = c.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n (charge_energy_added IS NULL OR charge_energy_added > 0) AND\n c.car_id = $car_id AND\n $__timeFilter(start_date)\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n charge_energy_added,\n charge_energy_used,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\nORDER BY\n start_date DESC;\n ", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 42, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM positions\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND car_id = $car_id\n GROUP BY 1\n) UNION ALL (\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM charges c\n LEFT JOIN charging_processes p ON c.charging_process_id = p.id\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND p.car_id = $car_id\n GROUP BY 1\n)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Level & Range", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthft" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 8, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s'),\n\tROUND(convert_m(avg(elevation), '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day')\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1642593521525", - "value": "1642593521525" - }, - "datasource": "TeslaMate", - "definition": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "from", - "options": [], - "query": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Trip", - "uid": "FkUpJpQZk", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/updates.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/updates.json deleted file mode 100644 index c63eedfb66f..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/updates.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:15", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1643273221821, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["count"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT count(*)\nFROM updates\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Updates", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 16, - "x": 8, - "y": 1 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY since_last_update) FROM (\n\tSELECT extract(EPOCH FROM start_date - lag(start_date) OVER (ORDER BY start_date)) AS since_last_update\n\tFROM updates\n\tWHERE $__timeFilter(start_date) AND car_id = $car_id\n) d;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Median time between updates", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "time" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "update_duration" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "since_last_update" - }, - "properties": [ - { - "id": "custom.width", - "value": 160 - }, - { - "id": "displayName", - "value": "Since Previous Update" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "displayName", - "value": "Installed Version" - }, - { - "id": "custom.align", - "value": "right" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "${__data.fields[version]} release notes", - "url": "https://www.notateslaapp.com/software-updates/version/${__data.fields[version]}/release-notes" - } - ] - }, - { - "id": "unit", - "value": "string" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_ct" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "# of Charges" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - } - ] - }, - "gridPos": { - "h": 28, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:68", - "alias": "Date", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "start_date", - "type": "date" - }, - { - "$$hashKey": "object:69", - "alias": "End Date", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "end_date", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "$$hashKey": "object:70", - "alias": "Installed Version", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTargetBlank": true, - "linkTooltip": "${__cell} release info", - "linkUrl": "https://www.notateslaapp.com/software-updates/version/${__cell}/release-notes", - "mappingType": 1, - "pattern": "version", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:202", - "alias": "Duration", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "update_duration", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:392", - "alias": "Since Previous Update", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "since_last_update", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:71", - "alias": "# of Charges", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "pattern": "chg_ct", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with u as (\r\n select *, coalesce(lag(start_date) over(order by start_date desc), now()) as next_start_date \r\n from updates\r\n where car_id = $car_id and $__timeFilter(start_date)\r\n),\r\nrng as (\r\n SELECT\r\n\t to_timestamp(floor(extract(epoch from date)/21600)*21600) AS date,\r\n\t (sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100 ) AS \"battery_rng\"\r\n FROM (\r\n select battery_level, usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from positions\r\n where car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\r\n union all\r\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from charges c\r\n join charging_processes p ON p.id = c.charging_process_id \r\n where $__timeFilter(date) and p.car_id = $car_id\r\n ) as data\r\n GROUP BY 1\r\n)\r\n\r\nselect\t\r\n u.start_date as time,\r\n\textract(EPOCH FROM u.end_date - u.start_date) AS update_duration,\r\n\textract(EPOCH FROM u.start_date - lag(u.start_date) OVER (ORDER BY u.start_date)) AS since_last_update,\r\n\tsplit_part(u.version, ' ', 1) as version,\r\n\tcount(distinct cp.id) as chg_ct,\r\n\tconvert_km(avg(r.battery_rng), '$length_unit')::numeric(6,2) AS avg_[[preferred_range]]_range_[[length_unit]]\r\nfrom u u\r\nleft join charging_processes cp\r\n\tON u.car_id = cp.car_id\r\n \tand cp.start_date between u.start_date and u.next_start_date\r\nleft join rng r\r\n\tON r.date between u.start_date and u.next_start_date\r\ngroup by u.car_id,\r\n\tu.start_date,\r\n\tu.end_date,\r\n\tnext_start_date,\r\n\tsplit_part(u.version, ' ', 1)", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Updates", - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Updates", - "uid": "IiC07mgWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/vampire-drain.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/vampire-drain.json deleted file mode 100644 index 033b382c37a..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/vampire-drain.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642779900099, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "displayName", - "value": "End" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "displayName", - "value": "Period" - }, - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(133, 142, 133)", - "value": null - }, - { - "color": "#56A64B", - "value": 43200 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "standby" - }, - "properties": [ - { - "id": "displayName", - "value": "Standby" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FF7383", - "value": null - }, - { - "color": "#FFB357", - "value": 0.3 - }, - { - "color": "#56A64B", - "value": 0.85 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Ø-Power" - }, - { - "id": "unit", - "value": "watt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": " " - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "transparent", - "index": 1, - "text": " " - }, - "1": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated range loss cannot be estimated correctly and is therefore hidden.", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 5 - } - ] - } - ] - }, - "gridPos": { - "h": 23, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with merge as (\n SELECT \n c.start_date AS start_date,\n c.end_date AS end_date,\n c.start_ideal_range_km AS start_ideal_range_km,\n c.end_ideal_range_km AS end_ideal_range_km,\n c.start_rated_range_km AS start_rated_range_km,\n c.end_rated_range_km AS end_rated_range_km,\n start_battery_level,\n end_battery_level,\n p.usable_battery_level AS start_usable_battery_level,\n NULL AS end_usable_battery_level,\n p.odometer AS start_km,\n p.odometer AS end_km\n FROM charging_processes c\n JOIN positions p ON c.position_id = p.id\n WHERE c.car_id = $car_id AND $__timeFilter(start_date)\n UNION\n SELECT \n d.start_date AS start_date,\n d.end_date AS end_date,\n d.start_ideal_range_km AS start_ideal_range_km,\n d.end_ideal_range_km AS end_ideal_range_km,\n d.start_rated_range_km AS start_rated_range_km,\n d.end_rated_range_km AS end_rated_range_km,\n start_position.battery_level AS start_battery_level,\n end_position.battery_level AS end_battery_level,\n start_position.usable_battery_level AS start_usable_battery_level,\n end_position.usable_battery_level AS end_usable_battery_level,\n d.start_km AS start_km,\n d.end_km AS end_km\n FROM drives d\n JOIN positions start_position ON d.start_position_id = start_position.id\n JOIN positions end_position ON d.end_position_id = end_position.id\n WHERE d.car_id = $car_id AND $__timeFilter(start_date)\n), \nv as (\n SELECT\n lag(t.end_date) OVER w AS start_date,\n t.start_date AS end_date,\n lag(t.end_[[preferred_range]]_range_km) OVER w AS start_range,\n t.start_[[preferred_range]]_range_km AS end_range,\n lag(t.end_km) OVER w AS start_km,\n t.start_km AS end_km,\n EXTRACT(EPOCH FROM age(t.start_date, lag(t.end_date) OVER w)) AS duration,\n lag(t.end_battery_level) OVER w AS start_battery_level,\n lag(t.end_usable_battery_level) OVER w AS start_usable_battery_level,\n\t\tstart_battery_level AS end_battery_level,\n\t\tstart_usable_battery_level AS end_usable_battery_level,\n\t\tstart_battery_level > COALESCE(start_usable_battery_level, start_battery_level) AS has_reduced_range\n FROM merge t\n WINDOW w AS (ORDER BY t.start_date ASC)\n ORDER BY start_date DESC\n)\n\nSELECT\n round(extract(epoch FROM v.start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM v.end_date)) * 1000 AS end_date_ts,\n -- Columns\n v.start_date,\n v.end_date,\n v.duration,\n (coalesce(s_asleep.sleep, 0) + coalesce(s_offline.sleep, 0)) / v.duration as standby,\n\t-greatest(v.start_battery_level - v.end_battery_level, 0) as soc_diff,\n\tCASE WHEN has_reduced_range THEN 1 ELSE 0 END as has_reduced_range,\n\tconvert_km(CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range)::numeric END, '$length_unit') AS range_diff_$length_unit,\n CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range) * c.efficiency END AS consumption,\n CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) * c.efficiency) / (v.duration / 3600) * 1000 END as avg_power,\n convert_km(CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) / (v.duration / 3600))::numeric END, '$length_unit') AS range_lost_per_hour_[[length_unit]]\nFROM v,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'asleep' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_asleep,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'offline' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_offline\nJOIN cars c ON c.id = $car_id\nWHERE\n v.duration > ($duration * 60 * 60)\n AND v.start_range - v.end_range >= 0\n AND v.end_km - v.start_km < 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Vampire Drain", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "tags": [], - "text": "6", - "value": "6" - }, - "hide": 0, - "includeAll": false, - "label": "min. Idle Time (h)", - "multi": false, - "name": "duration", - "options": [ - { - "selected": false, - "text": "0", - "value": "0" - }, - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "3", - "value": "3" - }, - { - "selected": true, - "text": "6", - "value": "6" - }, - { - "selected": false, - "text": "12", - "value": "12" - }, - { - "selected": false, - "text": "18", - "value": "18" - }, - { - "selected": false, - "text": "24", - "value": "24" - } - ], - "query": "0,1,3,6,12,18,24", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Vampire Drain", - "uid": "zhHx2Fggk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/visited.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate1/visited.json deleted file mode 100644 index 08ff417b4e1..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate1/visited.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 10000000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "latitude": "lat", - "longitude": "long", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "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", - "refId": "Positions", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - } - } - ], - "title": "MAP", - "type": "geomap" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Visited", - "uid": "RG_DxSmgk", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/BatteryHealth.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/BatteryHealth.json deleted file mode 100644 index 2ad8139b02f..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/BatteryHealth.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "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)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 37, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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", - "group": [], - "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;", - "refId": "Odometer", - "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" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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", - "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", - "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 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 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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "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", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 2024-03-19\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health V2", - "uid": "jchmRiqUfXgRx", - "version": 23, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/BrowseCharges.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/BrowseCharges.json deleted file mode 100644 index 673f9f3e164..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/BrowseCharges.json +++ /dev/null @@ -1,1486 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "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 --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1686816148286, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "filterable": false, - "inspect": false, - "minWidth": 150 - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 160 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.minWidth", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 300 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.displayMode", - "value": "basic" - }, - { - "id": "color", - "value": { - "mode": "continuous-RdYlGr" - } - }, - { - "id": "max", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 80 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_type" - }, - "properties": [ - { - "id": "displayName", - "value": "Type" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.minWidth", - "value": 40 - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n CASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC' ELSE 'AC' END AS charge_type\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n charge_type,\n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND duration_min >= '$min_duration_min'\n AND CASE WHEN $cost = 0 THEN (cost IS NULL OR cost >= 0) ELSE cost >= $cost END\n AND charge_type = ANY(CASE WHEN array_to_string(ARRAY[$charge_type], ',') = 'DC' THEN ARRAY['DC'] WHEN array_to_string(ARRAY[$charge_type], ',') = 'AC' THEN ARRAY['AC'] ELSE ARRAY['DC', 'AC'] END)\n AND address ILIKE '%$location%'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges: $charge_type", - "transformations": [], - "type": "table" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 0, - "y": 21 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy added", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_added"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 7, - "y": 21 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy used", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_used"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 14, - "y": 21 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Cost", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["cost"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 19, - "y": 21 - }, - "id": 15, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Average Duration", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["duration_min"] - } - } - } - ], - "transparent": true, - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Type a text contained in Location", - "hide": 0, - "label": "Location", - "name": "location", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "allValue": "", - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Type", - "multi": true, - "name": "charge_type", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "AC", - "value": "AC" - }, - { - "selected": false, - "text": "DC", - "value": "DC" - } - ], - "query": "AC, DC", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Cost >=", - "name": "cost", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Duration (minutes) >=", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Browse Charges", - "uid": "jchmTSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCostsStats.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCostsStats.json deleted file mode 100644 index 459607f6d62..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCostsStats.json +++ /dev/null @@ -1,3404 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "title": "Summary", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 10, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Energy Used", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 33, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost = 0;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Free Energy", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 64, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH energy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id),\r\nsince as (\r\n\tSELECT date FROM positions\r\n\tWHERE car_id = $car_id\r\n\tORDER BY date ASC\r\n\tLIMIT 1\r\n)\r\nSELECT (energy.charged_kWh / $distance_driven) as \"kwh_per_$length_unit\" FROM energy", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "kWh per $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "times" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 1 - }, - "id": 38, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_used > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "For this section, it's important that you have geo-fences called \"Home\" and \"Work\" if you want to see a bar with the energy charged on those places.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 49, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "/^energy$/", - "values": true - }, - "showUnfilled": false, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT location, SUM(charge_energy_used) AS Energy\r\nFROM (\r\nSELECT\r\n CASE\r\n WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Home%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Work%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%' THEN 'Superchargers'\r\n\t ELSE 'Other'\r\n END AS location, charge_energy_used\r\nFROM\r\n\tcharging_processes c\r\nLEFT JOIN addresses address ON c.address_id = address.id\r\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n\t car_id = $car_id\r\n\tAND $__timeFilter(end_date)\r\n\tAND c.charge_energy_used > 0\r\n) ChargeLocations\r\nGROUP BY location\r\nORDER BY Energy DESC", - "refId": "A", - "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" - } - ] - } - ], - "title": "Main locations", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of all the charges in a given period (last 10 years by default). You can see the distance driven, number of charges, total charging cost, etc., both in summary or in separated lists.\n\nYou can expand/collapse the rows as needed.\n\nFrom the Monthly Stats row, you will have a table with links to other Teslamate Dashboards to have a look on a specific period, charge or trip.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 51, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.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 cp.charge_energy_used > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_used) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Use the dropdown at the top to choose the Geofence to display energy added from", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 4 - }, - "id": 66, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes cp\r\nINNER JOIN geofences g ON g.id = cp.geofence_id\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id AND g.name = '$geofence'\r\nGROUP BY g.name),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at $geofence", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 4 - }, - "id": 65, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n\tAND cost = 0),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added free (no cost)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 4 - }, - "id": 67, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH suc_data AS (\r\n\tSELECT c.charging_process_id\r\n\tFROM charges c\r\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\r\n\tLEFT JOIN addresses addr ON addr.id = cp.address_id\r\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\r\n\tWHERE \r\n cp.car_id = $car_id AND c.fast_charger_present\r\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\r\n AND $__timeFilter(end_date)\r\n\tGROUP BY 1\r\n), suc_energy AS (\r\n SELECT coalesce(sum(charge_energy_used), 0) AS charged_kWh\r\n FROM charging_processes cp\r\n INNER JOIN suc_data ON suc_data.charging_process_id = cp.id\r\n), energy AS(\r\n SELECT\r\n\t sum(charge_energy_used) AS charged_kWh\r\n FROM charging_processes\r\n WHERE $__timeFilter(end_date)\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * suc_energy.charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, suc_energy;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 4 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $distance_driven as \"distance_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Driven", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 7 - }, - "id": 56, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $ACCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at AC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 7 - }, - "id": 44, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $DCCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at DC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 7 - }, - "id": 14, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $SucCost", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 7 - }, - "id": 27, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $TotalCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Costs", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 10 - }, - "id": 40, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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) / $distance_driven * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 10 - }, - "id": 42, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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_used, charge_energy_used))\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average kWh Cost", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Net is the efficiency while driving", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 10 - }, - "id": 69, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Gross is all consumption (including while idle, phantom drains, sentry mode, etc)", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 10 - }, - "id": 71, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 60, - "panels": [], - "title": "Top 10 Charges", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 0, - "y": 14 - }, - "id": 46, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 General Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 6, - "y": 14 - }, - "id": 4, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost > 0\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Paid Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 14 - }, - "id": 34, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%'\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 SuperCharger Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 14 - }, - "id": 32, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND cost = 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Free Stations (Charged)", - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 62, - "panels": [], - "title": "Monthly Stats", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy used" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsSystem" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "noValue", - "value": "--" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "NaN": { - "index": 0, - "text": "--" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 15, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 58, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.4.0", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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 date_trunc('month', (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('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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 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 sum(distance)/sum(range_diff) AS efficiency\nFROM data WHERE\n car_id = $car_id\nGROUP BY date\nORDER BY date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n charging_processes.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM charging_processes)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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_used,charge_energy_used)) AS sum_consumption_kwh,\n sum(greatest(charge_energy_used,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 (charge_energy_used IS NULL OR charge_energy_used > 0.1)\nGROUP BY date\nORDER BY date", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM drives)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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\nGROUP BY date\nORDER BY date", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per month", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 8, - "avg_outside_temp_c": 3, - "cnt_charges": 7, - "cost_charges": 5, - "date": 1, - "date_from": 11, - "date_to": 12, - "display": 0, - "efficiency": 4, - "efficiency_charged_net_km": 10, - "efficiency_charged_net_km_temp": 13, - "efficiency_net_km": 9, - "sum_consumption_kwh": 6, - "sum_distance_km": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy used", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "TotalCost", - "options": [], - "query": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "SucCost", - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "DCCost", - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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);", - "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);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "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": 2, - "includeAll": false, - "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, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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)", - "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)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name FROM geofences ORDER BY id", - "description": "Geofence to display energy added at", - "hide": 0, - "includeAll": false, - "label": "Geofence", - "multi": false, - "name": "geofence", - "options": [], - "query": "SELECT name FROM geofences ORDER BY id", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Costs Stats", - "uid": "jchmDdLe5uFVk", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCurveStats.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCurveStats.json deleted file mode 100644 index e5f60191d7c..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ChargingCurveStats.json +++ /dev/null @@ -1,870 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd", - "seriesBy": "last" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 10 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 29, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]", - "fixed": "super-light-yellow" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - SOC [%]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Supercharger Charging Curve", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 10, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Other DC Charging Curve", - "type": "xychart" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 40, - "panels": [], - "title": "Fast Charging Sessions", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the charging curve sessions on Tesla Supercharges or other Fast Charging Station.\n\nAlso, you can see number of fast charging sessions you've done on each type of chargers and the count of max power (kW) reached on a session.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 4, - "x": 0, - "y": 15 - }, - "id": 38, - "options": { - "displayLabels": ["value", "percent"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_summary AS (\n SELECT\n cp.id,\n COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.road, addr.house_number), '')), addr.city)) AS location,\n COUNT(c.charging_process_id)\n FROM\n charging_processes cp\n LEFT JOIN \n addresses addr ON addr.id = address_id\n LEFT JOIN\n geofences geo ON geo.id = geofence_id\n LEFT JOIN\n charges c ON cp.id = c.charging_process_id\n WHERE\n $__timeFilter(date) AND\n cp.car_id = $car_id AND cp.charge_energy_added > 0.01 AND c.fast_charger_present \n GROUP BY 1, 2\n)\nSELECT \n CASE\n WHEN location ILIKE '%supercharger%' THEN 'Tesla Supercharger'\n ELSE 'Other DC Stations' END AS location,\n COUNT(location) AS n\nFROM charges_summary\nGROUP BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-greens" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 90, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "Number of times" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 20, - "x": 4, - "y": 15 - }, - "id": 34, - "links": [], - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xField": "Power [kW]", - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH power_summary AS (\n SELECT ROUND(MAX(charges.charger_power) / 5, 0) * 5 AS \"power\"\n FROM charging_processes\n LEFT JOIN charges ON charging_processes.id = charges.charging_process_id\n WHERE $__timeFilter(date) AND charging_processes.car_id = $car_id AND charging_processes.charge_energy_added > 0.01 AND charges.fast_charger_present\n GROUP BY charging_processes.id\n)\nSELECT power_summary.power AS \"Power [kW]\", COUNT(power_summary.power) AS n\nFROM power_summary\nWHERE power_summary.power >= $filter_power_from AND power_summary.power <= $filter_power_to\nGROUP BY 1\nORDER BY 1 DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Max Power", - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Power >=", - "name": "filter_power_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "260", - "value": "260" - }, - "hide": 0, - "label": "Power <=", - "name": "filter_power_to", - "options": [ - { - "selected": true, - "text": "260", - "value": "260" - } - ], - "query": "260", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "SOC >=", - "name": "filter_soc_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "100", - "value": "100" - }, - "hide": 0, - "label": "SOC <=", - "name": "filter_soc_to", - "options": [ - { - "selected": true, - "text": "100", - "value": "100" - } - ], - "query": "100", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Curve Stats", - "uid": "jchmXpkIkhmRz", - "version": 9, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ContinuousTrips.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ContinuousTrips.json deleted file mode 100644 index 93d06f58ebe..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/ContinuousTrips.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View Trip details", - "url": "d/FkUpJpQZk?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-BlPu" - } - }, - { - "id": "max", - "value": 400 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "custom.minWidth", - "value": 180 - }, - { - "id": "displayName", - "value": "End Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "custom.minWidth", - "value": 120 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitykmh" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitymph" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/%/" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_km" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_temp_c" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.minWidth", - "value": 150 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 90 - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-red", - "value": null - }, - { - "color": "super-light-yellow", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - } - ] - }, - "gridPos": { - "h": 30, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH \r\ntrip AS (\r\n SELECT start_date sd, end_date ed, distance, duration_min, start_usable_battery_level, end_usable_battery_level, \r\n outside_temp_avg, power_max, speed_max, start_[[preferred_range]]_range_km, end_[[preferred_range]]_range_km\r\n FROM drives INNER JOIN (\r\n SELECT drive_id, MIN(usable_battery_level) AS end_usable_battery_level, MAX(usable_battery_level) AS start_usable_battery_level\r\n FROM (\r\n SELECT p.drive_id, p.usable_battery_level, ROW_NUMBER() OVER (PARTITION BY p.drive_id ORDER BY date) AS row_num\r\n FROM drives d INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE d.car_id = $car_id\r\n AND $__timeFilter(p.date)\r\n AND d.end_date IS NOT NULL\r\n AND d.duration_min > 0\r\n AND d.start_[[preferred_range]]_range_km > d.end_[[preferred_range]]_range_km\r\n AND p.usable_battery_level IS NOT NULL\r\n ) AS pos\r\n GROUP BY drive_id\r\n ) AS filter_drives ON filter_drives.drive_id = drives.id\r\n),\r\ncp AS (\r\n SELECT car_id, start_date, end_date, COALESCE(LAG(start_date) OVER(ORDER BY start_date DESC), now()) next_date, start_battery_level, end_battery_level\r\n FROM charging_processes WHERE $__timeFilter(start_date) AND car_id = $car_id\r\n),\r\ndriven AS (\r\nSELECT cp.car_id, cp.start_date, cp.end_date, cp.next_date, \r\n MIN(trip.sd) trip_start_date, \r\n MAX(trip.ed) trip_end_date,\r\n SUM(convert_km(trip.distance::numeric, '$length_unit')) AS distance_$length_unit, \r\n MAX(convert_km(trip.speed_max::numeric, '$length_unit')) AS speed_max_$length_unit,\r\n SUM(trip.duration_min) duration_min,\r\n MAX(trip.start_usable_battery_level) start_soc, \r\n MIN(trip.end_usable_battery_level) end_soc, \r\n AVG(convert_celsius(trip.outside_temp_avg, '$temp_unit')) AS avg_temp_$temp_unit, \r\n MAX(trip.power_max) AS power_max, \r\n convert_km((MAX(trip.start_[[preferred_range]]_range_km) - MIN(trip.end_[[preferred_range]]_range_km))::numeric, '$length_unit') AS range_diff_$length_unit \r\n\tFROM cp\tINNER JOIN trip ON trip.sd BETWEEN cp.start_date and cp.next_date\r\n GROUP BY cp.car_id, cp.start_date, cp.end_date, cp.next_date\r\n)\r\nSELECT \r\n ROUND(EXTRACT(epoch FROM start_date) - 10) * 1000 AS start_date_ts, ROUND(EXTRACT(epoch FROM next_date) + 10) * 1000 AS end_date_ts, start_date, next_date end_date,\r\n distance_$length_unit, duration_min * 60 as duration_min, \r\n (distance_$length_unit / duration_min * 60) as speed_$length_unit, \r\n start_soc as \"% Start\", end_soc as \"% End\", avg_temp_$temp_unit, power_max, speed_max_$length_unit,\r\n (range_diff_$length_unit * car.efficiency) consumption_kwh, \r\n (range_diff_$length_unit * car.efficiency / distance_$length_unit * 1000.0) consumption_kWh_$length_unit,\r\n (distance_$length_unit / range_diff_$length_unit) efficiency\r\nFROM driven\r\nINNER JOIN cars car ON car.id = driven.car_id\r\nWHERE distance_$length_unit >= $min_dist AND (distance_$length_unit / duration_min * 60) >= $min_avg_speed\r\nORDER BY start_date DESC\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Long Trips", - "transformations": [], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings limit 1", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_temperature FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "SELECT unit_of_temperature FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Distance >=", - "name": "min_dist", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Avg Speed >=", - "name": "min_avg_speed", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Continuous Trips", - "uid": "jchmY8upc6ZRk", - "version": 5, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentChargeView.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentChargeView.json deleted file mode 100644 index 5e30f174b5f..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentChargeView.json +++ /dev/null @@ -1,1953 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["Custom"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Charge", - "tooltip": "Show Current Charge Data", - "type": "link", - "url": "d/jchm9RxutVS7a/current-charge-view?kiosk&var-car_id=${car_id}&from=${current_charge_time}&to=${current_end_time}&var-BatteryCapacity=${BatteryCapacity}&var-charging_processes=${charging_processes}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 8, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level as \"SOC [%]\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 33, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kWh$/", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level * $BatteryCapacity / 100 as \"kWh\", $BatteryCapacity AS Total FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Load this dashboard to while you are in a charging session. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Charge\" button at the top right corner, to enter in Kiosk mode:\n\n- If you are charging, you will see the information from the start time of the current charge session until now and it will refesh automatically every 30 seconds.\n\n- If you are just browsing (not charging) you will see the information of the last charge session.", - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 51, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "

    \n\n
    ", - "mode": "html" - }, - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "decimals": 2, - "mappings": [], - "max": 49, - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 36, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^Added$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "kWh Added", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(charge_energy_added) as \"Added\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 37, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city)) FROM \tcharging_processes c \tLEFT JOIN addresses ON addresses.id = c.address_id \tLEFT JOIN geofences g ON g.id = geofence_id WHERE \tc.id = $charging_processes", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 51, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SOC [%]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 12, - "x": 0, - "y": 2 - }, - "id": 28, - "options": { - "legend": { - "calcs": ["mean", "min", "max", "last"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "alias": "Power [kW]", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["none"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level as \"SOC [%]\", (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]\", (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as \"Battery heater\" FROM charges c JOIN charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) and p.car_id = $car_id ORDER BY 1", - "refId": "Power", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "tags": [], - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-green", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": " SELECT battery_level as \"Initial SOC\" FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1", - "refId": "Inital SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT battery_level - (SELECT battery_level as \"Added\" FROM charges where charging_process_id=$charging_processes\tORDER BY DATE ASC \tLIMIT 1) as \"Added\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "clocks" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Elapsed Time", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "WITH start_process AS ( SELECT date FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1 ) SELECT EXTRACT(EPOCH FROM (charges.date - start_process.date)) AS \"Elapsed\" FROM charges, start_process WHERE charging_process_id = $charging_processes AND $__timeFilter(charges.date) order by charges.date desc LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["utc"], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 6, - "x": 18, - "y": 4 - }, - "id": 50, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 20, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-yellow", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "Km" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 7 - }, - "id": 16, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"Odometer\" from positions where car_id = $car_id order by date desc limit 1;", - "refId": "odometer", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 10 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Initial Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 asc limit 1", - "refId": "Initial Range", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Rated Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Rated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Estimated", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(est_battery_range_km, '$length_unit')) as \"Estimated Range\" FROM positions WHERE $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Estimated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Current" - }, - "properties": [ - { - "id": "unit", - "value": "amp" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 49, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_actual_current else ((2.85 + (usable_battery_level * 0.013)) * 96) * charger_power / 100 end) as \"Current\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 14 - }, - "id": 47, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^Volt$/", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_voltage else charger_power / GREATEST(0.1, (((2.85 + (usable_battery_level * 0.013)) * 96.0) * charger_power / 100.0)) * 1000.0 end) as \"Volt\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "orange", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 18 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(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\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "celsius" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 18 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Outdoor", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(inside_temp, '$temp_unit')) AS \"Inside\" FROM positions WHERE car_id = $car_id and inside_temp is not null AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Inside", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \t$__timeGroupAlias(date,$__interval), \tavg(convert_celsius(driver_temp_setting, '$temp_unit')) as \"Driver\" FROM positions WHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Driver", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_charge_time", - "options": [], - "query": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "charging_processes", - "options": [], - "query": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_end_time", - "options": [], - "query": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Current Charge View", - "uid": "jchm9RxutVS7a", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentDriveView.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentDriveView.json deleted file mode 100644 index 0917402bf8a..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentDriveView.json +++ /dev/null @@ -1,1858 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Drive", - "tooltip": "Adjust to current drive", - "type": "link", - "url": "d/jchmkOuP_Fggz/current-drive-view?kiosk&var-car_id=${car_id}&from=${current_drive_start_time}&to=${current_drive_end_time}&var-current_drive=${current_drive}&var-BatteryCapacity=${BatteryCapacity}&var-efficiency=${efficiency}&var-preferred_range=${preferred_range}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This is a special dashboard to load while driving. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Drive\" button at the top right corner, to enter in Kiosk mode:\n\n - If you are driving, you will see the information from the start time of the current drive until now and it will refesh automatically every 30 seconds.\n\n - If you are just browsing (not driving) you will see the information of the last drive.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-orange", - "mode": "fixed", - "seriesBy": "last" - } - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "dark-green", - "value": 0 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 26, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tavg(power) AS Power,\n\tavg(battery_heater::integer) AS \"Battery heater\",\n\tavg(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Elevation", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Power", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Consumption", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 3 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN $efficiency\n\t WHEN '$length_unit' = 'mi' THEN $efficiency * 1.60934\n\tEND as \"efficiency_$length_unit\"\nFROM settings\nWHERE\tid = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 20, - "y": 6 - }, - "id": 29, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 22, - "y": 6 - }, - "id": 31, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 12 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 12 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 12 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 12 - }, - "id": 27, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 12 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 15, - "y": 12 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 33, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - } - ], - "refresh": "10s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive", - "options": [], - "query": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_start_time", - "options": [], - "query": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_end_time", - "options": [], - "query": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "efficiency", - "options": [], - "query": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current Drive View", - "uid": "jchmkOuP_Fggz", - "version": 8, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentState.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentState.json deleted file mode 100644 index 4c487639572..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/CurrentState.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "state-timeline", - "name": "State timeline", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsSystem" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 4, - "y": 0 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 69, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "$preferred_range range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 70, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km(est_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND est_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km(ideal_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "estimated range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 85, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date FROM positions WHERE car_id = $car_id AND $__timeFilter(date) ORDER BY date DESC LIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 71, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS \"Front left\",\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS \"Front right\",\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS \"Rear left\",\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS \"Rear right\"\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure ($pressure_unit)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 86, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 59, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 63, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 4 - }, - "id": 61, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC \nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 8 - }, - "id": 79, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\n\tFROM drives d\n\tLEFT JOIN addresses ON addresses.id = d.end_address_id\n\tLEFT JOIN geofences g ON g.id = d.end_geofence_id\nWHERE\n\t $__timeFilter(d.end_date) AND d.car_id = $car_id \nORDER BY d.end_date DESC\nLIMIT 1", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Location", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "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" - } - ], - "noValue": "0", - "unit": "dtdhms" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 9, - "x": 15, - "y": 8 - }, - "id": 41, - "options": { - "displayLabels": ["percent", "name"], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^total_time$/", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [2, 0]) AS state\r\n FROM charging_processes\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [1, 0]) AS state\r\n FROM drives\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n start_date AS date,\r\n CASE\r\n WHEN state = 'offline' THEN 3\r\n WHEN state = 'asleep' THEN 4\r\n WHEN state = 'online' THEN 5\r\n END AS state\r\n FROM states\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [6, 0]) AS state\r\n FROM updates\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n), aux AS (\r\n SELECT $__timeFrom() :: timestamp AS date, (SELECT state FROM states WHERE date <= $__timeFrom() ORDER BY date DESC LIMIT 1) AS state, false AS include\r\n UNION\r\n SELECT date, state, true AS include FROM states\r\n UNION\r\n SELECT $__timeTo() :: timestamp as date, NULL AS state, true as include\r\n ORDER BY date\r\n), states_elapsed AS (\r\n SELECT \r\n date, state AS current_state, include,\r\n LAG(state) OVER (ORDER BY date) AS state,\r\n LAG(date) OVER (ORDER BY date) AS last_state_time,\r\n date - LAG(date) OVER (ORDER BY date) AS elapsed_time\r\n FROM aux \r\n)\r\nSELECT \r\n CASE\r\n WHEN state = 0 OR state = 5 THEN 'online'\r\n WHEN state = 1 THEN 'driving'\r\n WHEN state = 2 THEN 'charging'\r\n WHEN state = 3 THEN 'offline'\r\n WHEN state = 4 THEN 'asleep'\r\n WHEN state = 6 THEN 'updating'\r\n END AS state,\r\n EXTRACT(EPOCH FROM SUM(elapsed_time)) as Total_Time\r\nFROM states_elapsed\r\nWHERE $__timeFilter(date) AND include\r\nGROUP BY 1\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 11 - }, - "id": 55, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id AND $__timeFilter(date)\norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 57, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id AND start_date <= $__timeTo()\norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 83, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current State", - "uid": "jchmo4BNRkZz", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/DCChargingCurvesByCarrier.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/DCChargingCurvesByCarrier.json deleted file mode 100644 index 427731fac92..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/DCChargingCurvesByCarrier.json +++ /dev/null @@ -1,1026 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%'\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charger Carrier Contains: $carrier", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 44, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n COALESCE(g.name, a.name) AS name\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id, g.name, a.name\r\n)\r\nSELECT name AS \"Charger Carrier\" FROM data GROUP BY name\r\n\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 16 - }, - "id": 35, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_added)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Added", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 6, - "y": 16 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_used)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Used", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 11, - "y": 16 - }, - "id": 34, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(duration_min)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Time", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 16 - }, - "id": 37, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.cost)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 16 - }, - "id": 38, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n AVG(p.charge_energy_used) AS charge_energy_used, AVG(p.cost) AS cost \r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id\r\n)\r\nSELECT AVG(cost) / AVG(charge_energy_used) cost_kwh FROM data", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost per kWh", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "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" - } - ], - "title": "Help", - "type": "row" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Carrier Name", - "hide": 0, - "label": "Carrier", - "name": "carrier", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "DC Charging Curves by Carrier", - "uid": "jchmXpkcccIkh", - "version": 6, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/DatabaseDashboadInfo.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/DatabaseDashboadInfo.json deleted file mode 100644 index 1607e0f4915..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/DatabaseDashboadInfo.json +++ /dev/null @@ -1,1233 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 5, - "y": 0 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Charges\" FROM charging_processes WHERE car_id=$car_id \n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives\" FROM drives WHERE car_id=$car_id ", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 10, - "y": 0 - }, - "id": 39, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Nº Car Updates\"\nFROM Updates \nWHERE car_id = $car_id\n", - "refId": "Car Updates", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as \"Current Car Firmware\" \r\nfrom updates \r\nwhere car_id = $car_id \r\norder by start_date desc \r\nlimit 1", - "refId": "Firmware", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Software", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 15, - "y": 0 - }, - "id": 42, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Charges not closed\"\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives not closed\"\r\nFROM drives \r\nWHERE car_id = $car_id AND end_date is null", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Incomplete Data", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 40, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "You can go to the \nIncomplete Data dashboard
    \nto see details of the **Drives** or **Charges** not closed.\n", - "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" - } - ] - } - ], - "title": "About incomplete data", - "type": "text" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 34, - "panels": [], - "title": "Database Information", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Size" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 0, - "y": 5 - }, - "id": 33, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT \r\n relname AS \"Table\",\r\n pg_size_pretty(pg_total_relation_size(relid)) As \"Size\"\r\nFROM \r\n pg_catalog.pg_statio_user_tables\r\nORDER BY \r\n pg_total_relation_size(relid) DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Row Count" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 5, - "y": 5 - }, - "id": 38, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT table_name AS \"Table Name\", \r\n (xpath('/row/cnt/text()', xml_count))[1]::text::int AS \"Row Count\"\r\nFROM (\r\n SELECT table_name, \r\n query_to_xml(format('SELECT count(*) as cnt FROM %I.%I', table_schema, table_name), false, true, '') AS xml_count\r\n FROM information_schema.tables\r\n WHERE table_schema NOT IN ('pg_catalog', 'information_schema')\r\n) AS t\r\nORDER BY 2 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "These statistics can help you evaluate the efficiency of your indexes.\n\nYou should reindex all the database periodically.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 14, - "x": 10, - "y": 5 - }, - "id": 41, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\r\n relname AS \"Table\",\r\n indexrelname AS \"Index\",\r\n idx_scan AS \"Index Scans\",\r\n idx_tup_read AS \"Tuples Read\",\r\n idx_tup_fetch AS \"Tuples Fetched\"\r\nFROM\r\n pg_stat_all_indexes\r\nWHERE\r\n schemaname NOT LIKE 'pg_%' AND\r\n indexrelname IS NOT NULL\r\nORDER BY 3 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Indexes", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 0, - "y": 21 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n pg_size_pretty(SUM(pg_total_relation_size(relid))) As \"Size\"\nFROM \n pg_catalog.pg_statio_user_tables;", - "refId": "DistanceLogged", - "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" - } - ] - } - ], - "title": "Database Total Size", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [ - { - "targetBlank": true, - "title": "Click to check last Version", - "url": "https://github.com/jheredianet/Teslamate-CustomGrafanaDashboards/releases/" - } - ], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 14, - "x": 10, - "y": 21 - }, - "id": 43, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "SELECT '2024.04.02' AS \"Current Version\"", - "refId": "DashboardVersion", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "About Teslamate Custom Dashboards", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "description": "", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Database Information", - "uid": "jchm_dbInfo", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/IncompleteData.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/IncompleteData.json deleted file mode 100644 index 84e5fce4dcc..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/IncompleteData.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1686842645876, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": false - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT 'Car ID: ' || id as id, 'Name: '|| name as name , 'Model: '|| model as model, 'VIN: '|| vin as vin, \n 'Color: '|| exterior_color as color, 'Wheels: '|| wheel_type, 'Efficiency: '|| efficiency as efficiency \nFROM cars\nWHERE id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Car Information 🚘", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "content": "#### Incomplete Data\n\nFrom here you can check if you have incomplete data of **Drives** and **Charges**. If so, you may follow the official guide by Manually fixing data", - "mode": "markdown" - }, - "pluginVersion": "8.5.15", - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 15, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id AS \"Drive ID\", start_date, end_date, distance, duration_min \nFROM drives \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Drives 🛣️", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 22, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id as \"Charging Process ID\", start_date, end_date, charge_energy_added, charge_energy_used, start_battery_level, end_battery_level, duration_min\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Charges 🪫", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Incomplete Data", - "uid": "jchmIDopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/MileageStats.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/MileageStats.json deleted file mode 100644 index 27ca8a4fe6f..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/MileageStats.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "dtdurations" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "max", - "value": 1 - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 9, - "x": 0, - "y": 1 - }, - "id": 10, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "10.1.2", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per ${period}", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 16, - "date_to": 17, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 14, - "efficiency_charged_net_mi": 15, - "efficiency_net_km": 12, - "efficiency_net_mi": 13, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 80, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cnt" - }, - "properties": [ - { - "id": "unit", - "value": "drives" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Count" - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 27, - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0.7, - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "always", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.6", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 \"Period\",\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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "${length_unit} & drives per ${period}", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["sum_distance_km", "cnt", "Period"] - } - } - } - ], - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - }, - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - } - ], - "query": "month,year,day,week", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage Stats", - "uid": "jchmNjtMTFx", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/SpeedRates.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/SpeedRates.json deleted file mode 100644 index 666e8f8c3cc..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/SpeedRates.json +++ /dev/null @@ -1,1218 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "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": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "avg_consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "min" - }, - { - "id": "max" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "max" - }, - { - "id": "min" - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (km/h)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (mph)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Avg. Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n BinnedData.speed_bin AS speed_range_$length_unit,\r\n convert_km(BinnedData.total_odometer_distance::numeric, '$length_unit') AS avg_distance_$length_unit,\r\n BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END AS avg_speed_$length_unit,\r\n ((BinnedData.total_energy_consumed / (BinnedData.total_distance * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END)) * 1000 ) / (BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END) AS avg_consumption_$length_unit,\r\n avg_power\r\nFROM\r\n (SELECT\r\n CASE\r\n WHEN elevation_diff >= 1 THEN 'Uphill'\r\n WHEN elevation_diff <= -1 THEN 'Downhill'\r\n ELSE 'Flat'\r\n END AS terrain_type,\r\n ROUND(speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END / 10, 0) * 10 AS speed_bin,\r\n AVG(power) AS avg_power,\r\n SUM(power::integer * speed::integer / 60.0) AS total_energy_consumed,\r\n SUM(speed / 60.0) AS total_distance,\r\n SUM(odometer_distance) AS total_odometer_distance,\r\n AVG(speed) AS avg_speed,\r\n car_id\r\n FROM\r\n (SELECT\r\n drives.car_id,\r\n positions.speed,\r\n positions.power,\r\n positions.elevation - LAG(positions.elevation) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS elevation_diff,\r\n positions.odometer - LAG(positions.odometer) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS odometer_distance\r\n FROM\r\n drives\r\n JOIN positions ON drives.id = positions.drive_id\r\n WHERE\r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND drives.end_date IS NOT NULL\r\n AND drives.distance >= convert_km($min_distance::numeric, '$length_unit')\r\n ) AS DifferentialData\r\n GROUP BY speed_bin, terrain_type, car_id\r\n ) AS BinnedData\r\nJOIN cars ON BinnedData.car_id = cars.id\r\nWHERE BinnedData.terrain_type = '$terrain_type'\r\n AND BinnedData.total_distance > 0 \r\n AND BinnedData.total_odometer_distance > 0\r\n AND BinnedData.speed_bin >= $min_speed_segment\r\nORDER BY BinnedData.speed_bin DESC;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption by speed - $terrain_type Terrain", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere $__timeFilter(end_date) and car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 14, - "y": 6 - }, - "id": 4, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere $__timeFilter(end_date) \n and distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 17, - "y": 6 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t $__timeFilter(end_date)\n\t and end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance > 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 20, - "y": 6 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "seconds_elapsed" - }, - "properties": [ - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 16, - "links": [], - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \r\n speed_section_$length_unit || CASE WHEN '$length_unit' = 'km' THEN ' km/h' WHEN '$length_unit' = 'mi' THEN ' mph' END AS speed,\r\n SUM(seconds_elapsed) AS seconds_elapsed\r\nFROM (\r\n SELECT\r\n ROUND(convert_km(p.speed::numeric, '$length_unit') / 10,0) * 10 AS speed_section_$length_unit,\r\n EXTRACT(EPOCH FROM (LEAD(p.\"date\") OVER (ORDER BY p.\"date\") - p.\"date\")) AS seconds_elapsed\r\n FROM drives d\r\n INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE\r\n $__timeFilter(d.start_date)\r\n AND d.car_id = $car_id \r\n AND d.end_date IS NOT NULL\r\n AND d.distance >= convert_km($min_distance::numeric,'$length_unit')\r\n AND p.speed > 0.1\r\n) AS drivedata\r\nWHERE speed_section_$length_unit >= $min_speed_segment\r\nGROUP BY speed_section_$length_unit\r\nORDER BY speed_section_$length_unit DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Speeds", - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "50", - "value": "50" - }, - "hide": 0, - "includeAll": false, - "label": "Min. speed segment", - "multi": false, - "name": "min_speed_segment", - "options": [ - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "20", - "value": "20" - }, - { - "selected": false, - "text": "30", - "value": "30" - }, - { - "selected": false, - "text": "40", - "value": "40" - }, - { - "selected": true, - "text": "50", - "value": "50" - } - ], - "query": "10,20,30,40,50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": true, - "text": "25", - "value": "25" - }, - "hide": 0, - "includeAll": false, - "label": "Min. driving distance", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": true, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": false, - "text": "150", - "value": "150" - }, - { - "selected": false, - "text": "200", - "value": "200" - } - ], - "query": "1,5,10,25,50,100,150,200", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - "hide": 0, - "includeAll": false, - "label": "Terrain Type", - "multi": false, - "name": "terrain_type", - "options": [ - { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - { - "selected": false, - "text": "Uphill", - "value": "Uphill" - }, - { - "selected": false, - "text": "Downhill", - "value": "Downhill" - } - ], - "query": "Flat, Uphill, Downhill", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": false, - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Speed Rates", - "uid": "jchmfu4SiQgWz", - "version": 10, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/TrackingDrives.json b/incubator/TeslaMate/1.0.3/dashboards/teslamate2/TrackingDrives.json deleted file mode 100644 index 47a5a0d8b45..00000000000 --- a/incubator/TeslaMate/1.0.3/dashboards/teslamate2/TrackingDrives.json +++ /dev/null @@ -1,1363 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater (On/Off)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power (kW)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation (m)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (km/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (mi/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC (%)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater (On/Off)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "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", - "options": "Power (kW)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Rated Efficiency (kWh/100km)" - }, - "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": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Elevation (m)" - }, - "properties": [ - { - "id": "decimals", - "value": 0 - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 15, - "x": 0, - "y": 0 - }, - "hideTimeOverride": false, - "id": 8, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n\t$__time(date),\n\tAVG(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h,\n\tAVG(power) AS Power,\n\tAVG(battery_level) AS SOC,\n\tAVG(battery_heater::integer * 100) AS battery_heater,\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 20, - "w": 9, - "x": 15, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n $__time(date), latitude, longitude\nFROM positions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nORDER BY date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "sec_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 17 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "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", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 5, - "y": 17 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 17 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 17 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Year", - "options": [], - "query": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Month", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Day", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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;", - "hide": 0, - "includeAll": false, - "label": "Journey", - "multi": false, - "name": "journey", - "options": [], - "query": "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;", - "refresh": 1, - "regex": "/route=\"(?[^\"]+)|id=\"(?[^\"]+)/g", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "2023-11-28T12:32:29.961Z", - "to": "2023-11-28T12:40:33.863Z" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Tracking Drives", - "uid": "jchmX8upc6ZRk", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.3/icon-small.webp b/incubator/TeslaMate/1.0.3/icon-small.webp deleted file mode 100644 index 06f97ddfd5f87d7c972ecb515d4014afa6488852..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 394 zcmV;50d@XTNk&G30RRA3MM6+kP&il$0000G0000V0018V06|PpNWK6700DrqZQHWu z!QCY}jRwu;ZjCgTM%zK#FK~-qEiGDO$$j13mvBD+zUPZ;5itS4U!Huv9gqTk^pGHk zaypFVn9mWcnOO^leCUPXdEY4$6xt&M?gsgp=L&@2?5Lhg+WkbJ-XtU}nyoT{T-uN` zdI%9)7%4IO{ylmb2{Eb}ilqWpeoD#!sJXy7hyb@T^(X8zDFfcF)e^triW7uN8m{@A zR7wC*JMzc&J*)!cz-EacimPrAv132o00IG4P&go-0001x0|1=?Dj)zL00ICsC8Pin zU^y|tz?ax$YJ2NN!H(UtZe<_<0RH(9blPKk_dm~BA;C@uwcc-c#zoiav#)cBfJxvQ z`d;~F=@~qr^)$;yhD`dvKcM2LQXKGVKcV~VKUQz)t9@a58u0Ji|4*D&gK~mnE`2=0 ok_w|8siR6Za@8B31{EY3AJ%W{hs0_E8sx>!g@MUM*LnZ|07!PLy8r+H diff --git a/incubator/TeslaMate/1.0.3/icon.webp b/incubator/TeslaMate/1.0.3/icon.webp deleted file mode 100644 index c68d6fd7df6a04725889d4e15afec70d644b339a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1988 zcmV;#2RryuNk&Gz2LJ$9MM6+kP&il$0000G0001$005N$06|PpNYw-Y00E!{0ALx( zN;+D5*1Na%o^SVT+qP}nwr$%tw`be-t!+(rn&kO)+GM^SB4PpnB|Ul_{hXine05z* zU^;S6LoWTy)+0kv+J_?@)zCEHT-xt=o=5%|W!za@)5a8Vs4*p`5R<=XNI5hx(vo!+ zft?RzlE3|Vc|%Vn%Q*9j+Y^bH==BtD4P=(eXXcw+gD8Ygxz*bqvWfE_bml8h#76nA zcD8b6kz0%9k9cC#EZvl9){Nn-%Ma6K5u?ZM?iiwi?0_1#dM7f86j9vj2nQ82G!@pS z>9HgTD)=_tAF=^POu3bWh*WXO&y&498Nm7W-T6*WB%SkMWotV~H>I}r?571p@|n6J zQ8paCpmlJ!OL`(ll)bNsmpQf64UQCJB2%2QybPohj9&F38xz?YQg2Q6r;u65gwwG+ zk#*twy}g_jbW!`XTl+~*WS@U;Mne~l9?&sr{9R0_SbV-us0}5c(zes(VnWTdz4gsG zDwx+f_Pr3(L&$r*GEgNy%cuo+GXz3aee9*NL27xaBL?pOfeCemSL-_XK>2VU4VJz} zgvv!XCqz5SgtPP-_OzH#J4e?}tATQGY=1Y?fa!(#GTo9#} zmO6U!#Y94X^!4DtFen{OV8^Xr5n*D{izN+QmC{f-R+<%CLYP_buwR&sLJA&(ULe9! zEa+O;8qcoB$=D*o*xYyPYI4R=_|LkVMc6CE9q(lYji7X&`=x|1Irm0a3n-pLw^T$J zUG%W5nP^;vw*p~y@p5m`wEcO)ZuC8x6Dx8PVL9K;UaT5Arjg0sVl{lswq?O$HG9Xl zjgh9wrvLr-zyJPe<1O1Ziq_;6+t!7PRp%z#=J<(K=^)z%Ig8~p9We~0H8K}VQ!fp% zi$5Ijy)1z&bHu>unG8ugs(8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deleted file mode 100644 index dc76692a496..00000000000 --- a/incubator/TeslaMate/1.0.3/ix_values.yaml +++ /dev/null @@ -1,84 +0,0 @@ -image: - repository: teslamate/teslamate - pullPolicy: IfNotPresent - tag: 1.28.5@sha256:aa3f37ecccc7ea77fa1e259391c8f2a05533e208228a42ebb4dbe560828db057 - -securityContext: - container: - readOnlyRootFilesystem: false - -service: - main: - ports: - main: - protocol: http - port: 4000 - -workload: - main: - replicas: 1 - strategy: RollingUpdate - podSpec: - containers: - main: - env: - ENCRYPTION_KEY: - secretKeyRef: - name: teslamate-secrets - key: TESLAMATE_ENCRYPTION_KEY - DATABASE_USER: "{{ .Values.cnpg.main.user }}" - DATABASE_PASS: - secretKeyRef: - name: cnpg-main-user - key: password - DATABASE_NAME: "{{ .Values.cnpg.main.database }}" - DATABASE_HOST: - secretKeyRef: - name: cnpg-main-urls - key: host - DISABLE_MQTT: true - MQTT_HOST: "" - MQTT_PORT: 1883 - MQTT_USERNAME: "" - MQTT_PASSWORD: "" - -configmap: - datasource: - enabled: true - labels: - grafana_datasources: "1" - data: - datasourceteslamatepsql.yaml: |- - apiVersion: 1 - datasources: - - name: TeslaMate - type: postgres - uid: TeslaMate - url: {{ printf "%s.%s:5432" (.Values.cnpg.main.creds.host | trimAll "\"") .Release.Namespace }} - access: proxy - user: {{ .Values.cnpg.main.user }} - secureJsonData: - password: {{ .Values.cnpg.main.creds.password | default "na" }} - jsonData: - database: {{ .Values.cnpg.main.database }} - sslmode: 'disable' # disable/require/verify-ca/verify-full - maxOpenConns: 100 # Grafana v5.4+ - maxIdleConns: 100 # Grafana v5.4+ - maxIdleConnsAuto: true # Grafana v9.5.1+ - connMaxLifetime: 14400 # Grafana v5.4+ - postgresVersion: 1500 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10 - timescaledb: false - -portal: - open: - enabled: true - -cnpg: - main: - enabled: true - user: teslamate - database: teslamate - cluster: - initdb: - postInitApplicationSQL: - - ALTER USER teslamate WITH SUPERUSER diff --git a/incubator/TeslaMate/1.0.3/questions.yaml b/incubator/TeslaMate/1.0.3/questions.yaml deleted file mode 100755 index 594be522b16..00000000000 --- a/incubator/TeslaMate/1.0.3/questions.yaml +++ /dev/null @@ -1,3231 +0,0 @@ -groups: - - name: Image - description: | - Configured the images to be used for the Chart. - It's wise to use "digest pinned" tags and to avoid using "latest". - - Checkout the following documentation for more information: - - https://truecharts.org/common/#images - - - - name: General - description: | - For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general. - - Checkout the following documentation for more information: - - https://truecharts.org/common/global/ - - https://truecharts.org/common/#tz - - https://truecharts.org/common/podoptions/ - - Image Pull Secrets - - - - name: Workload - description: | - These settings configure how the actual Pods and containers are running. - Generally, on SCALE, we only expose a limited subset of these settings for the primary workload and container. - - Checkout the following documentation for more information: - - https://truecharts.org/common/workload/ - - https://truecharts.org/common/container/ - - - - name: App Configuration - description: | - Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application. - Most options should have a Tooltip (Circled Question Mark) to further describe said option. - - To find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/ - - - name: Services - description: | - Service and Networking options for any applications are contained here. - Some applications may have complicated networking setups with multiple options or some may have no options here at all. - - Options here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes. - - Checkout the following documentation for more information: - - https://truecharts.org/common/service/ - - - name: Networking - description: | - Contains advanced networking options that are not actively supported by the TrueCharts team. - Currently only contains scaleExternalInterfaces. - - Checkout the following documentation for more information: - - https://truecharts.org/common/scaleexternalinterface/ - - - name: Persistence - description: | - Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types. - This storage is called Persistence since it is not deleted upon restart or upgrade of an application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/ - - https://truecharts.org/scale/guides/nfs-share/ - - https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath - - - - name: Ingress - description: | - Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names). - If you choose to enable this you must have a "Ingress Provider" aka "Reverse Proxy" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/) - It also requiresa DNS service to actually resolve the DNS name of the FQDN specified. - - Checkout the following documentation for more information: - - https://truecharts.org/common/ingress/ - - - - name: SecurityContext - description: | - The security settings for each application and/or permissions that each application may have for the files/directories created. - Each application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities. - - Unless necessary users are advised to keep this section mostly to defaults. - - Checkout the following documentation for more information: - - https://truecharts.org/common/securitycontext/ - - - - name: Resources - description: | - Resources limits that have been defined by each application are in this section. - Most will have a specific default that some users may want to change based on their specific hardware or needs. - - This also contains the options to mount GPUs or, more precisely, "request" GPU's to be mounted. - - Checkout the following documentation for more information: - - https://truecharts.org/common/resources/ - - - name: Devices - description: | - These are special "mountpoints" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts. - For clearity we've decided to seperate this from persistence on SCALE. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/device/ - - https://truecharts.org/scale/guides/pci-passthrough/ - - - name: Middlewares - description: Traefik Middlewares - - - name: StorageClass - description: | - StorageClasses define where to storage Storage. - - Checkout the following documentation for more information: - - - name: Metrics - description: | - Contains options to configure Prometheus metrics for the application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/metrics/ - - - - name: Addons - description: | - Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application’s defaults. - Things included here are VPN addons, Codeserver for editing files inside the application’s container, Netshoot for network troubelshooting, etc. - - Generally not required for use but may be necessary or usefull at times for specific applications. - - Checkout the following documentation for more information: - - https://truecharts.org/common/addons/ - - https://truecharts.org/scale/guides/vpn-setup/ - - - - name: Experimental - description: | - Experimental Configuration Options - Often these are not fully flushed-out, could randomly break or might not work at-all. - - - name: Postgresql - description: | - For Postgresql we use "CloudNative-PG" as a backend, which has to be installed first. - - Checkout the following documentation for more information: - - https://truecharts.org/common/cnpg/ - - https://truecharts.org/scale/guides/sql-export/ - - https://truecharts.org/scale/guides/recover-cnpg/ - - - name: Dependencies - description: | - contains dependency setting for which we, currently, do not have seperate catagories (yet) - - - - name: Documentation - description: | - We added this section to make everyone aware that OpenSource isn't always easy. - It doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects. - - Before installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/ - We would also advice going over our https://truecharts.org/scale/guides/scale-intro/ - and many of the other documentation pages... - -portals: - open: - protocols: - - "$kubernetes-resource_configmap_tcportal-open_protocol" - host: - - "$kubernetes-resource_configmap_tcportal-open_host" - ports: - - "$kubernetes-resource_configmap_tcportal-open_port" - -questions: - - variable: global - group: General - label: "Global Settings" - schema: - additional_attrs: true - type: dict - attrs: - - variable: stopAll - label: Stop All - description: "Stops All Running pods and hibernates cnpg" - schema: - type: boolean - default: false - - - variable: credentialsList - group: General - label: "Credentials (Experimental)" - schema: - type: list - default: [] - items: - - variable: credentialsEntry - label: "Enter Credentials" - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: "Name" - schema: - type: string - required: true - default: "" - - variable: type - label: Type - description: "Type of Credential" - schema: - type: string - default: "s3" - enum: - - value: s3 - description: s3 Storage - - variable: url - label: "url" - schema: - type: string - default: "" - required: true - - variable: path - label: "path" - description: "Path Prefix not needed for most cases" - schema: - type: string - default: "" - - variable: region - label: "region" - description: "region is primarily for AWS not needed for most cases" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - - variable: bucket - label: "bucket" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - required: true - - variable: accessKey - label: "accessKey" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - required: true - - variable: secretKey - label: "secretKey" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - required: true - - variable: encrKey - label: "encrKey" - description: "The Encryption key is needed for tools like volsync if not needed it will be ignored" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "MYSECRETPASSPHRASE" - required: true - - - variable: workload - group: "Workload" - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type (Advanced) - schema: - type: string - default: Deployment - enum: - - value: Deployment - description: Deployment - - value: DaemonSet - description: DaemonSet - - - variable: replicas - label: Replicas (Advanced) - description: Set the number of Replicas - schema: - type: int - show_if: [["type", "!=", "DaemonSet"]] - default: 1 - - - variable: podSpec - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: containers - label: Containers - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: Main Container - schema: - additional_attrs: true - type: dict - attrs: - - - 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]] - - - variable: envList - label: Extra Environment Variables - description: "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting..." - schema: - type: list - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - - variable: value - label: Value - schema: - type: string - - variable: extraArgs - label: Extra Args - schema: - type: list - default: [] - items: - - variable: arg - label: Arg - schema: - type: string - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: command - label: Command - schema: - type: list - default: [] - items: - - variable: param - label: Param - schema: - type: string - - - variable: TZ - label: Timezone - group: "General" - schema: - type: string - default: "Etc/UTC" - $ref: - - "definitions/timezone" - - - variable: podOptions - group: "General" - label: "Global Pod Options (Advanced)" - schema: - additional_attrs: true - type: dict - attrs: - - variable: expertPodOpts - label: "Expert - Pod Options" - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hostNetwork - label: "Host Networking" - schema: - type: boolean - default: false - - variable: dnsConfig - label: "DNS Configuration" - schema: - type: dict - additional_attrs: true - attrs: - - variable: options - label: "Options" - schema: - type: list - default: [{"name": "ndots", "value": "1"}] - items: - - variable: optionsEntry - label: "Option Entry" - schema: - type: dict - additional_attrs: true - attrs: - - variable: name - label: "Name" - schema: - type: string - required: true - - variable: value - label: "Value" - schema: - type: string - - variable: nameservers - label: "Nameservers" - schema: - type: list - default: [] - items: - - variable: nsEntry - label: "Nameserver Entry" - schema: - type: string - required: true - - variable: searches - label: "Searches" - schema: - type: list - default: [] - items: - - variable: searchEntry - label: "Search Entry" - schema: - type: string - required: true - - - variable: imagePullSecretList - group: "General" - label: "Image Pull Secrets" - schema: - type: list - default: [] - items: - - variable: pullsecretentry - label: "Pull Secret" - schema: - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: true - - variable: data - label: Data - schema: - type: dict - additional_attrs: true - attrs: - - variable: registry - label: "Registry" - schema: - type: string - required: true - default: "https://index.docker.io/v1/" - - variable: username - label: "Username" - schema: - type: string - required: true - default: "" - - variable: password - label: "Password" - schema: - type: string - required: true - private: true - default: "" - - variable: email - label: "Email" - schema: - type: string - required: true - default: "" - - - variable: service - group: Services - label: Configure Service(s) - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Service - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "Service's Port(s) Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service Port Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: "Port" - description: "This port exposes the container port on the service" - schema: - type: int - default: 10038 - required: true - - variable: scaleExternalInterface - description: 'Add External Interfaces (Experimental, might change or be removed without further notice)' - label: Add external Interfaces (Experimental) - group: Networking - schema: - type: list - items: - - variable: interfaceConfiguration - description: Interface Configuration - label: Interface Configuration - schema: - additional_attrs: true - type: dict - $ref: - - "normalize/interfaceConfiguration" - attrs: - - variable: hostInterface - description: Please Specify Host Interface - label: Host Interface - schema: - type: string - required: true - $ref: - - "definitions/interface" - - variable: ipam - description: Define how IP Address will be managed - label: IP Address Management - schema: - additional_attrs: true - type: dict - required: true - attrs: - - variable: type - description: Specify type for IPAM - label: IPAM Type - schema: - type: string - required: true - enum: - - value: dhcp - description: Use DHCP - - value: static - description: Use Static IP - - variable: staticIPConfigurations - label: Static IP Addresses - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticIP - label: Static IP - schema: - type: ipaddr - cidr: true - - variable: staticRoutes - label: Static Routes - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticRouteConfiguration - label: Static Route Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: destination - label: Destination - schema: - type: ipaddr - cidr: true - required: true - - variable: gateway - label: Gateway - schema: - type: ipaddr - cidr: false - required: true - - - - variable: serviceList - label: Add Manual Custom Services - group: Services - schema: - type: list - default: [] - items: - - variable: serviceListEntry - label: Custom Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the service - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - value: Simple - description: Deprecated CHANGE THIS - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: advancedsvcset - label: Show Advanced Service Settings - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: externalIPs - label: "External IP's" - description: "External IP's" - schema: - type: list - default: [] - items: - - variable: externalIP - label: External IP - schema: - type: string - - variable: ipFamilyPolicy - label: IP Family Policy - description: Specify the IP Policy - schema: - type: string - default: SingleStack - enum: - - value: SingleStack - description: SingleStack - - value: PreferDualStack - description: PreferDualStack - - value: RequireDualStack - description: RequireDualStack - - variable: ipFamilies - label: IP Families - description: (Advanced) The IP Families that should be used - schema: - type: list - default: [] - items: - - variable: ipFamily - label: IP Family - schema: - type: string - - variable: portsList - label: Additional Service Ports - schema: - type: list - default: [] - items: - - variable: portsListEntry - label: Custom ports - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Port - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Port Name - schema: - type: string - default: "" - - variable: protocol - label: Port Type - schema: - type: string - default: tcp - enum: - - value: http - description: HTTP - - value: https - description: HTTPS - - value: tcp - description: TCP - - value: udp - description: UDP - - variable: targetPort - label: Target Port - description: This port exposes the container port on the service - schema: - type: int - required: true - - variable: port - label: Container Port - schema: - type: int - required: true - - - variable: persistence - label: Integrated Persistent Storage - description: Integrated Persistent Storage - group: Persistence - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: pvc - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - value: iscsi - description: iSCSI Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
    - Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size quotum of Storage (Do NOT REDUCE after installation) - description: This value can ONLY be INCREASED after the installation - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: volsync - label: 'VolSync (Experimental)' - description: Backup, Restore and Synchronise PVC storage - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: VolSyncEntry - label: VolSync Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: "Name of backup configuration" - schema: - type: string - default: "" - required: true - - variable: type - label: Type VolSync/Backup - description: Sets the VolSync Type - schema: - type: string - default: "restic" - enum: - - value: restic - description: Restic - - variable: credentials - label: Credentials - description: "Name of credentials in the credentials section" - schema: - type: string - default: "" - required: true - - variable: dest - label: VolSync Destination (Restore) - description: VolSYnc Destination is the location where data is the reciever and configures recovery of backups - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: src - label: VolSync Source (Backup) - description: VolSYnc Source is the location where data is the sender and creates backups to storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: disabled - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: persistenceList - label: Additional App Storage - group: Persistence - schema: - type: list - default: [] - items: - - variable: persistenceListEntry - label: Custom Storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the storage - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: hostPath - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
    - Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: mountPath - label: Mount Path - description: Path inside the container the storage is mounted - schema: - type: string - default: "" - required: true - valid_chars: '^\/([a-zA-Z0-9._-]+(\s?[a-zA-Z0-9._-]+|\/?))+$' - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size Quotum of Storage - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: volsync - label: 'VolSync (Experimental)' - description: Backup, Restore and Synchronise PVC storage - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: VolSyncEntry - label: VolSync Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: "Name of backup configuration" - schema: - type: string - default: "" - required: true - - variable: type - label: Type VolSync/Backup - description: Sets the VolSync Type - schema: - type: string - default: "restic" - enum: - - value: restic - description: Restic - - variable: credentials - label: Credentials - description: "Name of credentials in the credentials section" - schema: - type: string - default: "" - required: true - - variable: dest - label: VolSync Destination (Restore) - description: VolSYnc Destination is the location where data is the reciever and configures recovery of backups - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: src - label: VolSync Source (Backup) - description: VolSYnc Source is the location where data is the sender and creates backups to storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: "disabled" - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: ingress - label: "" - group: Ingress - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name (Optional) - description: Defaults to chart name - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description (Optional) - description: Defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: icon - label: Icon (Optional) - description: Defaults to chart icon - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - variable: widget - label: Widget Settings - schema: - type: dict - additional_attrs: true - show_if: [["enabled", "=", true]] - attrs: - - variable: enabled - label: Enable Widget - description: When disabled all widget annotations are skipped. - schema: - type: boolean - default: true - - variable: custom - label: Options - schema: - type: dict - additional_attrs: true - attrs: - - variable: key - label: API-key (key) - schema: - type: string - default: "" - - variable: customkv - label: Custom Options - schema: - type: list - default: [] - items: - - variable: option - label: Option - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - default: "" - required: true - - variable: value - label: Value - schema: - type: string - default: "" - required: true - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - - variable: ingressList - label: Add Manual Custom Ingresses - group: Ingress - schema: - type: list - default: [] - items: - - variable: ingressListEntry - label: Custom Ingress - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: ingressClassName - label: IngressClass Name - schema: - type: string - default: "" - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: overrideService - label: Linked Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Service Name - schema: - type: string - default: "" - - variable: port - label: Service Port - schema: - type: int - - variable: tls - label: TLS-Settings - schema: - type: list - default: [] - show_if: [["certificateIssuer", "=", ""]] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: Use Custom Secret (Advanced) - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: "Allow Cross Origin Requests" - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: namespace - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description - description: defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - - variable: securityContext - group: SecurityContext - label: Security Context - schema: - additional_attrs: true - type: dict - attrs: - - variable: container - label: Container - schema: - additional_attrs: true - type: dict - attrs: - # Settings from questions.yaml get appended here on a per-app basis - - - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" - schema: - type: int - default: 568 - - variable: runAsGroup - label: "runAsGroup" - description: "The groupID of the user running the application" - schema: - type: int - default: 568 - # Settings from questions.yaml get appended here on a per-app basis - - variable: PUID - label: Process User ID - PUID - description: When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps - schema: - type: int - show_if: [["runAsUser", "=", 0]] - default: 568 - - variable: UMASK - label: UMASK - description: When supported by the container, this sets the UMASK for the App. Not supported by all Apps - schema: - type: string - default: "0022" - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: privileged - label: "Privileged mode" - schema: - type: boolean - default: false - - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" - schema: - type: boolean - default: true - - - variable: pod - label: Pod - schema: - additional_attrs: true - type: dict - attrs: - - variable: fsGroupChangePolicy - label: "When should we take ownership?" - schema: - type: string - default: OnRootMismatch - enum: - - value: OnRootMismatch - description: OnRootMismatch - - value: Always - description: Always - - variable: supplementalGroups - label: Supplemental Groups - schema: - type: list - default: [] - items: - - variable: supplementalGroupsEntry - label: Supplemental Group - schema: - type: int - # Settings from questions.yaml get appended here on a per-app basis - - - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." - schema: - type: int - default: 568 - - variable: resources - group: Resources - label: "Resource Limits" - schema: - additional_attrs: true - type: dict - attrs: - - variable: limits - label: Advanced Limit Resource Consumption - schema: - additional_attrs: true - type: dict - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 4000m - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: RAM - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 8Gi - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: 'gpu.intel.com/i915' - label: Add Intel i915 GPUs - schema: - type: int - default: 0 - - variable: 'nvidia.com/gpu' - label: Add NVIDIA GPUs (Experimental) - schema: - type: int - default: 0 - - variable: 'amd.com/gpu' - label: Add AMD GPUs - schema: - type: int - default: 0 - - variable: requests - label: "Minimum Resources Required (request)" - schema: - additional_attrs: true - type: dict - hidden: true - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 10m - hidden: true - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: "RAM" - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 50Mi - hidden: true - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: deviceList - label: Mount USB Devices - group: Devices - schema: - type: list - default: [] - items: - - variable: deviceListEntry - label: Device - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Storage - schema: - type: boolean - default: true - - variable: type - label: (Advanced) Type of Storage - description: Sets the persistence type - schema: - type: string - default: device - hidden: true - - variable: readOnly - label: readOnly - schema: - type: boolean - default: false - - variable: hostPath - label: Host Device Path - description: Path to the device on the host system - schema: - type: path - - variable: mountPath - label: Container Device Path - description: Path inside the container the device is mounted - schema: - type: string - default: "/dev/ttyACM0" - - - variable: metrics - group: Metrics - label: Prometheus Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: Main Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - - variable: prometheusRule - label: PrometheusRule - description: Enable and configure Prometheus Rules for the App. - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - # TODO: Rule List section - -# - variable: horizontalPodAutoscaler -# group: Experimental -# label: (Advanced) Horizontal Pod Autoscaler -# schema: -# type: list -# default: [] -# items: -# - variable: hpaEntry -# label: HPA Entry -# schema: -# additional_attrs: true -# type: dict -# attrs: -# - variable: name -# label: Name -# schema: -# type: string -# required: true -# default: "" -# - variable: enabled -# label: Enabled -# schema: -# type: boolean -# default: false -# show_subquestions_if: true -# subquestions: -# - variable: target -# label: Target -# description: Deployment name, Defaults to Main Deployment -# schema: -# type: string -# default: "" -# - variable: minReplicas -# label: Minimum Replicas -# schema: -# type: int -# default: 1 -# - variable: maxReplicas -# label: Maximum Replicas -# schema: -# type: int -# default: 5 -# - variable: targetCPUUtilizationPercentage -# label: Target CPU Utilization Percentage -# schema: -# type: int -# default: 80 -# - variable: targetMemoryUtilizationPercentage -# label: Target Memory Utilization Percentage -# schema: -# type: int -# default: 80 - - variable: networkPolicy - group: Experimental - label: (Advanced) Network Policy - schema: - type: list - default: [] - items: - - variable: netPolicyEntry - label: Network Policy Entry - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - default: "" - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: policyType - label: Policy Type - schema: - type: string - default: "" - enum: - - value: "" - description: Default - - value: ingress - description: Ingress - - value: egress - description: Egress - - value: ingress-egress - description: Ingress and Egress - - variable: egress - label: Egress - schema: - type: list - default: [] - items: - - variable: egressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: to - label: To - schema: - type: list - default: [] - items: - - variable: toEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - variable: ingress - label: Ingress - schema: - type: list - default: [] - items: - - variable: ingressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: from - label: From - schema: - type: list - default: [] - items: - - variable: fromEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - - variable: addons - group: Addons - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: codeserver - label: Codeserver - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: service - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: NodePort - description: Deprecated CHANGE THIS - - value: ClusterIP - description: ClusterIP - - value: LoadBalancer - description: LoadBalancer - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: codeserver - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - default: 36107 - - variable: ingress - label: "Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - variable: scaleCert - label: 'Use TrueNAS SCALE Certificate (Deprecated)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: int - $ref: - - "definitions/certificate" - - variable: envList - label: Codeserver Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: netshoot - label: Netshoot - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: envList - label: Netshoot Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: vpn - label: VPN - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Type - schema: - type: string - default: disabled - enum: - - value: disabled - description: disabled - - value: gluetun - description: Gluetun - - value: tailscale - description: Tailscale - - value: openvpn - description: OpenVPN (Deprecated) - - value: wireguard - description: Wireguard (Deprecated) - - variable: openvpn - label: OpenVPN Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "openvpn"]] - attrs: - - variable: username - label: Authentication Username (Optional) - description: Authentication Username, Optional - schema: - type: string - default: "" - - variable: password - label: Authentication Password - description: Authentication Credentials - schema: - type: string - show_if: [["username", "!=", ""]] - default: "" - required: true - - variable: tailscale - label: Tailscale Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "tailscale"]] - attrs: - - variable: authkey - label: Authentication Key - description: Provide an auth key to automatically authenticate the node as your user account. - schema: - type: string - private: true - default: "" - - variable: auth_once - label: Auth Once - description: Only attempt to log in if not already logged in. - schema: - type: boolean - default: true - - variable: accept_dns - label: Accept DNS - description: Accept DNS configuration from the admin console. - schema: - type: boolean - default: false - - variable: userspace - label: Userspace - description: Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device. - schema: - type: boolean - default: false - - variable: routes - label: Routes - description: Expose physical subnet routes to your entire Tailscale network. - schema: - type: string - default: "" - - variable: dest_ip - label: Destination IP - description: Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched. - schema: - type: string - default: "" - - variable: sock5_server - label: Sock5 Server - description: The address on which to listen for SOCKS5 proxying into the tailscale net. - schema: - type: string - default: "" - - variable: outbound_http_proxy_listen - label: Outbound HTTP Proxy Listen - description: The address on which to listen for HTTP proxying into the tailscale net. - schema: - type: string - default: "" - - variable: extra_args - label: Extra Args - description: Extra Args - schema: - type: string - default: "" - - variable: daemon_extra_args - label: Tailscale Daemon Extra Args - description: Tailscale Daemon Extra Args - schema: - type: string - default: "" - - variable: killSwitch - label: Enable Killswitch - schema: - type: boolean - show_if: [["type", "!=", "disabled"]] - default: true - - variable: excludedNetworks_IPv4 - label: Killswitch Excluded IPv4 networks - description: List of Killswitch Excluded IPv4 Addresses - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv4 - label: IPv4 Network - schema: - type: string - required: true - - variable: excludedNetworks_IPv6 - label: Killswitch Excluded IPv6 networks - description: "List of Killswitch Excluded IPv6 Addresses" - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv6 - label: IPv6 Network - schema: - type: string - required: true - - variable: configFile - label: VPN Config File Location - schema: - type: string - show_if: [["type", "!=", "disabled"]] - default: "" - - - variable: envList - label: VPN Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - max_length: 10240 - - - variable: docs - group: Documentation - label: Please read the documentation at https://truecharts.org - description: Please read the documentation at -
    https://truecharts.org - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDocs - label: I have checked the documentation - schema: - type: boolean - default: true - - variable: donateNag - group: Documentation - label: Please consider supporting TrueCharts, see https://truecharts.org/sponsor - description: Please consider supporting TrueCharts, see -
    https://truecharts.org/sponsor - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDonate - label: I have considered donating - schema: - type: boolean - default: true - hidden: true - diff --git a/incubator/TeslaMate/1.0.3/templates/NOTES.txt b/incubator/TeslaMate/1.0.3/templates/NOTES.txt deleted file mode 100644 index efcb74cb772..00000000000 --- a/incubator/TeslaMate/1.0.3/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/incubator/TeslaMate/1.0.3/templates/_configmap.tpl b/incubator/TeslaMate/1.0.3/templates/_configmap.tpl deleted file mode 100644 index 70d78d4d3fb..00000000000 --- a/incubator/TeslaMate/1.0.3/templates/_configmap.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{{/* Define the configmap */}} -{{- define "teslamate.configmaps" -}} -{{- $rootDir := "dashboards/" -}} -{{- $dirs := dict -}} -{{- range $path, $_ := .Files.Glob (printf "%s**/*.json" $rootDir) }} - {{- $pathElements := splitList "/" $path -}} - {{- $dirName := index $pathElements 1 }} - {{- $existingFiles := get $dirs $dirName | default list -}} - {{- $updatedFiles := append $existingFiles $path -}} - {{- $_ := set $dirs $dirName $updatedFiles }} -{{- end }} - -{{- range $dir, $files := $dirs }} -{{- range $files }} -{{- $fileName := lower (base .) }} -{{- $fileNameWithoutExt := trimSuffix ".json" $fileName }} -{{- $configMapKey := printf "%s-%s-%s" "dashboard" $dir $fileNameWithoutExt }} -{{ $configMapKey | quote }}: - enabled: true - annotations: - k8s-sidecar-target-directory: "TeslaMate" - labels: - grafana_dashboard: "1" - data: - {{ $fileName | quote }}: | -{{ $.Files.Get . | indent 6 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/incubator/TeslaMate/1.0.3/templates/_secrets.tpl b/incubator/TeslaMate/1.0.3/templates/_secrets.tpl deleted file mode 100644 index 5f1092a2032..00000000000 --- a/incubator/TeslaMate/1.0.3/templates/_secrets.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Define the secrets */}} -{{- define "teslamate.secrets" -}} -{{- $secretName := (printf "%s-teslamate-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} - -{{- $encryptionKey := randAlphaNum 64 -}} - - {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} - {{- $encryptionKey = index .data "TESLAMATE_ENCRYPTION_KEY" | b64dec -}} - {{- end }} -enabled: true -data: - TESLAMATE_ENCRYPTION_KEY: {{ $encryptionKey }} -{{- end -}} diff --git a/incubator/TeslaMate/1.0.3/templates/common.yaml b/incubator/TeslaMate/1.0.3/templates/common.yaml deleted file mode 100644 index cf915e29079..00000000000 --- a/incubator/TeslaMate/1.0.3/templates/common.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{/* Make sure all variables are set properly */}} -{{- include "tc.v1.common.loader.init" . -}} - -{{/* Render secrets for teslamate */}} -{{- $secrets := include "teslamate.secrets" . | fromYaml -}} -{{- if $secrets -}} - {{- $_ := set .Values.secret "teslamate-secrets" $secrets -}} -{{- end -}} - -{{/* Render configmaps for dashboards */}} -{{- $configmaps := include "teslamate.configmaps" . | fromYaml -}} -{{- if $configmaps -}} - {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} -{{- end -}} - -{{/* Render the templates */}} -{{- include "tc.v1.common.loader.apply" . -}} diff --git a/incubator/TeslaMate/1.0.3/values.yaml b/incubator/TeslaMate/1.0.3/values.yaml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/incubator/TeslaMate/1.0.4/.helmignore b/incubator/TeslaMate/1.0.4/.helmignore deleted file mode 100644 index feb7464da6f..00000000000 --- a/incubator/TeslaMate/1.0.4/.helmignore +++ /dev/null @@ -1,32 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ -# OWNERS file for Kubernetes -OWNERS -# helm-docs templates -*.gotmpl -# docs folder -/docs -# icon -icon.png -icon.webp -icon-small.webp diff --git a/incubator/TeslaMate/1.0.4/CHANGELOG.md b/incubator/TeslaMate/1.0.4/CHANGELOG.md deleted file mode 100644 index 941abb8a218..00000000000 --- a/incubator/TeslaMate/1.0.4/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -*for the complete changelog, please refer to the website* - -**Important:** \ No newline at end of file diff --git a/incubator/TeslaMate/1.0.4/Chart.yaml b/incubator/TeslaMate/1.0.4/Chart.yaml deleted file mode 100644 index 539c5726739..00000000000 --- a/incubator/TeslaMate/1.0.4/Chart.yaml +++ /dev/null @@ -1,40 +0,0 @@ -annotations: - max_scale_version: 24.04.1 - min_scale_version: 24.04.0 - truecharts.org/SCALE-support: "true" - truecharts.org/category: metrics - truecharts.org/max_helm_version: "3.14" - truecharts.org/min_helm_version: "3.11" - truecharts.org/train: incubator -apiVersion: v2 -appVersion: 1.28.5 -dependencies: - - name: common - version: 23.0.0 - repository: oci://tccr.io/truecharts - condition: "" - alias: "" - tags: [] - import-values: [] -deprecated: false -description: A self-hosted data logger for your Tesla -home: https://truecharts.org/charts/incubator/TeslaMate -icon: https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp -keywords: - - analytics - - monitoring - - metrics - - logs -kubeVersion: ">=1.24.0-0" -maintainers: - - name: TrueCharts - email: info@truecharts.org - url: https://truecharts.org -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 diff --git a/incubator/TeslaMate/1.0.4/README.md b/incubator/TeslaMate/1.0.4/README.md deleted file mode 100644 index 26c9055c690..00000000000 --- a/incubator/TeslaMate/1.0.4/README.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -title: README ---- - -## General Info - -TrueCharts can be installed as both _normal_ Helm Charts or as TrueNAS SCALE Apps. -Both solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible - -For more information about this Chart, please check the docs on the TrueCharts [website](https://truecharts.org/charts/incubator/TeslaMate) - -**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/truecharts/charts/issues/new/choose)** - -## Installation - -### Helm-Chart installation - -To install TrueCharts Helm charts using Helm, you can use our OCI Repository. - -`helm install mychart oci://tccr.io/truecharts/CHARTNAME` - -For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/ - - -### TrueNAS SCALE Apps - -For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the [quick-start guides for TrueNAS SCALE](https://truecharts.org/scale/guides/scale-intro). - -## Configuration Options - -To view the chart specific options, please view Values.yaml included in the chart. - -All our Charts use a shared "common" library chart that contains most of the templating and options. -For the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/ - -## Chart Specific Guides and information - -All our charts have dedicated documentation pages. -The documentation for this chart can be found here: -https://truecharts.org/charts/incubator/TeslaMate - -## Support - - -- See the [Website](https://truecharts.org) -- Check our [Discord](https://discord.gg/tVsPTHWTtr) -- Open a [issue](https://github.com/truecharts/charts/issues/new/choose) - ---- - -## Sponsor TrueCharts - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/general/sponsor) or contributing back to the project any way you can! - -_All Rights Reserved - The TrueCharts Project_ diff --git a/incubator/TeslaMate/1.0.4/app-changelog.md b/incubator/TeslaMate/1.0.4/app-changelog.md deleted file mode 100644 index 13660a941fa..00000000000 --- a/incubator/TeslaMate/1.0.4/app-changelog.md +++ /dev/null @@ -1,59 +0,0 @@ - - -## [teslamate-1.0.4]teslamate-1.0.4 (2024-05-06) - -### Chore - - - -- bump everything to regenerate readme's and site index - -- bump common to release improved checks on volsync and cnpg ([#21454](https://github.com/truecharts/charts/issues/21454)) - -- bump common - -- bump charts to ensure new icons are released - -- bump everything to release new doc pages - -- update groups html ([#21121](https://github.com/truecharts/charts/issues/21121)) - -- bump charts to release new docs to fix broken links - -- update ignored by renovate (patch) ([#21171](https://github.com/truecharts/charts/issues/21171)) - -- update ignored updates to v20.3.11[@dae6129](https://github.com/dae6129) by renovate ([#21059](https://github.com/truecharts/charts/issues/21059)) - -- update ignored updates to v20.3.10[@c2f262c](https://github.com/c2f262c) by renovate ([#21034](https://github.com/truecharts/charts/issues/21034)) - -- update ignored updates to v20.3.9[@370bb36](https://github.com/370bb36) by renovate ([#20917](https://github.com/truecharts/charts/issues/20917)) - -- update ignored updates to v20.3.8[@52f4118](https://github.com/52f4118) by renovate ([#20876](https://github.com/truecharts/charts/issues/20876)) - -- update ignored updates to v20.3.7[@8cf9fc9](https://github.com/8cf9fc9) by renovate ([#20777](https://github.com/truecharts/charts/issues/20777)) - -- update ignored updates to v20.3.6[@27edfed](https://github.com/27edfed) by renovate ([#20711](https://github.com/truecharts/charts/issues/20711)) - -- exclude changelog from pagefind ([#21693](https://github.com/truecharts/charts/issues/21693)) - -### Chore - - - -- rework SCALE catagories/groups to match helm and remove deprecated charts ([#21111](https://github.com/truecharts/charts/issues/21111)) - -### Feat - - - -- Add VolSync support and move CNPG backup credentials on SCALE ([#21443](https://github.com/truecharts/charts/issues/21443)) - -### Fix - - - -- fixup all chart volsync/credentials settings - -- adapt for common cnpg/volsync pathing changes ([#21445](https://github.com/truecharts/charts/issues/21445)) - -- replace serviceexpert with externalinterfaces/networking-group in the SCALE GUI ([#21154](https://github.com/truecharts/charts/issues/21154)) \ No newline at end of file diff --git a/incubator/TeslaMate/1.0.4/app-readme.md b/incubator/TeslaMate/1.0.4/app-readme.md deleted file mode 100644 index eb228d07050..00000000000 --- a/incubator/TeslaMate/1.0.4/app-readme.md +++ /dev/null @@ -1,8 +0,0 @@ -A self-hosted data logger for your Tesla - -This App is supplied by TrueCharts, for more information visit the manual: [https://truecharts.org/charts/incubator/TeslaMate](https://truecharts.org/charts/incubator/TeslaMate) - ---- - -TrueCharts can only exist due to the incredible effort of our staff. -Please consider making a [donation](https://truecharts.org/sponsor) or contributing back to the project any way you can! diff --git a/incubator/TeslaMate/1.0.4/charts/common-23.0.0.tgz b/incubator/TeslaMate/1.0.4/charts/common-23.0.0.tgz deleted file mode 100644 index 0622a806d94b2598dfdd18d54aff29c4facf2e3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 96822 zcmV)SK(fCdiwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0POvHbK5wwFb>b(`V=T7TN}@7$-2wdIoWy~+mrD#j;&)knLY15 zTV9BSB&;cdLx6HLnSA$O;Y#o-$(HS8R@|+LMFNdRqtWPYG#U<>&xwCY_=Oe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uoAhO;|33f#|No)qwPXP73jov*rx*YL diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health-lfp.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health-lfp.json deleted file mode 100644 index 539f070000c..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health-lfp.json +++ /dev/null @@ -1,1448 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1681039491922, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. \n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total energy added" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tround(ceil(sum(charge_energy_added) / ('$aux'::json -> 'MaxCapacity')::text::numeric),0) AS \"Estimated charging cycles\"\nFROM charging_processes WHERE car_id = $car_id;", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data form the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Estimated charging cycles are based on the whole energy added to the battery. So the more data you logged the better. \n", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 29, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n round(('$aux'::json -> 'LastChargekWhAdded')::text::numeric,1) || ' kWh' as \"Last Energy added\",\n round(('$aux'::json -> 'LastMileageAdded')::text::numeric,1) || ' $length_unit' as \"Last Range added\"", - "refId": "LastChanging", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 18, - "y": 6 - }, - "id": 34, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "hidden", - "placement": "bottom" - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Added", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\nSELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id\r\nORDER BY date DESC\r\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "kWh" - }, - "x": "odometer", - "y": "kWh" - }, - { - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km) * ('$aux'::json -> 'RatedEfficiency')::text::float / AVG(c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tGROUP BY 3", - "refId": "Median", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\nWITH\naux\tAS\n(\n\tSELECT cp.charge_energy_added,\n\t\tcp.car_id, cp.charge_energy_added / (cp.end_rated_range_km - cp.start_rated_range_km) * 100.0 AS rated_efficiency,\n\t\t(cp.end_rated_range_km - cp.start_rated_range_km) AS added_range_km\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\tORDER BY cp.end_date DESC \n\tLIMIT 1\n), \nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c\tON cp.id = c.charging_process_id\n INNER JOIN aux ON cp.car_id = aux.car_id\n\t WHERE cp.car_id = $car_id AND cp.charge_energy_added >= aux.rated_efficiency AND cp.end_date >= date_trunc('month', current_date - interval '1 month') \n GROUP BY cp.charge_energy_added, cp.end_date\n ) AS lastEstimatedCapacity\n), \nMaxCapacity AS\n(\n\tSELECT MAX(c.rated_battery_range_km * cars.efficiency * 100.0 / c.usable_battery_level) AS MaxCapacity\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\n\t\tFROM charges\n\t\tGROUP BY charging_process_id) AS last_charges\n\t\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN cars ON cp.car_id = cars.id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.end_rated_range_km > cp.start_rated_range_km\n\t\tAND c.charge_energy_added >= cars. Efficiency\n), \nCurrentRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS timecurrent,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 1 DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t\tsum(rated_battery_range_km) / sum(usable_battery_level) * 100 AS max_rated_range_km\n\tFROM (\n\t\tSELECT battery_level, usable_battery_level, date, rated_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"LastChargekWhAdded\": ', aux.charge_energy_added, \n ', \"LastMileageAdded\" : ', convert_km(aux.added_range_km,'$length_unit'),\n ', \"MaxRange\": ', convert_km(MaxRange.max_rated_range_km,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.rated_range_km,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.MaxCapacity,\n ', \"CurrentCapacity\": ',CurrentCapacity.CurrentCapacity,\n ', \"RatedEfficiency\": ',aux.rated_efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity;\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 16/04/2023\n-- By @jheredianet - Twitter: @juanheredia", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Battery Health - LFP", - "uid": "DuertWeceu", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health.json deleted file mode 100644 index 9db33cbfcf4..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/battery-health.json +++ /dev/null @@ -1,1704 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 32, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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 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 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\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", - "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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current SOC", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health", - "uid": "jchmRiqUfXgTM", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charge-level.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/charge-level.json deleted file mode 100644 index 41af0d8bc8e..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charge-level.json +++ /dev/null @@ -1,263 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100496202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "Charge Level", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tbattery_level AS \"Battery Level\",\n\tusable_battery_level AS \"Usable Battery Level\"\nfrom positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n\tORDER BY Time ASC\n;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-7d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Level", - "uid": "WopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charges.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/charges.json deleted file mode 100644 index 46d4456da3c..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charges.json +++ /dev/null @@ -1,1335 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642763869363, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 8, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "decimals" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "decimals" - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n p.odometer as odometer\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n convert_km(odometer::numeric, '$length_unit') AS odometer_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND max_charger_voltage >= '$voltage'\n AND duration_min >= '$min_duration_min'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 0, - "y": 20 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", charge_energy_added\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy added", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 8, - "y": 20 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", greatest(charge_energy_added, charge_energy_used)\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 8, - "x": 16, - "y": 20 - }, - "id": 13, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT start_date as \"time\", cost\nFROM charging_processes\nWHERE \n $__timeFilter(end_date) AND \n car_id = $car_id AND \n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nORDER BY start_date;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost", - "transparent": true, - "type": "stat" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min duration (minutes) here", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Enter min voltage here", - "name": "voltage", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charges", - "uid": "TSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats-lfp.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats-lfp.json deleted file mode 100644 index 90364ab8931..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats-lfp.json +++ /dev/null @@ -1,1900 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats - LFP", - "uid": "UcjFKmUtpt", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats.json deleted file mode 100644 index 3b176f386ad..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/charging-stats.json +++ /dev/null @@ -1,1920 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658137661652, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_added > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_added)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charged in total", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 10, - "y": 1 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cp.cost)\nFROM\n\tcharging_processes cp\nLEFT JOIN \n\taddresses addr ON addr.id = address_id\nLEFT JOIN\n geofences geo ON geo.id = geofence_id\nWHERE\n $__timeFilter(end_date)\n AND (addr.name ILIKE '%supercharger%' OR geo.name ILIKE '%supercharger%')\n\tAND cp.cost IS NOT NULL\n\tAND cp.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 14, - "y": 1 - }, - "id": 27, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(cost)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Cost", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d8d9da", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 26, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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\tSELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit')\n\tFROM positions\n\tWHERE $__timeFilter(date) AND car_id = $car_id\n) * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "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": 3, - "x": 21, - "y": 1 - }, - "id": 31, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "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", - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average Cost per kWh", - "type": "stat" - }, - { - "cards": {}, - "color": { - "cardColor": "#b4ff00", - "colorScale": "linear", - "colorScheme": "interpolateGreens", - "exponent": 0.5, - "min": 0, - "mode": "opacity" - }, - "dataFormat": "timeseries", - "datasource": "TeslaMate", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "heatmap": {}, - "hideZeroBuckets": false, - "highlightCards": true, - "id": 15, - "legend": { - "show": false - }, - "reverseYBuckets": false, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(start_date),\n\tstart_battery_level,\n\tend_battery_level\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(start_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nORDER BY\n\tstart_date;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Heatmap", - "tooltip": { - "show": true, - "showHistogram": false - }, - "type": "heatmap", - "xAxis": { - "show": true - }, - "yAxis": { - "format": "short", - "logBase": 1, - "max": "100", - "show": true - }, - "yBucketBound": "auto", - "yBucketSize": 10.00001 - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 35, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-green", - "value": null - }, - { - "color": "transparent", - "value": 20 - }, - { - "color": "dark-green", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start SOC" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.fillBelowTo", - "value": "End SOC" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End SOC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - }, - { - "id": "custom.fillBelowTo", - "value": "Start SOC" - }, - { - "id": "custom.lineWidth", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 16, - "options": { - "legend": { - "calcs": [], - "displayMode": "hidden", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges AS (\n\tSELECT\n\t\tstart_date,\n\t\tstart_battery_level,\n\t\tend_battery_level,\n\t\tp.odometer,\n\t\tCOALESCE(\n\t\t\tLAG(p.odometer) OVER (\n\t\t\t\tORDER BY cp.start_date\n\t\t\t),\n\t\t\tp.odometer\n\t\t) as odometer_prev\n\tFROM\n\t\tcharging_processes cp\n\tJOIN positions p\n\tON p.id = cp.position_id\n\tWHERE\n\t\t$__timeFilter(cp.start_date)\n\t\tAND cp.duration_min > 3\n\t\tAND cp.car_id = $car_id\n)\nSELECT\n\tMIN(start_date) as time,\n\tMIN(start_battery_level) as \"Start SOC\",\n\tMAX(end_battery_level) as \"End SOC\"\nFROM charges\nGROUP BY\n\tCASE WHEN odometer - odometer_prev < 2 THEN odometer_prev ELSE odometer END\nORDER BY\n\ttime;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": "6M", - "title": "Charge Delta", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 0, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 0, - "y": 10 - }, - "id": 18, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_added) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - kWh", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-reds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "pct" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_total" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 5, - "y": 10 - }, - "id": 24, - "maxDataPoints": 1, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "tooltip": true, - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "field": "pct", - "fixed": "red" - }, - "opacity": 0.4, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "field": "chg_total", - "fixed": 5, - "max": 30, - "min": 5 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "text": { - "field": "chg_total", - "fixed": "", - "mode": "field" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 15, - "offsetY": 0, - "textAlign": "left", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "Charge location", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.2.0", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charge_data AS (\r\nSELECT COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS loc_nm\r\n, AVG(position.latitude) AS latitude\r\n, AVG(position.longitude) AS longitude\r\n, sum(charge.charge_energy_added) AS chg_total\r\n, count(*) as charges\r\nFROM charging_processes charge\r\nLEFT JOIN addresses address ON charge.address_id = address.id\r\nLEFT JOIN positions position ON charge.position_id = position.id\r\nLEFT JOIN geofences geofence ON charge.geofence_id = geofence.id\r\nWHERE $__timeFilter(charge.start_date) \r\nAND charge.car_id = $car_id\r\nGROUP BY COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))\r\n) \r\nSELECT loc_nm\r\n\t,latitude\r\n\t,longitude\r\n\t,chg_total\r\n\t,chg_total * 1.0 / (SELECT sum(chg_total) FROM charge_data) * 100 AS pct\r\n\t,charges\r\nFROM charge_data", - "refId": "A", - "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" - } - ] - } - ], - "title": "Charging heat map by kWh", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 5, - "x": 19, - "y": 10 - }, - "id": 20, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name"], - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.duration_min,\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 cp.charge_energy_added > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(duration_min) * 60 AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "AC/DC - Duration", - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr", - "seriesBy": "last" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "fieldMinMax": false, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 24, - "x": 0, - "y": 23 - }, - "id": 29, - "links": [], - "options": { - "dims": { - "exclude": ["charging_process_id"], - "frame": 0 - }, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 15, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND charger_power > 0\r\n AND c.fast_charger_present\r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p,start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\n AND c.fast_charger_present\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "DC Charging Curve", - "transformations": [], - "type": "xychart" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 80 - }, - { - "color": "red", - "value": 91 - } - ] - } - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Charges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "max" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 0, - "y": 39 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(end_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n\tROUND(end_battery_level / 5, 0) * 5\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "green", - "value": 20 - } - ] - } - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "# of Discharges" - }, - { - "id": "custom.displayMode", - "value": "gradient-gauge" - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 3, - "x": 3, - "y": 39 - }, - "id": 13, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tROUND(start_battery_level / 5, 0) * 5 AS SOC,\n\tcount(*) AS n\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND duration_min > 3\n\tAND car_id = $car_id\nGROUP BY\n 1\nORDER BY\n\tSOC DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Discharge Stats", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 6, - "y": 39 - }, - "id": 4, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_added) < 1000 THEN SUM(charge_energy_added)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_added) < 1000000 THEN (SUM(charge_energy_added) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_added) >= 1000000 THEN (SUM(charge_energy_added) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_added\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_added) DESC\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "left" - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 9, - "x": 15, - "y": 39 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, CONCAT_WS(' ', address.road, address.house_number)), address.city)) AS location,\n\tsum(cost) as cost\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses address ON c.address_id = address.id\n\tLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n $__timeFilter(end_date) AND\n\tcar_id = $car_id AND\n\tCOST IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC NULLS LAST\nLIMIT 17;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Charging Stations (Cost)", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Stats", - "uid": "-pkIkhmRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/drive-stats.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/drive-stats.json deleted file mode 100644 index ce134792864..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/drive-stats.json +++ /dev/null @@ -1,1148 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1644505954964, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 20, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date_trunc('day', start_date) as \"time\",\n count(*)\nFROM drives\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nGROUP BY 1\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Number of drives", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 16, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', date)::date AS date,\n\t\tmax(odometer) - min(odometer) AS distance\n\tFROM positions\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since) , now(), '1 day'::interval) dd\n)\nSELECT \n $__time(base_line.date), \n convert_km(COALESCE(distance, 0)::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM base_line\nLEFT JOIN actual ON actual.date = base_line.date\nWHERE $__timeFilter(base_line.date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "$length_unit driven", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 22, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(start_date),\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency AS energy\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "kWh used", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 26, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM drives\nWHERE car_id = $car_id AND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance of a drive", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 5 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(distance) AS distance\n\tFROM drives\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.distance, 0) as distance\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT convert_km((percentile_disc(0.5) WITHIN GROUP (ORDER BY distance))::numeric, '$length_unit') AS \"distance_$length_unit\"\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average distance driven per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 5 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH since as (\n\tSELECT date FROM positions\n\tWHERE car_id = $car_id\n\tORDER BY date ASC\n\tLIMIT 1\n),\nactual AS (\n\tSELECT\n\t\tdate_trunc('day', start_date)::date AS date,\n\t\tsum(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency) AS energy\n\tFROM drives\n\tJOIN cars car ON car.id = car_id\n\tWHERE car_id = $car_id\n\tGROUP BY 1\n),\nbase_line AS (\n\tSELECT date_trunc('day', dd)::date AS date\n FROM generate_series((select date from since), NOW(), '1 day'::interval) dd\n),\ncombined as (\n SELECT base_line.date, COALESCE(actual.energy, 0) as energy\n FROM base_line\n LEFT JOIN actual ON actual.date = base_line.date\n WHERE $__timeFilter(base_line.date)\n)\nSELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY energy) AS energy\nFROM combined;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average kWh used per day", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 32, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km((((SELECT odometer FROM last_position) - (SELECT odometer\tFROM first_position)) /\n\tEXTRACT(days FROM (SELECT date FROM last_position) - (SELECT date\tFROM first_position)) * \n\t(365/12))::numeric, '$length_unit') AS \"mileage_$length_unit\";", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated monthly mileage", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "mileage_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mileage_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 30, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH first_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date ASC\n\tLIMIT 1\n),\nlast_position AS (\n\tSELECT date, odometer\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT\n\tconvert_km(((lp.odometer - fp.odometer) /\n\tEXTRACT(days FROM lp.date - fp.date) * \n\t365)::numeric, '$length_unit') AS \"mileage_$length_unit\" from first_position as fp, last_position as lp;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Extrapolated annual mileage", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": {}, - "displayName": "$__cell_0", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 24, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "7.1.4", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:3]), ', ')) as name,\n\tcount(*) AS visited\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE t.car_id = $car_id AND $__timeFilter(t.start_date)\nGROUP BY 1\nORDER BY visited DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Top Destinations", - "type": "bargauge" - } - ], - "refresh": false, - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Stats", - "uid": "_7WkNSyWk", - "version": 1 -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/drives.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/drives.json deleted file mode 100644 index 8113735f987..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/drives.json +++ /dev/null @@ -1,1006 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642770916740, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 110 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kWh" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FFA6B0", - "value": null - }, - { - "color": "#FFCB7D", - "value": 0.65 - }, - { - "color": "#C8F2C2", - "value": 0.99 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_avg_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/(start|end)_path/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_str" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": "❄" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "false": { - "color": "transparent", - "index": 1, - "text": "." - }, - "true": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.width", - "value": 5 - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated consumption may be incorrect and is therefore sometimes hidden.", - "url": "" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n case when (start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level) = true then true else false end as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed,\n power_max\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 $__timeFilter(start_date) AND drives.car_id = $car_id AND convert_km(distance::numeric, '$length_unit') >= $min_dist AND convert_km(distance::numeric, '$length_unit') / NULLIF(duration_min, 0) * 60 >= $min_speed\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_$temp_unit,\n convert_km(avg_speed::numeric, '$length_unit') AS speed_avg_$length_unit,\n power_max,\n reduced_range as has_reduced_range,\n range_diff * car_efficiency as \"consumption_kWh\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit,\n CASE WHEN is_sufficiently_precise THEN distance / range_diff\n ELSE NULL\n END AS efficiency\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Drive", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min distance here", - "name": "min_dist", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Enter min speed here", - "name": "min_speed", - "options": [], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives", - "uid": "Y8upc6ZRk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/efficiency.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/efficiency.json deleted file mode 100644 index 3a2b3439a65..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/efficiency.json +++ /dev/null @@ -1,1227 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1598013087999, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 10, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 4, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (net)", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 8, - "y": 1 - }, - "id": 8, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 16, - "y": 1 - }, - "id": 6, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "outside_temp_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.width", - "value": 125 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "lcd-gauge" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "max", - "value": 1.15 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "total_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "$length_unit" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 200 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Temperature" - } - ] - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH t AS (\n\tSELECT\n\t CASE WHEN '$temp_unit' = 'C' THEN ROUND(cast(outside_temp_avg AS numeric) / 5, 0) * 5 \n\t\t\t WHEN '$temp_unit' = 'F' THEN ROUND(cast(convert_celsius(outside_temp_avg, '$temp_unit') AS numeric) / 10, 0) * 10\n\t\tEND AS outside_temp,\n\t\tsum(start_ideal_range_km - end_ideal_range_km) AS total_ideal_range,\n\t\tsum(start_rated_range_km - end_rated_range_km) AS total_rated_range,\n\t\tsum(distance) AS total_distance,\n\t\tsum(duration_min) as duration,\n\t\tcar_id\n\tFROM\n\t\tdrives\n\tWHERE\n\t\tdistance IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND convert_km(distance::numeric, '$length_unit') >= $min_distance \n\t\tAND start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km > 0.1\n\tGROUP BY\n\t\t1,\n\t\tcar_id\n)\n\nSELECT\n\toutside_temp as outside_temp_$temp_unit,\n total_distance / total_[[preferred_range]]_range AS efficiency,\n\ttotal_[[preferred_range]]_range / total_distance * c.efficiency * 1000 * \n CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END AS consumption_$length_unit,\n convert_km(total_distance::numeric, '$length_unit') as total_distance_$length_unit,\n\t(total_distance / duration) * 60 / (CASE \n WHEN '$length_unit' = 'km' THEN 1 \n WHEN '$length_unit' = 'mi' THEN 1.60934 \n END) avg_speed_$length_unit\nFROM\n\tt\nJOIN cars c ON t.car_id = c.id\nWHERE outside_temp IS NOT NULL\norder by 1 desc\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature – Efficiency", - "type": "table" - }, - { - "cacheTimeout": null, - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": {}, - "decimals": 0, - "mappings": [], - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 2, - "x": 0, - "y": 16 - }, - "id": 14, - "interval": null, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 2, - "y": 16 - }, - "id": 12, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_ideal_range_km - start_ideal_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n count(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_ideal_range_km IS NOT NULL\n AND end_ideal_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived ideal efficiencies", - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "Efficiency" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 5, - "w": 11, - "x": 13, - "y": 16 - }, - "id": 15, - "options": { - "showHeader": true - }, - "pluginVersion": "7.2.1", - "scopedVars": { - "car_id": { - "selected": true, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n round((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric *\n\t CASE WHEN '$length_unit' = 'km' THEN 1.0\n\t WHEN '$length_unit' = 'mi' THEN 1.60934\n\t END, 3) * 1000 as \"efficiency_$length_unit\",\n\tcount(*) as count\nFROM\n charging_processes\nWHERE \n car_id = $car_id\n AND duration_min > 10\n AND end_battery_level <= 95\n AND start_rated_range_km IS NOT NULL\n AND end_rated_range_km IS NOT NULL\n AND charge_energy_added > 0\nGROUP BY\n 1\nORDER BY\n 2 DESC\nLIMIT 3", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Derived rated efficiencies", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": true, - "text": "1", - "value": "1" - }, - "hide": 0, - "includeAll": false, - "label": "min. distance per drive", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": true, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - } - ], - "query": "1, 5, 10, 25, 50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Efficiency", - "uid": "fu4SiQgWz", - "version": 1 -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/charge-details.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/charge-details.json deleted file mode 100644 index 8706c5e162b..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/charge-details.json +++ /dev/null @@ -1,1238 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656106965302, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 100, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charger_voltage" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "displayName", - "value": "Charging Voltage" - }, - { - "id": "unit", - "value": "volt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^range_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_pilot_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current (pilot)" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^outside_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Outdoor Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_phases" - }, - "properties": [ - { - "id": "displayName", - "value": "Phases" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 17, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n battery_level,\n charger_power,\n (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as battery_heater,\n convert_km([[preferred_range]]_battery_range_km, '$length_unit') as range_$length_unit,\n charger_voltage,\n (case when charger_phases = 2 then 3 when charger_phases = 1 then 1 else 0 end) as charger_phases,\n charger_actual_current,\n charger_pilot_current,\n convert_celsius(outside_temp, '$temp_unit') outside_temp_$temp_unit\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Details", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "Added", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 17, - "y": 0 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select coalesce(cp.charge_energy_added, c.charge_energy_added)\r\nfrom charging_processes cp\r\njoin charges c\r\n\ton cp.id = c.charging_process_id\r\nwhere car_id = $car_id\r\nAND cp.id = $charging_process_id\r\nORDER BY c.date desc\r\nfetch first row only", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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": 3, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 6, - "links": [ - { - "title": "Set cost", - "url": "[[base_url:raw]]/charge-cost/${charging_process_id}" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT cost from charging_processes where id = $charging_process_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 7, - "x": 17, - "y": 3 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\nFROM\n\tcharging_processes c\n\tLEFT JOIN addresses ON addresses.id = c.address_id\n\tLEFT JOIN geofences g ON g.id = geofence_id\nWHERE\n\tc.id = $charging_process_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ], - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - } - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 15, - "w": 7, - "x": 17, - "y": 5 - }, - "id": 4, - "links": [], - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "showLegend": false, - "style": { - "color": { - "fixed": "dark-blue" - }, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 7, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "filterData": { - "id": "byRefId", - "options": "A" - }, - "location": { - "latitude": "latitude", - "longitude": "longitude", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "markers" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tunnest(ARRAY[latitude, latitude]) AS latitude,\n\tunnest(ARRAY[longitude, longitude]) AS longitude\nFROM\n\tcharging_processes c\n\tJOIN positions p ON c.position_id = p.id\nWHERE\n\t$__timeFilter(date)\n\tAND c.car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "B" - }, - "properties": [ - { - "id": "custom.show", - "value": "lines" - }, - { - "id": "custom.lineStyle", - "value": { - "fill": "solid" - } - }, - { - "id": "custom.lineWidth", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 19, - "w": 24, - "x": 0, - "y": 20 - }, - "id": 11, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": {}, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "fixed": "blue" - }, - "x": "avg SOC [%]", - "y": "avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"SOC [%]\",\n charger_power as \"Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nORDER BY\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n battery_level as \"avg SOC [%]\",\n avg(charger_power) as \"avg Power [kW]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND charger_power > 0\nGROUP BY\n battery_level, fast_charger_present\nORDER BY\n battery_level ASC ", - "refId": "B", - "select": [ - [ - { - "params": ["odometer"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging curve", - "type": "xychart" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "label": "", - "name": "charging_process_id", - "options": [ - { - "selected": false, - "text": "NULL", - "value": "NULL" - } - ], - "query": "NULL", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charge Details", - "uid": "BHhxFeZRz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/drive-details.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/drive-details.json deleted file mode 100644 index b0b8f9a01c5..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/internal/drive-details.json +++ /dev/null @@ -1,2059 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:31", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1658136653681, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "icon": "", - "tags": [], - "title": "GpxExport", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]/drive/$drive_id/gpx" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "locale" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_kmh$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mph$" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "speed_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "left" - }, - { - "id": "displayName", - "value": "Power" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "usable_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "usable SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_estimated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (est.)" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_km(speed::numeric, '$length_unit') AS speed_[[length_unit]]h,\n\tpower,\n\tbattery_heater::integer,\n\tconvert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range_[[preferred_range]]_[[length_unit]],\n\tconvert_km(est_battery_range_km, '$length_unit') AS range_estimated_[[length_unit]],\n\tbattery_level,\n\tusable_battery_level\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Distance", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT ${__to:date:seconds} - ${__from:date:seconds}", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Selected duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive duration", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 12, - "y": 2 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "displayName": "Consumption", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "yellow", - "value": 200 - }, - { - "color": "red", - "value": 250 - } - ] - }, - "unit": "none" - }, - "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": 2, - "w": 6, - "x": 18, - "y": 2 - }, - "id": 18, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "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 = $drive_id;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 27, - "w": 12, - "x": 12, - "y": 4 - }, - "id": 4, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Map", - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_bar" - }, - "properties": [ - { - "id": "unit", - "value": "pressurebar" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_front_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "front right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_left_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear left" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "tpms_pressure_rear_right_psi" - }, - "properties": [ - { - "id": "unit", - "value": "pressurepsi" - }, - { - "id": "displayName", - "value": "rear right" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 17 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": ["logmin", "max"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n $__time(date),\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS tpms_pressure_front_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS tpms_pressure_front_right_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS tpms_pressure_rear_left_$pressure_unit,\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS tpms_pressure_rear_right_$pressure_unit\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "pos", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "feet" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 25 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tROUND(convert_m(elevation, '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "rgb(210, 203, 203)", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#96D98D", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_c$" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_f$" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "outside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#8AB8FF", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Outside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "inside_temp_.*" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#F2CC0C", - "mode": "fixed" - } - }, - { - "id": "displayName", - "value": "Inside Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "driver_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Driver Temperature" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "passenger_temp_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Passenger Temperature" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "is_climate_on" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Climate" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fan_status" - }, - "properties": [ - { - "id": "displayName", - "value": "Fan status" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 31 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(outside_temp, '$temp_unit') AS outside_temp_$temp_unit,\n\tconvert_celsius(inside_temp, '$temp_unit') AS inside_temp_$temp_unit,\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as driver_temp_$temp_unit,\n\tconvert_celsius(passenger_temp_setting, '$temp_unit') as passenger_temp_$temp_unit,\n is_climate_on::integer,\n\tfan_status\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nORDER BY\n\tdate ASC", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Temperatures", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue" - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 12, - "y": 31 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT CONCAT_WS(' - ', round(convert_km(start_km::numeric, '$length_unit')), round(convert_km(end_km::numeric, '$length_unit'))) ||' $length_unit' as \"Odometer\"\nFROM drives d\nWHERE d.id = $drive_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 12, - "x": 0, - "y": 39 - }, - "id": 20, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": {}, - "textMode": "value_and_name" - }, - "targets": [ - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\nORDER BY\n\tdate ASC\n\t)\n\t\n\nselect convert_m(sum(diff), '$alternative_length_unit') || ' $alternative_length_unit' as \"UP\" from height where diff > 0", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "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\n $__timeFilter(date)\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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation Summary", - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "NULL", - "value": "NULL" - }, - "hide": 2, - "name": "drive_id", - "options": [ - { - "selected": true, - "text": "NULL", - "value": "NULL" - } - ], - "query": "3217", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1", - "value": "1" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "bar", - "value": "bar" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drive Details", - "uid": "zm7wN6Zgz", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate/reports/dutch-tax.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate/reports/dutch-tax.json deleted file mode 100644 index b242b5da143..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate/reports/dutch-tax.json +++ /dev/null @@ -1,515 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1602596446244, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "drive_id" - }, - "properties": [ - { - "id": "custom.width", - "value": 75 - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "ID" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ts" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "start_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "Start Odometer" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "end_(km|mi)" - }, - "properties": [ - { - "id": "custom.width", - "value": 120 - }, - { - "id": "displayName", - "value": "End Odometer" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "displayName", - "value": "End Time" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start|end)_address" - }, - "properties": [ - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "custom.width", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 90 - }, - { - "id": "displayName", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Address" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "End Address" - } - ] - } - ] - }, - "gridPos": { - "h": 24, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start Time" - } - ] - }, - "pluginVersion": "7.2.2", - "repeat": "car_id", - "scopedVars": { - "car_id": { - "selected": false, - "text": "1", - "value": "1" - } - }, - "targets": [ - { - "alias": "", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.id as drive_id,\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n start_km,\n end_km,\n CONCAT_WS(', ', CONCAT_WS(' ', start_address.road, start_address.house_number), start_address.city) AS start_address,\n CONCAT_WS(', ', CONCAT_WS(' ', end_address.road, end_address.house_number), end_address.city) AS end_address,\n duration_min,\n distance\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 cars car ON car.id = drives.car_id\n WHERE $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY drive_id DESC\n)\nSELECT\n drive_id,\n start_date_ts,\n convert_km(start_km::numeric, '$length_unit') as start_$length_unit,\n start_address,\n end_date_ts,\n convert_km(end_km::numeric, '$length_unit') as end_$length_unit,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "table" - } - ], - "schemaVersion": 26, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "rated", - "value": "rated" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "value": null - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/y", - "to": "now/y" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Drives - Dutch tax", - "uid": "lBIoQIggk", - "version": 1 -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/locations.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/locations.json deleted file mode 100644 index 05c61277df3..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/locations.json +++ /dev/null @@ -1,1120 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642771806943, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select count(*) from addresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total addresses", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 20, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT city)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 14, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT state)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 0 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOUNT(DISTINCT country)\nFROM\n\taddresses;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Countries", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - }, - { - "color": "super-light-green", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcity,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tcity IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cities", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "$__cell_0", - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - }, - { - "color": "super-light-orange", - "value": 50 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 3 - }, - "id": 14, - "options": { - "displayMode": "gradient", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tstate,\n\tcount(*) as \"# addresses\"\nFROM\n\taddresses\nWHERE\n\tstate IS NOT NULL\nGROUP BY\n\t1\nORDER BY\n\t2 DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-blue", - "value": null - }, - { - "color": "light-red", - "value": 50 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Date" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "City" - }, - "properties": [ - { - "id": "custom.width" - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 22, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n max(end_date) as \"Date\",\n count(*) as visited,\n COALESCE(g.name, array_to_string(((string_to_array(a.display_name, ', ', ''))[0:2]), ', ')) AS \"Address\",\n\tCOALESCE(city, neighbourhood) as \"City\"\nFROM drives t\nINNER JOIN addresses a ON end_address_id = a.id\nLEFT JOIN geofences g ON end_geofence_id = g.id\nWHERE a.display_name ilike '%$address_filter%' or g.name ilike '%$address_filter%'\nGROUP BY 3,4\nORDER BY visited DESC\nLIMIT 100", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last visited", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "visited": true - }, - "indexByName": {}, - "renameByName": {} - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "updated_at" - }, - "properties": [ - { - "id": "displayName", - "value": "Updated at" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "neighbourhood" - }, - "properties": [ - { - "id": "displayName", - "value": "Neighbourhood" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "city" - }, - "properties": [ - { - "id": "displayName", - "value": "City" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "state" - }, - "properties": [ - { - "id": "displayName", - "value": "State" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "country" - }, - "properties": [ - { - "id": "displayName", - "value": "Country" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 18, - "x": 0, - "y": 22 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n CONCAT('new?lat=', latitude, '&lng=', longitude) as path,\n\tCOALESCE(name, CONCAT(road, ' ', house_number)) AS name,\n\tneighbourhood,\n\tcity,\n\tstate,\n\tcountry\nFROM addresses\nWHERE display_name ilike '%$address_filter%'\nORDER BY inserted_at DESC\nLIMIT 100;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Addresses", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "displayMode": "auto" - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time" - }, - "properties": [ - { - "id": "displayName", - "value": "Time" - }, - { - "id": "unit", - "value": "time: YYYY-MM-DD HH:mm:ss" - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "name" - }, - "properties": [ - { - "id": "displayName", - "value": "Name" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.id.numeric:raw}/edit" - } - ] - }, - { - "id": "custom.align" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 6, - "x": 18, - "y": 22 - }, - "id": 6, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id, name \nFROM geofences \nORDER BY inserted_at DESC\nLIMIT 512;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Geo-fences", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 1, - "includeAll": true, - "label": "Car", - "multi": true, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Address", - "name": "address_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Locations", - "uid": "ZzhF-aRWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/mileage.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/mileage.json deleted file mode 100644 index 16b27614c75..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/mileage.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1656100778202, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "mileage_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Mileage" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["min", "max"], - "displayMode": "table", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH o AS (SELECT\n start_date AS time,\n car_id,\n start_km AS \"odometer\"\nFROM drives\nUNION ALL\nSELECT\n end_date,\n car_id,\n end_km AS \"odometer\"\nFROM drives)\n\nSELECT\n time, \n convert_km(odometer::numeric, '$length_unit') as mileage_$length_unit\nFROM o\nWHERE\n\tcar_id = $car_id AND\n\t$__timeFilter(time)\norder by 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "timeseries" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage", - "uid": "NjtMTFggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview-lfp.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview-lfp.json deleted file mode 100644 index 2c5f42578b5..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview-lfp.json +++ /dev/null @@ -1,1631 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 170, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Drive details", - "url": "/d/zm7wN6Zgz/drive-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?orgId=1" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Details", - "url": "/d/BHhxFeZRz/charge-details?orgId=1" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview - LFP", - "uid": "EVzVGnwSq", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview.json deleted file mode 100644 index 0848c5211d5..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/overview.json +++ /dev/null @@ -1,1640 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656103268002, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 18, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 4, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 260, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 10, - "links": [], - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_voltage\n ELSE 0\n END AS \"Charging Voltage [V]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Voltage", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 250, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 11, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charging_process AS (\n SELECT id, end_date\n FROM charging_processes\n WHERE car_id = $car_id\n ORDER BY start_date DESC\n LIMIT 1\n)\nSELECT\n $__time(date),\n CASE WHEN charging_process.end_date IS NULL THEN charger_power\n ELSE 0\n END AS \"Power [kW]\"\nFROM charges, charging_process\nWHERE charging_process.id = charging_process_id\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging kW", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 13, - "links": [ - { - "targetBlank": true, - "title": "Charge Level", - "url": "/d/WopVO_mgz/charge-level?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level AS \"SOC\"\nFROM (\n\tSELECT battery_level, date\n\tFROM positions\n\tWHERE car_id = $car_id AND $__timeFilter(date)\n\tUNION ALL\n\tSELECT battery_level, date\n\tFROM charges c \n JOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE $__timeFilter(date) AND p.car_id = $car_id) AS data\nORDER BY date ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charge Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 22, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Net", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Gross", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 8 - }, - "id": 2, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id \norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 8 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Charging Voltage [V]" - }, - "properties": [ - { - "id": "min", - "value": 0 - }, - { - "id": "max", - "value": 250 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charger_actual_current" - }, - "properties": [ - { - "id": "displayName", - "value": "Current" - }, - { - "id": "unit", - "value": "amp" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy added" - }, - { - "id": "unit", - "value": "kwatth" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 15, - "x": 9, - "y": 8 - }, - "id": 15, - "links": [ - { - "targetBlank": true, - "title": "Charging Stats", - "url": "/d/-pkIkhmRz/charging-stats?${__url_time_range}" - } - ], - "options": { - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom" - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_power,\n (case when battery_heater_on then 1 else 0 end) as battery_heater,\n charger_actual_current,\n c.charge_energy_added\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n charger_voltage as \"Charging Voltage [V]\"\nFROM\n charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id\nORDER BY\n date ASC", - "refId": "C", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Details", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 11 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 11 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 6, - "y": 11 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND date AT TIME ZONE 'Etc/UTC' >= (NOW() - interval '60m')\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 20, - "links": [ - { - "targetBlank": true, - "title": "States", - "url": "/d/xo4BNRkZz/states?orgId=1&${__url_time_range}" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Overview", - "uid": "kOuP_Fggz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/projected-range.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/projected-range.json deleted file mode 100644 index e2032ed2dd9..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/projected-range.json +++ /dev/null @@ -1,772 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - }, - { - "datasource": "TeslaMate", - "enable": false, - "hide": false, - "iconColor": "rgba(255, 96, 96, 1)", - "limit": 100, - "name": "Charged", - "rawQuery": "SELECT\n$__time(start_date),\nend_date as timeend,\nconcat('Charged: ',round(cast(charge_energy_added as numeric),2),' kWh') AS text\nFROM charging_processes\nWHERE\n$__timeFilter(start_date) AND duration_min > 5\nORDER BY start_date DESC", - "showIn": 0, - "tags": [], - "type": "tags" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Mileage.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Mileage" - }, - { - "id": "min" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, [[interval]]) AS time,\n\tconvert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') AS \"Projected [[preferred_range]] range [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nhaving convert_km((sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100)::numeric, '$length_unit') is not null\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(avg(odometer)::numeric, '$length_unit') AS \"Mileage [$length_unit]\"\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Mileage", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Battery.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "max", - "value": 100 - }, - { - "id": "custom.axisLabel", - "value": "Battery Level" - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 22 - }, - "id": 6, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level)[$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n\t$__timeGroup(date,[[interval]]) AS time,\n avg(battery_level) AS \"Battery Level [%]\", avg(coalesce(usable_battery_level, battery_level)) as \"Usable Battery Level [%]\"\nfrom\n (SELECT\n battery_level, usable_battery_level\n , date\n FROM\n positions\n WHERE\n car_id = $car_id AND\n $__timeFilter(date) and ideal_battery_range_km is not null\n UNION ALL\n select\n battery_level, null as usable_battery_level\n , date\n from charges c\njoin\n charging_processes p ON p.id = c.charging_process_id \nWHERE\n $__timeFilter(date) and\n p.car_id = $car_id) as data\n\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Battery Level", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Projected Range", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 200, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/Temp.*/" - }, - "properties": [ - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.axisLabel", - "value": "Temp" - }, - { - "id": "min" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using usable_battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#56A64B", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*using battery_level.*/" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#C8F2C2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 43 - }, - "id": 5, - "links": [], - "options": { - "legend": { - "calcs": ["mean", "max", "min"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "10.2.1", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(coalesce(usable_battery_level,battery_level)) * 100, '$length_unit') AS \"Projected Range (using usable_battery_level) [$length_unit]\",\n\tconvert_km(sum([[preferred_range]]_battery_range_km) / sum(battery_level) * 100, '$length_unit') AS \"Projected Range (using battery_level) [$length_unit]\"\nFROM\n\t(\n select battery_level, usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from positions\n where\n car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\n union all\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date,\n rated_battery_range_km, ideal_battery_range_km, outside_temp\n from charges c\n join\n charging_processes p ON p.id = c.charging_process_id \n where\n $__timeFilter(date) and p.car_id = $car_id\n ) as data\n\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date,[[interval]]) AS time,\n\tavg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor Temperature [°$temp_unit]\"\n\nFROM\n\tpositions\nWHERE\n\t$__timeFilter(date) and\n\tcar_id = $car_id and ideal_battery_range_km is not null\nGROUP BY\n\t1\nORDER BY\n\t1,2 DESC", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Projected Range - Outdoor Temp", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 36, - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "auto": false, - "auto_count": 30, - "auto_min": "10s", - "current": { - "selected": false, - "text": "6h", - "value": "6h" - }, - "hide": 1, - "label": "Time Resolution", - "name": "interval", - "options": [ - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "15m", - "value": "15m" - }, - { - "selected": false, - "text": "30m", - "value": "30m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "3h", - "value": "3h" - }, - { - "selected": true, - "text": "6h", - "value": "6h" - } - ], - "query": "5m,15m,30m,1h,3h,6h", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Projected Range", - "uid": "riqUfXgRz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/states.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/states.json deleted file mode 100644 index 95e38b0635c..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/states.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642780620514, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 16, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsLocal" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "based on any data ever recorded.", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select 1 - sum(duration_min) / (EXTRACT(EPOCH FROM (max(end_date) - min(start_date))) / 60), 1 as time from drives where car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "parked (%)", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "lineWidth": 0 - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 14, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom" - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "state-timeline" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-2d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "States", - "uid": "xo4BNRkZz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/statistics.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/statistics.json deleted file mode 100644 index d3dd8f2d54e..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/statistics.json +++ /dev/null @@ -1,971 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642773094879, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "displayMode": "auto", - "filterable": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 195 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy charged" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg cost per kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 137 - } - ] - } - ] - }, - "gridPos": { - "h": 18, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "maxPerRow": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "8.3.4", - "repeatDirection": "h", - "targets": [ - { - "format": "table", - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "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", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "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", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "per ${period}", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_kwh", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_consumption_kwh" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_km", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "avg_cost_mi", - "binary": { - "left": "cost_charges", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": false, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_cost_km": 19, - "avg_cost_mi": 20, - "avg_cost_kwh": 11, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 17, - "date_to": 18, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 15, - "efficiency_charged_net_mi": 16, - "efficiency_net_km": 13, - "efficiency_net_mi": 14, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_cost_km": "Avg cost per km", - "avg_cost_mi": "Avg cost per mi", - "avg_cost_kwh": "Avg cost per kWh", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - }, - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - } - ], - "query": "day,week,month,year", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "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" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "browser", - "title": "Statistics", - "uid": "1EZnXszMk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/timeline.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/timeline.json deleted file mode 100644 index 7c19e598087..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/timeline.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642862616523, - "links": [ - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["tesla"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Start" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 180 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.start_date_ts}&to=${__data.fields.end_date_ts}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SoC Diff" - }, - "properties": [ - { - "id": "custom.width", - "value": 70 - }, - { - "id": "unit", - "value": "percent" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_path" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "kWh" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.width", - "value": 152 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Duration" - }, - "properties": [ - { - "id": "unit", - "value": "m" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Start Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "End Address" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path:raw}" - } - ] - }, - { - "id": "custom.filterable", - "value": true - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date_ts" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_f/" - }, - "properties": [ - { - "id": "unit", - "value": "fahrenheit" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/odometer_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Odometer" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/distance_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_diff_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range Diff" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/outside_temp_avg_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.width", - "value": 100 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/end_range_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Range" - }, - "properties": [ - { - "id": "custom.width", - "value": 118 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Action" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Slot details", - "url": "${__data.fields.slotlink:raw}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "slotlink" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 22, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Start" - } - ] - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🚗 Driving' AS \"Action\",\r\n drives.duration_min AS \"Duration\",\r\n CASE WHEN start_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(start_geofence_id, '/edit')\r\n END AS start_path,\r\n CASE WHEN end_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n WHEN start_geofence_id IS NOT NULL THEN CONCAT(end_geofence_id, '/edit')\r\n END AS end_path,\r\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\",\r\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\",\r\n convert_km(end_km::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n convert_km(distance::NUMERIC, '$length_unit') AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n TP2.battery_level AS \"SoC\",\r\n TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/zm7wN6Zgz/drive-details?from=', ROUND(EXTRACT(EPOCH FROM start_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date))*1000, '&var-car_id=', drives.car_id, '&var-drive_id=', drives.id) AS slotlink\r\nFROM drives\r\n LEFT OUTER JOIN positions AS TP1 on drives.start_position_id = TP1.id\r\n LEFT OUTER JOIN positions AS TP2 on drives.end_position_id = TP2.id\r\n LEFT JOIN addresses start_address ON start_address_id = start_address.id\r\n LEFT JOIN addresses end_address ON end_address_id = end_address.id\r\n LEFT JOIN geofences start_geofence ON start_geofence_id = start_geofence.id\r\n LEFT JOIN geofences end_geofence ON end_geofence_id = end_geofence.id\r\n JOIN cars ON cars.id = drives.car_id\r\nWHERE \r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND '🚗 Driving' in ($action_filter)\r\n AND\r\n (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%' or\r\n COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city))::TEXT like '%$text_filter%')\r\n\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts,\r\n '🔋 Charging' AS \"Action\",\r\n charging_processes.duration_min AS \"Duration\",\r\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', address.latitude, '&lng=', address.longitude)\r\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n charging_processes.charge_energy_added AS \"kWh\",\r\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit, \r\n end_battery_level AS \"SoC\",\r\n end_battery_level - start_battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/BHhxFeZRz/charge-details?from=', ROUND(EXTRACT(EPOCH FROM start_date)-10)*1000, '&to=', ROUND(EXTRACT(EPOCH FROM end_date)+10)*1000, '&var-car_id=', charging_processes.car_id, '&var-charging_process_id=', charging_processes.id) AS slotlink\r\nFROM charging_processes\r\n INNER JOIN positions AS position ON position_id = position.id\r\n LEFT JOIN addresses address ON address_id = address.id\r\n LEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n $__timeFilter(charging_processes.start_date)\r\n AND charging_processes.charge_energy_added > 0\r\n AND charging_processes.car_id = $car_id\r\n AND '🔋 Charging' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nUNION\r\nSELECT\r\n d.end_date AS \"Start\",\r\n LEAD(d.start_date) over w AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM d.end_date)) * 1000 AS start_date_ts,\r\n ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000 AS end_date_ts,\r\n '🅿️ Parking' AS \"Action\",\r\n EXTRACT(EPOCH FROM LEAD(d.start_date) over w - d.end_date)/60 AS \"Duration\",\r\n CASE WHEN d.end_geofence_id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\r\n WHEN d.end_geofence_id IS NOT NULL THEN CONCAT(d.end_geofence_id, '/edit')\r\n END AS start_path,\r\n NULL AS end_path,\r\n COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS \"Start Address\",\r\n '' AS \"End Address\",\r\n convert_km(end_position.odometer::NUMERIC, '$length_unit') AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n convert_km(LEAD(d.start_[[preferred_range]]_range_km) over w::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') * efficiency AS \"kWh\",\r\n convert_km(((LEAD(d.start_[[preferred_range]]_range_km) over w + (LEAD(d.start_km) over w - d.end_km)) - d.end_[[preferred_range]]_range_km)::NUMERIC, '$length_unit') AS range_diff_$length_unit,\r\n LEAD(start_position.battery_level) over w AS \"SoC\",\r\n LEAD(start_position.battery_level) over w - end_position.battery_level AS \"SoC Diff\",\r\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\r\n CONCAT('d/FkUpJpQZk/trip?from=', ROUND(EXTRACT(EPOCH FROM d.end_date))*1000, '&to=', ROUND(EXTRACT(EPOCH FROM LEAD(d.start_date) over w))*1000, '&var-car_id=', d.car_id) AS slotlink\r\nFROM\r\n drives AS d\r\n LEFT OUTER JOIN positions start_position on d.start_position_id = start_position.id\r\n LEFT OUTER JOIN positions end_position on d.end_position_id = end_position.id\r\n LEFT JOIN addresses address ON d.end_address_id = address.id\r\n LEFT JOIN geofences geofence ON d.end_geofence_id = geofence.id\r\n JOIN cars ON cars.id = d.car_id\r\nWHERE\r\n $__timeFilter(d.end_date)\r\n AND d.car_id=$car_id\r\n AND '🅿️ Parking' in ($action_filter)\r\n AND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city))::TEXT like '%$text_filter%'\r\nWINDOW w as (ORDER BY d.id ASC)\r\n\r\nUNION\r\nSELECT\r\n\tT1.end_date +(1 * interval '1 second') AS \"Start\", -- added 1 sec to get it after the corresponding Parking row\r\n\tT2.start_date AS \"End\",\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS start_date_ts,\r\n\tROUND(EXTRACT(EPOCH FROM T2.start_date)) * 1000 - 1 AS end_date_ts,\r\n\t'❓ Missing' AS \"Action\",\r\n\t-- EXTRACT(EPOCH FROM T2.start_date - T1.end_date)/60 AS \"Duration\",\r\n\tNULL AS \"Duration\",\r\n\tCASE WHEN T1.end_geofence_id IS NULL THEN CONCAT('new?lat=', TP1.latitude, '&lng=', TP1.longitude)\r\n\t\tWHEN T1.end_geofence_id IS NOT NULL THEN CONCAT(T1.end_geofence_id, '/edit')\r\n\tEND AS start_path,\r\n\tCASE WHEN T2.start_geofence_id IS NULL THEN CONCAT('new?lat=', TP2.latitude, '&lng=', TP2.longitude)\r\n\t\tWHEN T2.start_geofence_id IS NOT NULL THEN CONCAT(T2.start_geofence_id, '/edit')\r\n\tEND AS end_path,\r\n\tCOALESCE(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\",\r\n\tCOALESCE(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\",\r\n\tconvert_km(TP2.odometer::INTEGER, '$length_unit') AS odometer_$length_unit,\r\n\tconvert_km((TP2.odometer - TP1.odometer)::INTEGER, '$length_unit') AS distance_$length_unit,\r\n convert_km(T2.end_[[preferred_range]]_range_km::NUMERIC, '$length_unit') AS end_range_$length_unit,\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit')::INTEGER * efficiency AS \"kWh\",\r\n\tconvert_km(((TP2.[[preferred_range]]_battery_range_km + (TP2.odometer - TP1.odometer)) - TP1.[[preferred_range]]_battery_range_km)::INTEGER, '$length_unit') AS range_diff_$length_unit,\r\n\tNULL AS \"SoC\",\r\n\tNULL AS \"SoC Diff\",\r\n\tNULL AS outside_temp_avg_$temp_unit,\r\n\tNULL AS slotlink\r\n\t-- TP2.battery_level AS \"SoC\",\r\n\t-- TP2.battery_level-TP1.battery_level AS \"SoC Diff\",\r\n\t-- (T1.outside_temp_avg+T2.outside_temp_avg)/2 AS outside_temp_avg_$temp_unit\r\nFROM\r\n\t(SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives) AS T1\r\n\tLEFT OUTER JOIN (SELECT row_number() over(ORDER BY start_date) AS time_id, * FROM drives ) AS T2 on T1.time_id + 1 = T2.time_id\r\n\tLEFT OUTER JOIN positions AS TP1 on T1.end_position_id = TP1.id\r\n\tLEFT OUTER JOIN positions AS TP2 on T2.start_position_id = TP2.id\r\n\tLEFT JOIN addresses start_address ON T1.end_address_id = start_address.id\r\n\tLEFT JOIN addresses end_address ON T2.start_address_id = end_address.id\r\n\tLEFT JOIN geofences start_geofence ON T1.end_geofence_id = start_geofence.id\r\n\tLEFT JOIN geofences end_geofence ON T2.start_geofence_id = end_geofence.id\r\n\tJOIN cars ON cars.id = T2.car_id\r\nWHERE\r\n\t$__timeFilter(T1.end_date)\r\n\tAND T1.car_id=$car_id \r\n\tAND T2.car_id=$car_id \r\n\tAND TP2.car_id=$car_id \r\n\tAND TP1.car_id=$car_id \r\n\tAND TP2.odometer - TP1.odometer > 0.5\r\n\tAND T1.end_address_id <> T2.start_address_id AND ((T1.end_geofence_id IS NOT NULL OR T2.end_geofence_id IS NOT NULL) OR T1.end_geofence_id <> T2.start_geofence_id)\r\n\tAND '❓ Missing' in ($action_filter)\r\n\tAND (\r\n\t (COALESCE(start_geofence.name, CONCAT_WS(', ', COALESCE(start_address.name, nullif(CONCAT_WS(' ', start_address.road, start_address.house_number), '')), start_address.city))::TEXT like '%$text_filter%') or\r\n\t (COALESCE(end_geofence.name, CONCAT_WS(', ', COALESCE(end_address.name, nullif(CONCAT_WS(' ', end_address.road, end_address.house_number), '')), end_address.city)))::TEXT like '%$text_filter%')\r\nUNION\r\nSELECT\r\n start_date AS \"Start\",\r\n end_date AS \"End\",\r\n ROUND(EXTRACT(EPOCH FROM start_date))*1000 AS start_date_ts, \r\n ROUND(EXTRACT(EPOCH FROM end_date))*1000 AS end_date_ts, \r\n '💾 Updating' AS \"Action\",\r\n\tEXTRACT(EPOCH FROM end_date - start_date)/60 AS \"Duration\",\r\n NULL AS start_path,\r\n NULL AS end_path,\r\n version AS \"Start Address\",\r\n '' AS \"End Address\",\r\n NULL AS odometer_$length_unit,\r\n NULL AS distance_$length_unit,\r\n NULL AS end_range_$length_unit,\r\n NULL AS \"kWh\",\r\n NULL AS range_diff_$length_unit,\r\n NULL AS \"SoC\",\r\n NULL AS \"SoC Diff\",\r\n NULL AS outside_temp_avg_$temp_unit,\r\n CONCAT('https://www.notateslaapp.com/software-updates/version/', split_part(version, ' ', 1), '/release-notes') AS slotlink\r\nFROM updates\r\nWHERE \r\n $__timeFilter(start_date)\r\n AND car_id = $car_id \r\n AND '💾 Updating' in ($action_filter)\r\n AND version::TEXT like '%$text_filter%'\r\n\r\nORDER BY \"Start\" DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "candata", - "timeColumn": "datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "transformations": [ - { - "id": "organize", - "options": { - "excludeByName": { - "End": true, - "start_date_ts": false - }, - "indexByName": { - "Action": 2, - "Duration": 7, - "End": 1, - "End Address": 4, - "SoC": 15, - "SoC Diff": 16, - "Start": 0, - "Start Address": 3, - "distance_km": 8, - "distance_mi": 9, - "end_date_ts": 22, - "end_path": 20, - "end_range_km": 10, - "end_range_mi": 11, - "kWh": 13, - "odometer_km": 5, - "odometer_mi": 6, - "outside_temp_avg_c": 17, - "outside_temp_avg_f": 18, - "range_diff_km": 12, - "range_diff_mi": 13, - "start_date_ts": 21, - "start_path": 19 - }, - "renameByName": { - "action": "", - "end_address": "End", - "km_diff": "Km", - "kwh": "", - "minutediff": "Time", - "odometer": "", - "outside_temp_avg": "Temperature", - "rangediff": "Range Difference", - "soc": "", - "soc_diff": "SoC Difference", - "start_address": "Start", - "start_date": "Date", - "start_date_ts": "" - } - } - } - ], - "type": "table" - } - ], - "refresh": "1h", - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Action", - "multi": true, - "name": "action_filter", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "🚗 Driving", - "value": "🚗 Driving" - }, - { - "selected": false, - "text": "🔋 Charging", - "value": "🔋 Charging" - }, - { - "selected": false, - "text": "🅿️ Parking", - "value": "🅿️ Parking" - }, - { - "selected": false, - "text": "❓ Missing", - "value": "❓ Missing" - }, - { - "selected": false, - "text": "💾 Updating", - "value": "💾 Updating" - } - ], - "query": "🚗 Driving,🔋 Charging,🅿️ Parking,❓ Missing,💾 Updating", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "hide": 0, - "label": "Text Filter", - "name": "text_filter", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-14d", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "Timeline", - "uid": "SUBgwtigz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/trip.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/trip.json deleted file mode 100644 index e057c567268..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/trip.json +++ /dev/null @@ -1,2643 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:30", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "iteration": 1656104359102, - "links": [ - { - "icon": "doc", - "tags": [], - "targetBlank": true, - "title": "Select last three drives", - "type": "link", - "url": "/d/FkUpJpQZk?from=$from" - }, - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 13, - "w": 13, - "x": 0, - "y": 1 - }, - "id": 6, - "maxDataPoints": 500, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": "TeslaMate", - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s') AS time,\n\tavg(latitude) AS latitude,\n\tavg(longitude) AS longitude\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n\t$__timeFilter(date)\nGROUP BY\n\t1\nORDER BY\n\t1 ASC", - "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" - } - ] - } - ], - "transformations": [], - "transparent": true, - "type": "geomap" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 1 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\nFROM positions\nWHERE car_id = $car_id AND $__timeFilter(date)\nORDER BY 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 1, - "mappings": [], - "unit": "dtdurations" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "charging (AC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#73BF69", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging (DC)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FADE2A", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "driving" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#5794F2", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 19, - "y": 1 - }, - "id": 38, - "links": [], - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent"], - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tnow() AS time,\n\tsum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec,\n\t'driving' as metric\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date);", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n \textract(epoch FROM LEAST(end_date, $__timeTo()) - GREATEST(start_date, $__timeFrom())) as duration_sec,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'charging (DC)'\n\t\t\t\t ELSE 'charging (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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ncharges_total AS (\n SELECT\n \tsum(duration_sec) AS duration_sec,\n \tcurrent AS metric\n FROM charges_current\n GROUP BY 2\n ORDER BY metric\n)\n\nSELECT\n\tnow() AS time,\n\tcoalesce(duration_sec, 0) as duration_sec,\n metric\nFROM\n\tcharges_total;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "excl. breaks" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 3 - }, - "id": 26, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n convert_km(sum(end_position.odometer - start_position.odometer)::numeric, '$length_unit') / (sum(extract(epoch FROM end_position.date - start_position.date)) / 3600) as \"speed_$length_unit\"\nFROM\n\tdrives\n\tJOIN positions start_position ON start_position_id = start_position.id\n\tJOIN positions end_position ON end_position_id = end_position.id\nWHERE\n\tdrives.car_id = $car_id\n\tAND $__timeFilter(start_date)", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "displayName", - "value": "incl. DC charging" - } - ] - } - ] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 13, - "y": 5 - }, - "id": 28, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH dc_charges AS (\n SELECT\n\t\tcp.id,\n extract(epoch FROM cp.end_date - cp.start_date) as duration_sec,\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 cp.charge_energy_added > 0\n AND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n),\n\ndata AS (\n (\n SELECT\n sum(end_position.odometer - start_position.odometer) as distance, \n sum(extract(epoch FROM end_position.date - start_position.date)) as duration_sec\n FROM\n drives\n JOIN positions start_position ON start_position_id = start_position.id\n JOIN positions end_position ON end_position_id = end_position.id\n WHERE\n drives.car_id = $car_id\n AND $__timeFilter(start_date)\n ) UNION ALL (\n SELECT\n NULL as distance,\n sum(duration_sec)\n FROM\n dc_charges\n WHERE\n current = 'DC'\n )\n)\n\nSELECT convert_km(sum(distance)::numeric, '$length_unit') / (sum(duration_sec) / 3600) as \"speed_$length_unit\"\nfrom data", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "net" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "net" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 13, - "y": 7 - }, - "id": 30, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\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 \"consumption_$length_unit\"\nFROM drives\nJOIN cars car ON car.id = car_id\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "displayName", - "value": "gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "displayName", - "value": "gross" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 16, - "y": 7 - }, - "id": 32, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "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": 9 - }, - "id": 22, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["lastNotNull"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "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" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "displayName": "${__cell_0}", - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-orange", - "value": 100 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 11, - "x": 13, - "y": 11 - }, - "id": 40, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n\tSELECT range_loss FROM range_loss_between_charges\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_before_first_charge\n\tUNION ALL\n\tSELECT range_loss FROM range_loss_after_last_charge\n)\n\nSELECT 'used' as metric, sum(range_loss * c.efficiency) AS value\nFROM total_range_loss\nLEFT JOIN cars c ON c.id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_current AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added as energy_added,\n\t\tCASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'added (DC)'\n\t\t\t\t ELSE 'added (AC)'\n\t\tEND AS metric\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 cp.charge_energy_added > 0\n \tAND ($__timeFilter(start_date) OR $__timeFilter(end_date))\n GROUP BY 1,2\n)\n\nSELECT metric, sum(energy_added) AS energy_added\nFROM charges_current\nGROUP BY 1\nORDER BY 1 DESC;", - "refId": "B", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": "TeslaMate", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 20, - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "mergeValues": true, - "rowHeight": 1, - "showValue": "never", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "transparent": true, - "type": "state-timeline" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View drive details", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-drive_id=${__data.fields.drive_id.numeric}" - } - ] - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.start_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_address" - }, - "properties": [ - { - "id": "displayName", - "value": "Destination" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.end_path}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "links", - "value": [ - { - "title": "${__data.fields.duration_str}", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% Start" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "% End" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "(start_path|end_path|duration_str|car_id|drive_id)" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n round(extract(epoch FROM start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM end_date)) * 1000 AS end_date_ts,\n car.id as car_id,\n CASE WHEN start_geofence.id IS NULL THEN CONCAT('new?lat=', start_position.latitude, '&lng=', start_position.longitude)\n WHEN start_geofence.id IS NOT NULL THEN CONCAT(start_geofence.id, '/edit')\n END as start_path,\n CASE WHEN end_geofence.id IS NULL THEN CONCAT('new?lat=', end_position.latitude, '&lng=', end_position.longitude)\n WHEN end_geofence.id IS NOT NULL THEN CONCAT(end_geofence.id, '/edit')\n END as end_path,\n TO_CHAR((duration_min * INTERVAL '1 minute'), 'HH24:MI') as duration_str,\n drives.id as drive_id,\n -- Columns\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 duration_min,\n distance,\n start_position.usable_battery_level as start_usable_battery_level,\n start_position.battery_level as start_battery_level,\n end_position.usable_battery_level as end_usable_battery_level,\n end_position.battery_level as end_battery_level,\n start_position.battery_level != start_position.usable_battery_level OR end_position.battery_level != end_position.usable_battery_level as reduced_range,\n duration_min > 1 AND distance > 1 AND ( \n start_position.usable_battery_level IS NULL OR end_position.usable_battery_level IS NULL\tOR\n (end_position.battery_level - end_position.usable_battery_level) = 0 \n ) as is_sufficiently_precise,\n NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) as range_diff,\n car.efficiency as car_efficiency,\n outside_temp_avg,\n distance / NULLIF(duration_min, 0) * 60 AS avg_speed\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 $__timeFilter(start_date) AND drives.car_id = $car_id\n ORDER BY start_date DESC\n)\nSELECT\n start_date_ts,\n end_date_ts,\n car_id,\n start_path,\n end_path,\n duration_str,\n drive_id,\n -- Columns\n start_date,\n start_address,\n end_address,\n duration_min,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit,\n start_battery_level as \"% Start\",\n end_battery_level as \"% End\",\n CASE WHEN is_sufficiently_precise THEN range_diff * car_efficiency / distance * 1000 * CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END\n END AS consumption_kWh_$length_unit\nFROM data;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drives", - "transformations": [], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric:raw}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D" - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 36, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n charge_energy_added,\n charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n c.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n c.car_id,\n cost\n FROM\n charging_processes c\n LEFT JOIN positions p ON p.id = c.position_id\n LEFT JOIN cars ON cars.id = c.car_id\n LEFT JOIN addresses ON addresses.id = c.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n (charge_energy_added IS NULL OR charge_energy_added > 0) AND\n c.car_id = $car_id AND\n $__timeFilter(start_date)\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n COALESCE(geofence_name, address) as address, \n duration_min,\n cost,\n charge_energy_added,\n charge_energy_used,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\nORDER BY\n start_date DESC;\n ", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_level" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "displayName", - "value": "SOC" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_km$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_mi$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_ideal_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (ideal)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "range_rated_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Range (rated)" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 42, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM positions\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND car_id = $car_id\n GROUP BY 1\n) UNION ALL (\n SELECT $__timeGroup(date, '5s'), avg(battery_level) as battery_level, convert_km(avg([[preferred_range]]_battery_range_km), '$length_unit') as range_[[preferred_range]]_[[length_unit]]\n FROM charges c\n LEFT JOIN charging_processes p ON c.charging_process_id = p.id\n WHERE date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day') AND p.car_id = $car_id\n GROUP BY 1\n)\nORDER BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Level & Range", - "type": "timeseries" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": ".*_m$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": ".*_ft$" - }, - "properties": [ - { - "id": "unit", - "value": "lengthft" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "elevation_.*" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-blue", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 8, - "options": { - "legend": { - "calcs": ["min", "max", "lastNotNull"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "datasource": "TeslaMate", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__timeGroup(date, '5s'),\n\tROUND(convert_m(avg(elevation), '$alternative_length_unit')) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n date BETWEEN ($__timeFrom()::timestamp - interval '1 day') AND ($__timeTo()::timestamp + interval '1 day')\nGROUP BY\n 1\nORDER BY\n 1 ASC", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "C", - "value": "C" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "temperature unit", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "m", - "value": "m" - }, - "datasource": "TeslaMate", - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "1642593521525", - "value": "1642593521525" - }, - "datasource": "TeslaMate", - "definition": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "from", - "options": [], - "query": "with last_drives as (select start_date from drives order by start_date desc limit 3)\nselect extract(epoch from min(start_date)) * 1000 from last_drives;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now/d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Trip", - "uid": "FkUpJpQZk", - "version": 2, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/updates.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/updates.json deleted file mode 100644 index c63eedfb66f..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/updates.json +++ /dev/null @@ -1,723 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:15", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1643273221821, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 0, - "y": 1 - }, - "id": 8, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["count"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT count(*)\nFROM updates\nWHERE $__timeFilter(start_date) AND car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Updates", - "type": "stat" - }, - { - "datasource": "TeslaMate", - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dtdurations" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 16, - "x": 8, - "y": 1 - }, - "id": 6, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT percentile_disc(0.5) WITHIN GROUP (ORDER BY since_last_update) FROM (\n\tSELECT extract(EPOCH FROM start_date - lag(start_date) OVER (ORDER BY start_date)) AS since_last_update\n\tFROM updates\n\tWHERE $__timeFilter(start_date) AND car_id = $car_id\n) d;", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Median time between updates", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "displayMode": "auto", - "filterable": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "time" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "update_duration" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "since_last_update" - }, - "properties": [ - { - "id": "custom.width", - "value": 160 - }, - { - "id": "displayName", - "value": "Since Previous Update" - }, - { - "id": "unit", - "value": "dtdurations" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "displayName", - "value": "Installed Version" - }, - { - "id": "custom.align", - "value": "right" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "${__data.fields[version]} release notes", - "url": "https://www.notateslaapp.com/software-updates/version/${__data.fields[version]}/release-notes" - } - ] - }, - { - "id": "unit", - "value": "string" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "chg_ct" - }, - "properties": [ - { - "id": "custom.width", - "value": 100 - }, - { - "id": "displayName", - "value": "# of Charges" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_km" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_ideal_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg ideal range" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_rated_range_mi" - }, - "properties": [ - { - "id": "custom.width", - "value": 150 - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Avg rated range" - } - ] - } - ] - }, - "gridPos": { - "h": 28, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Date" - } - ] - }, - "pluginVersion": "8.3.4", - "scroll": true, - "showHeader": true, - "sort": { - "col": 0, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:68", - "alias": "Date", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "start_date", - "type": "date" - }, - { - "$$hashKey": "object:69", - "alias": "End Date", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "end_date", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "$$hashKey": "object:70", - "alias": "Installed Version", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTargetBlank": true, - "linkTooltip": "${__cell} release info", - "linkUrl": "https://www.notateslaapp.com/software-updates/version/${__cell}/release-notes", - "mappingType": 1, - "pattern": "version", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:202", - "alias": "Duration", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "update_duration", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:392", - "alias": "Since Previous Update", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "mappingType": 1, - "pattern": "since_last_update", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "$$hashKey": "object:71", - "alias": "# of Charges", - "align": "auto", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 0, - "pattern": "chg_ct", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with u as (\r\n select *, coalesce(lag(start_date) over(order by start_date desc), now()) as next_start_date \r\n from updates\r\n where car_id = $car_id and $__timeFilter(start_date)\r\n),\r\nrng as (\r\n SELECT\r\n\t to_timestamp(floor(extract(epoch from date)/21600)*21600) AS date,\r\n\t (sum([[preferred_range]]_battery_range_km) / nullif(sum(coalesce(usable_battery_level,battery_level)),0) * 100 ) AS \"battery_rng\"\r\n FROM (\r\n select battery_level, usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from positions\r\n where car_id = $car_id and $__timeFilter(date) and ideal_battery_range_km is not null\r\n union all\r\n select battery_level, coalesce(usable_battery_level,battery_level) as usable_battery_level, date, rated_battery_range_km, ideal_battery_range_km\r\n from charges c\r\n join charging_processes p ON p.id = c.charging_process_id \r\n where $__timeFilter(date) and p.car_id = $car_id\r\n ) as data\r\n GROUP BY 1\r\n)\r\n\r\nselect\t\r\n u.start_date as time,\r\n\textract(EPOCH FROM u.end_date - u.start_date) AS update_duration,\r\n\textract(EPOCH FROM u.start_date - lag(u.start_date) OVER (ORDER BY u.start_date)) AS since_last_update,\r\n\tsplit_part(u.version, ' ', 1) as version,\r\n\tcount(distinct cp.id) as chg_ct,\r\n\tconvert_km(avg(r.battery_rng), '$length_unit')::numeric(6,2) AS avg_[[preferred_range]]_range_[[length_unit]]\r\nfrom u u\r\nleft join charging_processes cp\r\n\tON u.car_id = cp.car_id\r\n \tand cp.start_date between u.start_date and u.next_start_date\r\nleft join rng r\r\n\tON r.date between u.start_date and u.next_start_date\r\ngroup by u.car_id,\r\n\tu.start_date,\r\n\tu.end_date,\r\n\tnext_start_date,\r\n\tsplit_part(u.version, ' ', 1)", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Updates", - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Updates", - "uid": "IiC07mgWz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/vampire-drain.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/vampire-drain.json deleted file mode 100644 index 033b382c37a..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/vampire-drain.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "iteration": 1642779900099, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "displayMode": "auto" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "", - "url": "d/zm7wN6Zgz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "displayName", - "value": "End" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration" - }, - "properties": [ - { - "id": "displayName", - "value": "Period" - }, - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "rgb(133, 142, 133)", - "value": null - }, - { - "color": "#56A64B", - "value": 43200 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "standby" - }, - "properties": [ - { - "id": "displayName", - "value": "Standby" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#FF7383", - "value": null - }, - { - "color": "#FFB357", - "value": 0.3 - }, - { - "color": "#56A64B", - "value": 0.85 - } - ] - } - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.width", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption" - }, - "properties": [ - { - "id": "displayName", - "value": "kWh" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "displayName", - "value": "Ø-Power" - }, - { - "id": "unit", - "value": "watt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_lost_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss / h" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_diff_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "TR Loss" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "custom.width", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "has_reduced_range" - }, - "properties": [ - { - "id": "displayName", - "value": " " - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "0": { - "color": "transparent", - "index": 1, - "text": " " - }, - "1": { - "color": "dark-blue", - "index": 0, - "text": "❄" - } - }, - "type": "value" - } - ] - }, - { - "id": "links", - "value": [ - { - "title": "In cold weather, the estimated range loss cannot be estimated correctly and is therefore hidden.", - "url": "" - } - ] - }, - { - "id": "custom.width", - "value": 5 - } - ] - } - ] - }, - "gridPos": { - "h": 23, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.3.4", - "targets": [ - { - "alias": "", - "datasource": "TeslaMate", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "with merge as (\n SELECT \n c.start_date AS start_date,\n c.end_date AS end_date,\n c.start_ideal_range_km AS start_ideal_range_km,\n c.end_ideal_range_km AS end_ideal_range_km,\n c.start_rated_range_km AS start_rated_range_km,\n c.end_rated_range_km AS end_rated_range_km,\n start_battery_level,\n end_battery_level,\n p.usable_battery_level AS start_usable_battery_level,\n NULL AS end_usable_battery_level,\n p.odometer AS start_km,\n p.odometer AS end_km\n FROM charging_processes c\n JOIN positions p ON c.position_id = p.id\n WHERE c.car_id = $car_id AND $__timeFilter(start_date)\n UNION\n SELECT \n d.start_date AS start_date,\n d.end_date AS end_date,\n d.start_ideal_range_km AS start_ideal_range_km,\n d.end_ideal_range_km AS end_ideal_range_km,\n d.start_rated_range_km AS start_rated_range_km,\n d.end_rated_range_km AS end_rated_range_km,\n start_position.battery_level AS start_battery_level,\n end_position.battery_level AS end_battery_level,\n start_position.usable_battery_level AS start_usable_battery_level,\n end_position.usable_battery_level AS end_usable_battery_level,\n d.start_km AS start_km,\n d.end_km AS end_km\n FROM drives d\n JOIN positions start_position ON d.start_position_id = start_position.id\n JOIN positions end_position ON d.end_position_id = end_position.id\n WHERE d.car_id = $car_id AND $__timeFilter(start_date)\n), \nv as (\n SELECT\n lag(t.end_date) OVER w AS start_date,\n t.start_date AS end_date,\n lag(t.end_[[preferred_range]]_range_km) OVER w AS start_range,\n t.start_[[preferred_range]]_range_km AS end_range,\n lag(t.end_km) OVER w AS start_km,\n t.start_km AS end_km,\n EXTRACT(EPOCH FROM age(t.start_date, lag(t.end_date) OVER w)) AS duration,\n lag(t.end_battery_level) OVER w AS start_battery_level,\n lag(t.end_usable_battery_level) OVER w AS start_usable_battery_level,\n\t\tstart_battery_level AS end_battery_level,\n\t\tstart_usable_battery_level AS end_usable_battery_level,\n\t\tstart_battery_level > COALESCE(start_usable_battery_level, start_battery_level) AS has_reduced_range\n FROM merge t\n WINDOW w AS (ORDER BY t.start_date ASC)\n ORDER BY start_date DESC\n)\n\nSELECT\n round(extract(epoch FROM v.start_date)) * 1000 AS start_date_ts,\n round(extract(epoch FROM v.end_date)) * 1000 AS end_date_ts,\n -- Columns\n v.start_date,\n v.end_date,\n v.duration,\n (coalesce(s_asleep.sleep, 0) + coalesce(s_offline.sleep, 0)) / v.duration as standby,\n\t-greatest(v.start_battery_level - v.end_battery_level, 0) as soc_diff,\n\tCASE WHEN has_reduced_range THEN 1 ELSE 0 END as has_reduced_range,\n\tconvert_km(CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range)::numeric END, '$length_unit') AS range_diff_$length_unit,\n CASE WHEN has_reduced_range THEN NULL ELSE (v.start_range - v.end_range) * c.efficiency END AS consumption,\n CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) * c.efficiency) / (v.duration / 3600) * 1000 END as avg_power,\n convert_km(CASE WHEN has_reduced_range THEN NULL ELSE ((v.start_range - v.end_range) / (v.duration / 3600))::numeric END, '$length_unit') AS range_lost_per_hour_[[length_unit]]\nFROM v,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'asleep' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_asleep,\n LATERAL (\n SELECT EXTRACT(EPOCH FROM sum(age(s.end_date, s.start_date))) as sleep\n FROM states s\n WHERE\n state = 'offline' AND\n v.start_date <= s.start_date AND s.end_date <= v.end_date AND\n s.car_id = $car_id\n ) s_offline\nJOIN cars c ON c.id = $car_id\nWHERE\n v.duration > ($duration * 60 * 60)\n AND v.start_range - v.end_range >= 0\n AND v.end_km - v.start_km < 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "datasource": "TeslaMate", - "title": "Vampire Drain", - "transformations": [ - { - "id": "merge", - "options": { - "reducers": [] - } - } - ], - "type": "table" - } - ], - "schemaVersion": 36, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "All", - "value": "$__all" - }, - "datasource": "TeslaMate", - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "tags": [], - "text": "6", - "value": "6" - }, - "hide": 0, - "includeAll": false, - "label": "min. Idle Time (h)", - "multi": false, - "name": "duration", - "options": [ - { - "selected": false, - "text": "0", - "value": "0" - }, - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "3", - "value": "3" - }, - { - "selected": true, - "text": "6", - "value": "6" - }, - { - "selected": false, - "text": "12", - "value": "12" - }, - { - "selected": false, - "text": "18", - "value": "18" - }, - { - "selected": false, - "text": "24", - "value": "24" - } - ], - "query": "0,1,3,6,12,18,24", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "km", - "value": "km" - }, - "datasource": "TeslaMate", - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "ideal", - "value": "ideal" - }, - "datasource": "TeslaMate", - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Vampire Drain", - "uid": "zhHx2Fggk", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/visited.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate1/visited.json deleted file mode 100644 index 08ff417b4e1..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate1/visited.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "targets": [ - { - "datasource": "TeslaMate", - "refId": "A" - } - ], - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 2, - "links": [], - "maxDataPoints": 10000000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "fixed": "img/icons/marker/circle.svg", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "latitude": "lat", - "longitude": "long", - "mode": "auto" - }, - "name": "Layer 1", - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "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", - "refId": "Positions", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - } - } - ], - "title": "MAP", - "type": "geomap" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["tesla"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "http://localhost:4000", - "value": "http://localhost:4000" - }, - "datasource": "TeslaMate", - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-90d", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Visited", - "uid": "RG_DxSmgk", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/BatteryHealth.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/BatteryHealth.json deleted file mode 100644 index 2ad8139b02f..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/BatteryHealth.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "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)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "**Usable (now)** is the estimated current battery capacity. It is average of the estimated capacity reported by the last 10 charging sessions to have a better estimation.\n\nIf you see just '1.0 kWh' here, it means that you need at least a long charge session.\n\n**Usable (new)** is the estimated Battery Capacity since you begun to use Teslamate. That's why, the more data you have logged from your brand new car the better. For those who have not used Teslamate since they got their new car, or for those who have bought it second hand, it's possible to set the max range to 100% and the battery capacity of the car battery when it was new in order to get a better and accurate estimation.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "dark-red", - "value": 1 - }, - { - "color": "super-light-blue", - "value": 2 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 13, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Usable (new)\", \n ('$aux'::json -> 'CurrentCapacity')::text::float as \"Usable (now)\",\n ('$aux'::json -> 'CurrentCapacity')::text::float - CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END as \"Difference\"\n \n \n \n \n \n \n ", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Capacity", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/.*_km/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/maxrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (new)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/currentrange_.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Max range (now)" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/range_lost.*/" - }, - "properties": [ - { - "id": "displayName", - "value": "Range lost" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 14, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END as \"maxrange_$length_unit\",\n ('$aux'::json -> 'CurrentRange')::text::float as \"currentrange_$length_unit\",\n CASE WHEN $custom_max_range > 0 THEN $custom_max_range ELSE ('$aux'::json -> 'MaxRange')::text::float END - ('$aux'::json -> 'CurrentRange')::text::float as \"range_lost_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Ranges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Logged\" is the distance traveled that is saved on Teslamate database.\n\n\"Mileage\" is the distance the car has traveled since using Teslamate.\n\nSo, if there is a difference between both values, it is the distance that for some reason a drive hasn't been fully recorded, for example due to a bug or an unexpected restart and that Teslamate has not been able to record, either due to lack of connection, areas without signal, or that it has been out of service.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 37, - "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", - "hide": false, - "rawQuery": true, - "rawSql": "select ROUND(convert_km(sum(distance)::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\r\nfrom drives \r\nwhere car_id = $car_id;\r\n", - "refId": "Looged", - "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 ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Mileage\"\nfrom positions where car_id = $car_id;", - "refId": "Mileage", - "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", - "group": [], - "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;", - "refId": "Odometer", - "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" - } - ] - } - ], - "title": "Trips", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 34, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": false, - "values": ["value"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.charge_energy_added,\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\t\tcp.charge_energy_used\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 cp.charge_energy_added > 0.01\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tSUM(GREATEST(charge_energy_added, charge_energy_used)) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "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" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the Battery health based on the data logged in Teslamate. So, the more data you have logged from your brand new car the better.\n\n**Degradation** is just an estimated value to have a reference, measured on **usable battery level** of every charging session with enough kWh added (in order to avoid dirty data from the sample), calculated according to the rated efficiency of the car.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 10 - }, - { - "color": "red", - "value": 20 - }, - { - "color": "dark-red", - "value": 30 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 6, - "x": 0, - "y": 6 - }, - "id": 17, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [], - "fields": "/^greatest$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true, - "sizing": "auto" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END))\n\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Estimated Degradation", - "type": "gauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 1, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "#EAB839", - "value": 80 - }, - { - "color": "light-green", - "value": 90 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 6 - }, - "id": 12, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n LEAST(100, (100 - GREATEST(0, 100.0 - (('$aux'::json -> 'CurrentCapacity')::text::float * 100.0 / CASE WHEN $custom_kwh_new > 0 THEN $custom_kwh_new ELSE ('$aux'::json -> 'MaxCapacity')::text::float END)))) as \"Battery Health (%)\"\n \n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Battery Health", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "\"Charging cycles\" are estimations based on the whole energy added to the battery.\n\n\"Charge Efficiency\" is estimated on the difference between energy used from the charger and energy added to the battery.", - "fieldConfig": { - "defaults": { - "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": 7, - "w": 6, - "x": 12, - "y": 6 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "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", - "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", - "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 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 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 charge_energy_added > 0.01\r\n", - "refId": "Charge Efficiency", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Battery Stats", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 9 - }, - "id": 25, - "options": { - "displayMode": "lcd", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level, date\r\nFROM positions\r\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)\r\nUNION\r\n(SELECT usable_battery_level, date\r\nFROM charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id\r\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\r\nORDER BY date DESC\r\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "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", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 4, - "x": 6, - "y": 11 - }, - "id": 27, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "sizing": "auto", - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT * FROM ((SELECT usable_battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM positions\nWHERE car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)\nUNION\n(SELECT battery_level * ('$aux'::json -> 'CurrentCapacity')::text::float / 100 as kWh, date, ('$aux'::json -> 'CurrentCapacity')::text::float as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL\nORDER BY date DESC\nLIMIT 1)) AS last_usable_battery_level LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "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" - } - ] - } - ], - "title": "Current Capacity", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 6 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "Median" - }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 2 - }, - { - "id": "custom.show", - "value": "lines" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 28, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "name": "Odometer", - "pointColor": { - "field": "kWh" - }, - "pointSize": { - "fixed": 5, - "max": 100, - "min": 1 - }, - "x": "odometer", - "y": "kWh" - }, - { - "name": "Median Odometer", - "pointColor": { - "fixed": "dark-red" - }, - "x": "M-Odometer", - "y": "M-kWh" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km(AVG(p.odometer)::numeric,'$length_unit') AS odometer, \r\n\tAVG(c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level) AS \"kWh\",\r\n\tMAX(cp.id) AS id,\r\n\tto_char(cp.end_date, 'YYYY-MM-dd') AS Title\r\n\tFROM charging_processes cp\r\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\r\n\t\tINNER JOIN charges c\r\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\r\n\t\tINNER JOIN positions p ON p.id = cp.position_id\r\n\tWHERE cp.car_id = $car_id\r\n\t\tAND cp.end_date IS NOT NULL\r\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\r\n\tGROUP BY 4", - "refId": "Projected Range", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "", - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n ROUND(MIN(convert_km(p.odometer::numeric,'$length_unit')),0) AS \"M-Odometer\",\n\tROUND(PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY c.rated_battery_range_km * ('$aux'::json -> 'RatedEfficiency')::text::float / c.usable_battery_level)::numeric,1) AS \"M-kWh\",\n\tto_char(cp.end_date, 'YYYYMM') || CASE WHEN to_char(cp.end_date, 'DD')::int <= 15 THEN '1' ELSE '2' END AS Title\n\tFROM charging_processes cp\n\t\tJOIN (SELECT charging_process_id, MAX(date) as date\tFROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS last_charges\tON cp.id = last_charges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = last_charges.date\n\t\tINNER JOIN positions p ON p.id = cp.position_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= ('$aux'::json -> 'RatedEfficiency')::text::float\n\tGROUP BY 3", - "refId": "Median", - "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" - } - ] - } - ], - "title": "Battery Capacity by Mileage", - "type": "xychart" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "-- CONCATENATED JOIN QUERIES TO IMPROVE PERFORMANCE\n-- The following query is the result of many tests and hours of work. This panel is for your own personal use. \n-- If you think you can improve it and contribute, please create a pull request and do not take it to your repository, \n-- much less upload it to another repository as if the original idea were yours, nor do you share it on social media\n-- without mentioning the author. Respect the ingenuity and work of others. Cheers!\n-- 2024-03-19\n-- By @jheredianet - Twitter: @juanheredia", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "aux", - "options": [], - "query": "WITH Aux AS\n(\n\t\tSELECT \n car_id,\n\t\tCOALESCE(efficiency, \n\t\t(SELECT efficiency\n\t\t\tFROM cars WHERE id = $car_id) * 100) AS efficiency\n\tFROM (\n\t\tSELECT ROUND((charge_energy_added / NULLIF(end_rated_range_km - start_rated_range_km, 0))::numeric, 3) * 100 as efficiency,\n\t\t\tCOUNT(*) as count, $car_id AS car_id \n\t\tFROM charging_processes\n\t\tWHERE car_id = $car_id\n\t\t\tAND duration_min > 10\n\t\t\tAND end_battery_level <= 95\n\t\t\tAND start_rated_range_km IS NOT NULL\n\t\t\tAND end_rated_range_km IS NOT NULL\n\t\t\tAND charge_energy_added > 0\n\t\tGROUP BY 1\n\t\tORDER BY 2 DESC\n\t\tLIMIT 1\n\t) AS DerivatedEfficiency\n),\nCurrentCapacity\t AS\n(\n\tSELECT AVG(Capacity) AS Capacity\nFROM (\nSELECT \n\tc.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id \n INNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n\t\tAND c.usable_battery_level > 0\n\t ORDER BY cp.end_date DESC LIMIT 10) AS lastCharges\n), \nMaxCapacity AS\n(\n\tSELECT \n\t\tMAX(c.[[preferred_range]]_battery_range_km * aux.efficiency / c.usable_battery_level) AS Capacity\n\tFROM charging_processes cp\n\t\tINNER JOIN (\n\t\t\tSELECT charging_process_id, MAX(date) as date FROM charges WHERE usable_battery_level > 0 GROUP BY charging_process_id) AS gcharges\t\n\t\t\tON cp.id = gcharges.charging_process_id\n\t\tINNER JOIN charges c\n\t\tON c.charging_process_id = cp.id AND c.date = gcharges.date\n\t\tINNER JOIN aux ON cp.car_id = aux.car_id\n\tWHERE cp.car_id = $car_id\n\t\tAND cp.end_date IS NOT NULL\n\t\tAND cp.charge_energy_added >= aux.efficiency\n), \nCurrentRange AS\n(\n SELECT (range * 100.0 / usable_battery_level) AS range\n\tFROM (\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level AS usable_battery_level\n\t\t\tFROM positions\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t\tUNION ALL\n\t\t(SELECT date, [[preferred_range]]_battery_range_km AS range, usable_battery_level as usable_battery_level\n\t\t\tFROM charges c JOIN charging_processes p ON p.id = c.charging_process_id\n\t\t\tWHERE p.car_id = $car_id AND usable_battery_level > 0 ORDER BY date DESC LIMIT 1)\n\t) AS data\n\tORDER BY date DESC\n\tLIMIT 1\n), \nMaxRange AS\n(\n SELECT\n\t\tfloor(extract(epoch from date)/86400)*86400 AS time,\n\t CASE WHEN sum(usable_battery_level) = 0 THEN sum([[preferred_range]]_battery_range_km) * 100\n\t\t ELSE sum([[preferred_range]]_battery_range_km) / sum(usable_battery_level) * 100\n\tEND AS range\n FROM (\n\t\tSELECT battery_level, usable_battery_level, date, [[preferred_range]]_battery_range_km from charges c \n\t\tJOIN charging_processes p ON p.id = c.charging_process_id \n\t\tWHERE p.car_id = $car_id AND usable_battery_level IS NOT NULL) AS data\n\tGROUP BY 1\n\tORDER BY 2 DESC\n\tLIMIT 1\n) \nSELECT CONCAT('{\"MaxRange\": ', convert_km(MaxRange.range,'$length_unit'),\n ', \"CurrentRange\": ',convert_km(CurrentRange.range,'$length_unit'),\n ', \"MaxCapacity\": ', MaxCapacity.Capacity,\n ', \"CurrentCapacity\": ', CASE WHEN CurrentCapacity.Capacity IS NULL THEN 1 ELSE CurrentCapacity.Capacity END,\n ', \"RatedEfficiency\": ', aux.efficiency, '}') \nFROM MaxRange, CurrentRange, Aux, MaxCapacity, CurrentCapacity", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the capacity of your car battery when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, it will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Battery Capacity (kWh) when new", - "name": "custom_kwh_new", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "description": "Set the max range to 100% of your car when it was new, in case you started using Teslamate after a while of having it. If not, leave it at 0, the degradation will be calculated with the data that is logged in Teslamate", - "hide": 0, - "label": "Custom Max Range when new", - "name": "custom_max_range", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "timepicker": { - "hidden": true - }, - "timezone": "browser", - "title": "Battery Health V2", - "uid": "jchmRiqUfXgRx", - "version": 23, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/BrowseCharges.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/BrowseCharges.json deleted file mode 100644 index 673f9f3e164..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/BrowseCharges.json +++ /dev/null @@ -1,1486 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "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 --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "iteration": 1686816148286, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "filterable": false, - "inspect": false, - "minWidth": 150 - }, - "decimals": 2, - "displayName": "", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "View charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}&var-car_id=${__data.fields.car_id.numeric}&var-charging_process_id=${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 160 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added" - }, - "properties": [ - { - "id": "displayName", - "value": "Added" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.minWidth", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "start_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% Start" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_battery_level" - }, - "properties": [ - { - "id": "displayName", - "value": "% End" - }, - { - "id": "unit", - "value": "percent" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 62 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "m" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_c" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "celsius" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#C0D8FF", - "value": null - }, - { - "color": "#C8F2C2", - "value": 10 - }, - { - "color": "#FFA6B0", - "value": 20 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost" - }, - "properties": [ - { - "id": "displayName", - "value": "Cost" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": false, - "title": "Set Cost", - "url": "[[base_url:raw]]/charge-cost/${__data.fields.id.numeric}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "address" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - }, - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Create or edit geo-fence", - "url": "[[base_url:raw]]/geo-fences/${__data.fields.path}" - } - ] - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 300 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_added_per_hour" - }, - "properties": [ - { - "id": "displayName", - "value": "kW" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.align" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "#96D98D", - "value": null - }, - { - "color": "#56A64B", - "value": 20 - }, - { - "color": "#37872D", - "value": 55 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_km" - }, - "properties": [ - { - "id": "displayName", - "value": "km / h" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_avg_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Driven" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "custom.align" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_added_per_hour_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "mi / h" - }, - { - "id": "unit", - "value": "none" - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 70 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "path" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Used" - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.minWidth", - "value": 85 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charging_efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.displayMode", - "value": "basic" - }, - { - "id": "color", - "value": { - "mode": "continuous-RdYlGr" - } - }, - { - "id": "max", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "car_id" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align" - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cost_per_kwh" - }, - "properties": [ - { - "id": "unit", - "value": "none" - }, - { - "id": "displayName", - "value": "Cost/kWh" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "noValue", - "value": "-" - }, - { - "id": "custom.minWidth", - "value": 80 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_type" - }, - "properties": [ - { - "id": "displayName", - "value": "Type" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "custom.displayMode", - "value": "color-text" - }, - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.minWidth", - "value": 40 - } - ] - } - ] - }, - "gridPos": { - "h": 21, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts,\n (round(extract(epoch FROM end_date) + 10) * 1000) AS end_date_ts,\n start_date,\n end_date,\n CONCAT_WS(', ', COALESCE(addresses.name, nullif(CONCAT_WS(' ', addresses.road, addresses.house_number), '')), addresses.city) AS address,\n g.name as geofence_name,\n g.id as geofence_id,\n p.latitude,\n p.longitude,\n cp.charge_energy_added,\n cp.charge_energy_used,\n duration_min,\n start_battery_level,\n end_battery_level,\n start_[[preferred_range]]_range_km,\n end_[[preferred_range]]_range_km,\n outside_temp_avg,\n cp.id,\n lag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n p.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance,\n cars.efficiency,\n cp.car_id,\n cost,\n max(c.charger_voltage) as max_charger_voltage,\n CASE WHEN NULLIF(mode() within group (order by charger_phases),0) is null THEN 'DC' ELSE 'AC' END AS charge_type\n FROM\n charging_processes cp\n\t LEFT JOIN charges c ON cp.id = c.charging_process_id\n LEFT JOIN positions p ON p.id = cp.position_id\n LEFT JOIN cars ON cars.id = cp.car_id\n LEFT JOIN addresses ON addresses.id = cp.address_id\n LEFT JOIN geofences g ON g.id = geofence_id\nWHERE \n cp.car_id = $car_id AND\n $__timeFilter(start_date) AND\n (cp.charge_energy_added IS NULL OR cp.charge_energy_added > 0) AND\n ('${geofence:pipe}' = '-1' OR geofence_id in ($geofence))\nGROUP BY 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,21,p.odometer\nORDER BY\n start_date\n)\nSELECT\n start_date_ts,\n end_date_ts,\n CASE WHEN geofence_id IS NULL THEN CONCAT('new?lat=', latitude, '&lng=', longitude)\n WHEN geofence_id IS NOT NULL THEN CONCAT(geofence_id, '/edit')\n END as path,\n car_id,\n id,\n -- Columns\n start_date,\n end_date,\n COALESCE(geofence_name, address) as address, \n charge_type,\n duration_min,\n cost,\n cost / NULLIF(greatest(charge_energy_added, charge_energy_used), 0) as cost_per_kwh,\n charge_energy_added,\n charge_energy_used,\n CASE WHEN charge_energy_used IS NULL THEN NULL ELSE LEAST(charge_energy_added / NULLIF(charge_energy_used, 0), 1.0) END as charging_efficiency,\n convert_celsius(outside_temp_avg, '$temp_unit') AS outside_temp_avg_$temp_unit,\n charge_energy_added * 60 / NULLIF (duration_min, 0) AS charge_energy_added_per_hour,\n convert_km((end_[[preferred_range]]_range_km - start_[[preferred_range]]_range_km) * 60 / NULLIF (duration_min, 0), '$length_unit') AS range_added_per_hour_$length_unit,\n start_battery_level,\n end_battery_level,\n convert_km(distance::numeric, '$length_unit') AS distance_$length_unit\n FROM\n data\nWHERE\n (distance >= 0 OR distance IS NULL)\n AND duration_min >= '$min_duration_min'\n AND CASE WHEN $cost = 0 THEN (cost IS NULL OR cost >= 0) ELSE cost >= $cost END\n AND charge_type = ANY(CASE WHEN array_to_string(ARRAY[$charge_type], ',') = 'DC' THEN ARRAY['DC'] WHEN array_to_string(ARRAY[$charge_type], ',') = 'AC' THEN ARRAY['AC'] ELSE ARRAY['DC', 'AC'] END)\n AND address ILIKE '%$location%'\nORDER BY\n start_date DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charges: $charge_type", - "transformations": [], - "type": "table" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 0, - "y": 21 - }, - "id": 10, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy added", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_added"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 7, - "x": 7, - "y": 21 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Energy used", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["charge_energy_used"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 14, - "y": 21 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Cost", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["cost"] - } - } - } - ], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 19, - "y": 21 - }, - "id": 15, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "datasource", - "uid": "-- Dashboard --" - }, - "panelId": 6, - "refId": "A" - } - ], - "title": "Average Duration", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["duration_min"] - } - } - } - ], - "transparent": true, - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": "-1", - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "hide": 0, - "includeAll": true, - "label": "Geofence", - "multi": true, - "name": "geofence", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM geofences ORDER BY name COLLATE \"C\" ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Type a text contained in Location", - "hide": 0, - "label": "Location", - "name": "location", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - }, - { - "allValue": "", - "current": { - "selected": true, - "text": ["All"], - "value": ["$__all"] - }, - "hide": 0, - "includeAll": true, - "label": "Type", - "multi": true, - "name": "charge_type", - "options": [ - { - "selected": true, - "text": "All", - "value": "$__all" - }, - { - "selected": false, - "text": "AC", - "value": "AC" - }, - { - "selected": false, - "text": "DC", - "value": "DC" - } - ], - "query": "AC, DC", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Cost >=", - "name": "cost", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": true, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Duration (minutes) >=", - "name": "min_duration_min", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Browse Charges", - "uid": "jchmTSmNYvRRk", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCostsStats.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCostsStats.json deleted file mode 100644 index 459607f6d62..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCostsStats.json +++ /dev/null @@ -1,3404 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "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": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 12, - "panels": [], - "title": "Summary", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 1 - }, - "id": 10, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Energy Used", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 1 - }, - "id": 33, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tsum(charge_energy_used)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost = 0;\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Free Energy", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 1 - }, - "id": 64, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH energy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id),\r\nsince as (\r\n\tSELECT date FROM positions\r\n\tWHERE car_id = $car_id\r\n\tORDER BY date ASC\r\n\tLIMIT 1\r\n)\r\nSELECT (energy.charged_kWh / $distance_driven) as \"kwh_per_$length_unit\" FROM energy", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "kWh per $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-yellow", - "value": null - } - ] - }, - "unit": "times" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 1 - }, - "id": 38, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tcount(*)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND charge_energy_used > 0.01\n\tAND car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Number of Charges", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "For this section, it's important that you have geo-fences called \"Home\" and \"Work\" if you want to see a bar with the energy charged on those places.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 1 - }, - "id": 49, - "options": { - "displayMode": "gradient", - "maxVizHeight": 300, - "minVizHeight": 10, - "minVizWidth": 0, - "namePlacement": "auto", - "orientation": "vertical", - "reduceOptions": { - "calcs": [], - "fields": "/^energy$/", - "values": true - }, - "showUnfilled": false, - "sizing": "auto", - "valueMode": "color" - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT location, SUM(charge_energy_used) AS Energy\r\nFROM (\r\nSELECT\r\n CASE\r\n WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Home%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%Work%' THEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), ''))))\r\n\t WHEN COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%' THEN 'Superchargers'\r\n\t ELSE 'Other'\r\n END AS location, charge_energy_used\r\nFROM\r\n\tcharging_processes c\r\nLEFT JOIN addresses address ON c.address_id = address.id\r\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\r\nWHERE\r\n\t car_id = $car_id\r\n\tAND $__timeFilter(end_date)\r\n\tAND c.charge_energy_used > 0\r\n) ChargeLocations\r\nGROUP BY location\r\nORDER BY Energy DESC", - "refId": "A", - "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" - } - ] - } - ], - "title": "Main locations", - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of all the charges in a given period (last 10 years by default). You can see the distance driven, number of charges, total charging cost, etc., both in summary or in separated lists.\n\nYou can expand/collapse the rows as needed.\n\nFrom the Monthly Stats row, you will have a table with links to other Teslamate Dashboards to have a look on a specific period, charge or trip.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "decimals": 2, - "mappings": [], - "unit": "kwatth" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "AC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "DC" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-orange", - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 1 - }, - "id": 51, - "maxDataPoints": 3, - "options": { - "displayLabels": ["name", "percent", "value"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.6", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n\t\tcp.id,\n\t\tcp.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 cp.charge_energy_used > 0.01\n\t AND $__timeFilter(start_date)\n GROUP BY 1,2\n)\nSELECT\n\tnow() AS time,\n\tsum(charge_energy_used) AS value,\n\tcurrent AS metric\nFROM data\nGROUP BY 3\nORDER BY metric DESC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Summary AC/DC Energy Used", - "type": "piechart" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Use the dropdown at the top to choose the Geofence to display energy added from", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 4 - }, - "id": 66, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes cp\r\nINNER JOIN geofences g ON g.id = cp.geofence_id\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id AND g.name = '$geofence'\r\nGROUP BY g.name),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at $geofence", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 4 - }, - "id": 65, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH free_energy AS (\r\nSELECT sum(charge_energy_used) AS free_charged_kWh\r\nFROM charging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n\tAND cost = 0),\r\nenergy as(\r\nSELECT\r\n\tsum(charge_energy_used) AS charged_kWh\r\nFROM\r\n\tcharging_processes\r\nWHERE\r\n\t$__timeFilter(end_date)\r\n\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * free_energy.free_charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, free_energy", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added free (no cost)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 4 - }, - "id": 67, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH suc_data AS (\r\n\tSELECT c.charging_process_id\r\n\tFROM charges c\r\n\tLEFT JOIN charging_processes cp ON cp.id = c.charging_process_id\r\n\tLEFT JOIN addresses addr ON addr.id = cp.address_id\r\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\r\n\tWHERE \r\n cp.car_id = $car_id AND c.fast_charger_present\r\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\r\n AND $__timeFilter(end_date)\r\n\tGROUP BY 1\r\n), suc_energy AS (\r\n SELECT coalesce(sum(charge_energy_used), 0) AS charged_kWh\r\n FROM charging_processes cp\r\n INNER JOIN suc_data ON suc_data.charging_process_id = cp.id\r\n), energy AS(\r\n SELECT\r\n\t sum(charge_energy_used) AS charged_kWh\r\n FROM charging_processes\r\n WHERE $__timeFilter(end_date)\tAND car_id = $car_id\r\n)\r\nSELECT ($distance_driven * suc_energy.charged_kWh / energy.charged_kWh) as \"distance_$length_unit\" FROM energy, suc_energy;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 4 - }, - "id": 36, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["sum"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $distance_driven as \"distance_$length_unit\"", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Driven", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 7 - }, - "id": 56, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $ACCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at AC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 7 - }, - "id": 44, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $DCCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at DC Stations", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 7 - }, - "id": 14, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $SucCost", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charging Cost at SuC", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 7 - }, - "id": 27, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "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" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $TotalCost\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Total Charging Costs", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "", - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 10 - }, - "id": 40, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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) / $distance_driven * 100", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Cost per 100 $length_unit", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 10 - }, - "id": 42, - "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": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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_used, charge_energy_used))\n FROM charging_processes\n WHERE $__timeFilter(end_date) AND car_id = $car_id\n)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Average kWh Cost", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Net is the efficiency while driving", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 10 - }, - "id": 69, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere \n distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "Gross is all consumption (including while idle, phantom drains, sentry mode, etc)", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 10 - }, - "id": 71, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance >= 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 60, - "panels": [], - "title": "Top 10 Charges", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 0, - "y": 14 - }, - "id": 46, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 General Charging Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 6, - "y": 14 - }, - "id": 4, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND cost > 0\n\tAND charge_energy_used > 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Paid Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 110 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 12, - "y": 14 - }, - "id": 34, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND COALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.display_name), '')))) ILIKE '%supercharger%'\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 SuperCharger Stations (Charged)", - "type": "table" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "location" - }, - "properties": [ - { - "id": "displayName", - "value": "Location" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "charge_energy_used" - }, - "properties": [ - { - "id": "displayName", - "value": "Charged" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Cost" - }, - "properties": [ - { - "id": "custom.width", - "value": 110 - }, - { - "id": "decimals", - "value": 2 - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 6, - "x": 18, - "y": 14 - }, - "id": 32, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.4.0", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCOALESCE(geofence.name, CONCAT_WS(', ', COALESCE(address.name, nullif(CONCAT_WS(' ', address.road, address.house_number), '')), address.city)) AS location,\n\tCASE\n WHEN SUM(charge_energy_used) < 1000 THEN SUM(charge_energy_used)::NUMERIC(4,0)::VARCHAR || ' kWh' \n WHEN SUM(charge_energy_used) < 1000000 THEN (SUM(charge_energy_used) / 1000)::NUMERIC(9, 3)::VARCHAR || ' MWh' \n WHEN SUM(charge_energy_used) >= 1000000 THEN (SUM(charge_energy_used) / 1000000)::NUMERIC(9, 3)::VARCHAR || ' GWh' \n END as charge_energy_used, sum(cost) as \"Cost\"\nFROM\n\tcharging_processes c\nLEFT JOIN addresses address ON c.address_id = address.id\nLEFT JOIN geofences geofence ON geofence_id = geofence.id\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id\n\tAND charge_energy_used > 0\n\tAND cost = 0\nGROUP BY\n\t1\nORDER BY\n\tSUM(charge_energy_used) DESC\nLIMIT 10;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top 10 Free Stations (Charged)", - "type": "table" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 62, - "panels": [], - "title": "Monthly Stats", - "type": "row" - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "percentage", - "steps": [ - { - "color": "super-light-orange", - "value": null - }, - { - "color": "light-orange", - "value": 65 - }, - { - "color": "light-green", - "value": 99 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Energy used" - }, - "properties": [ - { - "id": "decimals", - "value": 1 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charging stats", - "url": "d/-pkIkhmRz/charging-stats?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Avg charged" - }, - "properties": [ - { - "id": "unit", - "value": "kwatth" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Costs" - }, - "properties": [ - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.align", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# charges" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Charges", - "url": "d/TSmNYvRRk/charges?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_c/" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - }, - { - "color": "super-light-green", - "value": 10 - }, - { - "color": "super-light-red", - "value": 20 - } - ] - } - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "basic", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "max", - "value": 8000 - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.* at/" - }, - "properties": [ - { - "id": "unit", - "value": "dateTimeAsSystem" - }, - { - "id": "custom.width" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (drives)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/efficiency_charged_net_km/" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg consumption (charges)" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "noValue", - "value": "--" - }, - { - "id": "mappings", - "value": [ - { - "options": { - "NaN": { - "index": 0, - "text": "--" - } - }, - "type": "value" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/avg_outside_temp_f/" - }, - "properties": [ - { - "id": "displayName", - "value": "Temperature" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 15, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 58, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.4.0", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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 date_trunc('month', (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('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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 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 sum(distance)/sum(range_diff) AS efficiency\nFROM data WHERE\n car_id = $car_id\nGROUP BY date\nORDER BY date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n charging_processes.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM charging_processes)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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_used,charge_energy_used)) AS sum_consumption_kwh,\n sum(greatest(charge_energy_used,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 (charge_energy_used IS NULL OR charge_energy_used > 0.1)\nGROUP BY date\nORDER BY date", - "refId": "B", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\n SELECT\n drives.*,\n date_trunc('month', (start_date::TIMESTAMP WITHOUT TIME ZONE) AT TIME ZONE '$timezone') as local_period\n FROM drives)\nSELECT\n EXTRACT(EPOCH FROM date_trunc('month', local_period))*1000 AS date_from,\n EXTRACT(EPOCH FROM date_trunc('month', local_period + ('1 ' || 'month')::INTERVAL))*1000 AS date_to,\n CASE 'month'\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\nGROUP BY date\nORDER BY date", - "refId": "C", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per month", - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 8, - "avg_outside_temp_c": 3, - "cnt_charges": 7, - "cost_charges": 5, - "date": 1, - "date_from": 11, - "date_to": 12, - "display": 0, - "efficiency": 4, - "efficiency_charged_net_km": 10, - "efficiency_charged_net_km_temp": 13, - "efficiency_net_km": 9, - "sum_consumption_kwh": 6, - "sum_distance_km": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy used", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "TotalCost", - "options": [], - "query": "SELECT\n\tcoalesce(sum(cost), 0)\nFROM\n\tcharging_processes\nWHERE\n\t$__timeFilter(end_date)\n\tAND car_id = $car_id;\n\t", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "SucCost", - "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\tLEFT JOIN addresses addr ON addr.id = cp.address_id\n\tLEFT JOIN geofences geo ON geo.id = geofence_id\n\tWHERE \n\t cp.car_id = $car_id AND c.fast_charger_present\n\t\tAND COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.display_name), '')))) ILIKE '%supercharger%'\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost), 0)\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "DCCost", - "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 cp.car_id = $car_id AND c.fast_charger_present\n\tGROUP BY 1\n)\nSELECT\n coalesce(sum(cp.cost) - $SucCost , 0)\t\nFROM\n\tcharging_processes cp, data\nWHERE\n $__timeFilter(end_date)\n AND cp.id IN (data.charging_process_id);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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);", - "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);", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "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": 2, - "includeAll": false, - "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, - "type": "query" - }, - { - "current": {}, - "datasource": { - "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)", - "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)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "grafana-postgresql-datasource", - "uid": "TeslaMate" - }, - "definition": "SELECT name FROM geofences ORDER BY id", - "description": "Geofence to display energy added at", - "hide": 0, - "includeAll": false, - "label": "Geofence", - "multi": false, - "name": "geofence", - "options": [], - "query": "SELECT name FROM geofences ORDER BY id", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-10y", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Costs Stats", - "uid": "jchmDdLe5uFVk", - "version": 16, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCurveStats.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCurveStats.json deleted file mode 100644 index e5f60191d7c..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ChargingCurveStats.json +++ /dev/null @@ -1,870 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd", - "seriesBy": "last" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 10 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 29, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]", - "fixed": "super-light-yellow" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - SOC [%]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Supercharger Charging Curve", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-YlRd" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 3 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 10, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\r\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.battery_level >= $filter_soc_from AND c.battery_level <= $filter_soc_to\n AND charger_power >= $filter_power_from AND charger_power <= $filter_power_to\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) NOT ILIKE '%supercharger%' \nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Other DC Charging Curve", - "type": "xychart" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 40, - "panels": [], - "title": "Fast Charging Sessions", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This dashboard is meant to have a look of the charging curve sessions on Tesla Supercharges or other Fast Charging Station.\n\nAlso, you can see number of fast charging sessions you've done on each type of chargers and the count of max power (kW) reached on a session.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [] - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 4, - "x": 0, - "y": 15 - }, - "id": 38, - "options": { - "displayLabels": ["value", "percent"], - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH charges_summary AS (\n SELECT\n cp.id,\n COALESCE(geo.name, CONCAT_WS(', ', COALESCE(addr.name, nullif(CONCAT_WS(' ', addr.road, addr.house_number), '')), addr.city)) AS location,\n COUNT(c.charging_process_id)\n FROM\n charging_processes cp\n LEFT JOIN \n addresses addr ON addr.id = address_id\n LEFT JOIN\n geofences geo ON geo.id = geofence_id\n LEFT JOIN\n charges c ON cp.id = c.charging_process_id\n WHERE\n $__timeFilter(date) AND\n cp.car_id = $car_id AND cp.charge_energy_added > 0.01 AND c.fast_charger_present \n GROUP BY 1, 2\n)\nSELECT \n CASE\n WHEN location ILIKE '%supercharger%' THEN 'Tesla Supercharger'\n ELSE 'Other DC Stations' END AS location,\n COUNT(location) AS n\nFROM charges_summary\nGROUP BY 1", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-greens" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 90, - "gradientMode": "scheme", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "n" - }, - "properties": [ - { - "id": "displayName", - "value": "Number of times" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "unit", - "value": "kwatt" - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 20, - "x": 4, - "y": 15 - }, - "id": 34, - "links": [], - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0, - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "orientation": "auto", - "showValue": "auto", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xField": "Power [kW]", - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH power_summary AS (\n SELECT ROUND(MAX(charges.charger_power) / 5, 0) * 5 AS \"power\"\n FROM charging_processes\n LEFT JOIN charges ON charging_processes.id = charges.charging_process_id\n WHERE $__timeFilter(date) AND charging_processes.car_id = $car_id AND charging_processes.charge_energy_added > 0.01 AND charges.fast_charger_present\n GROUP BY charging_processes.id\n)\nSELECT power_summary.power AS \"Power [kW]\", COUNT(power_summary.power) AS n\nFROM power_summary\nWHERE power_summary.power >= $filter_power_from AND power_summary.power <= $filter_power_to\nGROUP BY 1\nORDER BY 1 DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Max Power", - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Power >=", - "name": "filter_power_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "260", - "value": "260" - }, - "hide": 0, - "label": "Power <=", - "name": "filter_power_to", - "options": [ - { - "selected": true, - "text": "260", - "value": "260" - } - ], - "query": "260", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "SOC >=", - "name": "filter_soc_from", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "100", - "value": "100" - }, - "hide": 0, - "label": "SOC <=", - "name": "filter_soc_to", - "options": [ - { - "selected": true, - "text": "100", - "value": "100" - } - ], - "query": "100", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Charging Curve Stats", - "uid": "jchmXpkIkhmRz", - "version": 9, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ContinuousTrips.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ContinuousTrips.json deleted file mode 100644 index 93d06f58ebe..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/ContinuousTrips.json +++ /dev/null @@ -1,810 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "start_date" - }, - "properties": [ - { - "id": "displayName", - "value": "Start Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "View Trip details", - "url": "d/FkUpJpQZk?from=${__data.fields.start_date_ts.numeric}&to=${__data.fields.end_date_ts.numeric}" - } - ] - }, - { - "id": "custom.minWidth", - "value": 180 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-BlPu" - } - }, - { - "id": "max", - "value": 400 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 200 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "end_date" - }, - "properties": [ - { - "id": "custom.minWidth", - "value": 180 - }, - { - "id": "displayName", - "value": "End Date" - }, - { - "id": "unit", - "value": "dateTimeAsLocal" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "duration_min" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "custom.minWidth", - "value": 120 - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitykmh" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "unit", - "value": "velocitymph" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/.*_ts/" - }, - "properties": [ - { - "id": "unit", - "value": "short" - }, - { - "id": "decimals", - "value": 2 - }, - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/%/" - }, - "properties": [ - { - "id": "unit", - "value": "percent" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.minWidth", - "value": 65 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power_max" - }, - "properties": [ - { - "id": "displayName", - "value": "max Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_km" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_max_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "max Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.minWidth", - "value": 90 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_temp_c" - }, - "properties": [ - { - "id": "unit", - "value": "celsius" - }, - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "outside_temp_f" - }, - "properties": [ - { - "id": "displayName", - "value": "Temp" - }, - { - "id": "unit", - "value": "fahrenheit" - }, - { - "id": "custom.minWidth", - "value": 75 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.minWidth", - "value": 110 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.minWidth", - "value": 150 - }, - { - "id": "displayName", - "value": "Consumption gross" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_kwh" - }, - "properties": [ - { - "id": "displayName", - "value": "Energy" - }, - { - "id": "decimals", - "value": 1 - }, - { - "id": "custom.minWidth", - "value": 90 - }, - { - "id": "unit", - "value": "kwatth" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency" - }, - "properties": [ - { - "id": "displayName", - "value": "Efficiency" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "decimals", - "value": 0 - }, - { - "id": "custom.cellOptions", - "value": { - "type": "color-text" - } - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-red", - "value": null - }, - { - "color": "super-light-yellow", - "value": 0.65 - }, - { - "color": "light-green", - "value": 0.99 - } - ] - } - }, - { - "id": "custom.minWidth", - "value": 100 - } - ] - } - ] - }, - "gridPos": { - "h": 30, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH \r\ntrip AS (\r\n SELECT start_date sd, end_date ed, distance, duration_min, start_usable_battery_level, end_usable_battery_level, \r\n outside_temp_avg, power_max, speed_max, start_[[preferred_range]]_range_km, end_[[preferred_range]]_range_km\r\n FROM drives INNER JOIN (\r\n SELECT drive_id, MIN(usable_battery_level) AS end_usable_battery_level, MAX(usable_battery_level) AS start_usable_battery_level\r\n FROM (\r\n SELECT p.drive_id, p.usable_battery_level, ROW_NUMBER() OVER (PARTITION BY p.drive_id ORDER BY date) AS row_num\r\n FROM drives d INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE d.car_id = $car_id\r\n AND $__timeFilter(p.date)\r\n AND d.end_date IS NOT NULL\r\n AND d.duration_min > 0\r\n AND d.start_[[preferred_range]]_range_km > d.end_[[preferred_range]]_range_km\r\n AND p.usable_battery_level IS NOT NULL\r\n ) AS pos\r\n GROUP BY drive_id\r\n ) AS filter_drives ON filter_drives.drive_id = drives.id\r\n),\r\ncp AS (\r\n SELECT car_id, start_date, end_date, COALESCE(LAG(start_date) OVER(ORDER BY start_date DESC), now()) next_date, start_battery_level, end_battery_level\r\n FROM charging_processes WHERE $__timeFilter(start_date) AND car_id = $car_id\r\n),\r\ndriven AS (\r\nSELECT cp.car_id, cp.start_date, cp.end_date, cp.next_date, \r\n MIN(trip.sd) trip_start_date, \r\n MAX(trip.ed) trip_end_date,\r\n SUM(convert_km(trip.distance::numeric, '$length_unit')) AS distance_$length_unit, \r\n MAX(convert_km(trip.speed_max::numeric, '$length_unit')) AS speed_max_$length_unit,\r\n SUM(trip.duration_min) duration_min,\r\n MAX(trip.start_usable_battery_level) start_soc, \r\n MIN(trip.end_usable_battery_level) end_soc, \r\n AVG(convert_celsius(trip.outside_temp_avg, '$temp_unit')) AS avg_temp_$temp_unit, \r\n MAX(trip.power_max) AS power_max, \r\n convert_km((MAX(trip.start_[[preferred_range]]_range_km) - MIN(trip.end_[[preferred_range]]_range_km))::numeric, '$length_unit') AS range_diff_$length_unit \r\n\tFROM cp\tINNER JOIN trip ON trip.sd BETWEEN cp.start_date and cp.next_date\r\n GROUP BY cp.car_id, cp.start_date, cp.end_date, cp.next_date\r\n)\r\nSELECT \r\n ROUND(EXTRACT(epoch FROM start_date) - 10) * 1000 AS start_date_ts, ROUND(EXTRACT(epoch FROM next_date) + 10) * 1000 AS end_date_ts, start_date, next_date end_date,\r\n distance_$length_unit, duration_min * 60 as duration_min, \r\n (distance_$length_unit / duration_min * 60) as speed_$length_unit, \r\n start_soc as \"% Start\", end_soc as \"% End\", avg_temp_$temp_unit, power_max, speed_max_$length_unit,\r\n (range_diff_$length_unit * car.efficiency) consumption_kwh, \r\n (range_diff_$length_unit * car.efficiency / distance_$length_unit * 1000.0) consumption_kWh_$length_unit,\r\n (distance_$length_unit / range_diff_$length_unit) efficiency\r\nFROM driven\r\nINNER JOIN cars car ON car.id = driven.car_id\r\nWHERE distance_$length_unit >= $min_dist AND (distance_$length_unit / duration_min * 60) >= $min_avg_speed\r\nORDER BY start_date DESC\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Long Trips", - "transformations": [], - "type": "table" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_length FROM settings limit 1", - "hide": 2, - "includeAll": false, - "label": "length unit", - "multi": false, - "name": "length_unit", - "options": [], - "query": "SELECT unit_of_length FROM settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT base_url FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "SELECT base_url FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "definition": "SELECT preferred_range FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "SELECT preferred_range FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT unit_of_temperature FROM settings LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "SELECT unit_of_temperature FROM settings LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "includeAll": false, - "label": "Distance >=", - "name": "min_dist", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - }, - { - "current": { - "selected": false, - "text": "0", - "value": "0" - }, - "hide": 0, - "label": "Avg Speed >=", - "name": "min_avg_speed", - "options": [ - { - "selected": true, - "text": "0", - "value": "0" - } - ], - "query": "0", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Continuous Trips", - "uid": "jchmY8upc6ZRk", - "version": 5, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentChargeView.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentChargeView.json deleted file mode 100644 index 5e30f174b5f..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentChargeView.json +++ /dev/null @@ -1,1953 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["Custom"], - "targetBlank": false, - "title": "Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Charge", - "tooltip": "Show Current Charge Data", - "type": "link", - "url": "d/jchm9RxutVS7a/current-charge-view?kiosk&var-car_id=${car_id}&from=${current_charge_time}&to=${current_end_time}&var-BatteryCapacity=${BatteryCapacity}&var-charging_processes=${charging_processes}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 8, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level as \"SOC [%]\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 2, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 33, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kWh$/", - "values": false - }, - "showUnfilled": true, - "text": { - "valueSize": 40 - }, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT battery_level * $BatteryCapacity / 100 as \"kWh\", $BatteryCapacity AS Total FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Load this dashboard to while you are in a charging session. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Charge\" button at the top right corner, to enter in Kiosk mode:\n\n- If you are charging, you will see the information from the start time of the current charge session until now and it will refesh automatically every 30 seconds.\n\n- If you are just browsing (not charging) you will see the information of the last charge session.", - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 51, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
    \n\n
    ", - "mode": "html" - }, - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "decimals": 2, - "mappings": [], - "max": 49, - "min": 0, - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 36, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^Added$/", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "kWh Added", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(charge_energy_added) as \"Added\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Added", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 37, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city)) FROM \tcharging_processes c \tLEFT JOIN addresses ON addresses.id = c.address_id \tLEFT JOIN geofences g ON g.id = geofence_id WHERE \tc.id = $charging_processes", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 51, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Power [kW]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "SOC [%]" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "super-light-blue", - "mode": "fixed" - } - }, - { - "id": "custom.axisPlacement", - "value": "right" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "bool_on_off" - } - ] - } - ] - }, - "gridPos": { - "h": 20, - "w": 12, - "x": 0, - "y": 2 - }, - "id": 28, - "options": { - "legend": { - "calcs": ["mean", "min", "max", "last"], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.1.2", - "targets": [ - { - "alias": "Power [kW]", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["none"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__time(date), battery_level as \"SOC [%]\", (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]\", (case when battery_heater_on then 10 when battery_heater then 10 else 0 end) as \"Battery heater\" FROM charges c JOIN charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) and p.car_id = $car_id ORDER BY 1", - "refId": "Power", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "tags": [], - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-green", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 6, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": " SELECT battery_level as \"Initial SOC\" FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1", - "refId": "Inital SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT battery_level - (SELECT battery_level as \"Added\" FROM charges where charging_process_id=$charging_processes\tORDER BY DATE ASC \tLIMIT 1) as \"Added\" FROM charges c join charging_processes p ON p.id = c.charging_process_id WHERE $__timeFilter(date) AND p.car_id = $car_id ORDER BY c.ID DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - }, - "unit": "clocks" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 30, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["sum"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Elapsed Time", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "WITH start_process AS ( SELECT date FROM charges \twhere charging_process_id=$charging_processes \tORDER BY DATE ASC \tLIMIT 1 ) SELECT EXTRACT(EPOCH FROM (charges.date - start_process.date)) AS \"Elapsed\" FROM charges, start_process WHERE charging_process_id = $charging_processes AND $__timeFilter(charges.date) order by charges.date desc LIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["utc"], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 6, - "x": 18, - "y": 4 - }, - "id": 50, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 20, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-yellow", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "Km" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 7 - }, - "id": 16, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["first"], - "fields": "", - "values": true - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"Odometer\" from positions where car_id = $car_id order by date desc limit 1;", - "refId": "odometer", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "blue", - "mode": "palette-classic" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "orange", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 10 - }, - "id": 5, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Initial Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 asc limit 1", - "refId": "Initial Range", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Real", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(rated_battery_range_km, '$length_unit')) as \"Rated Range\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Rated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "alias": "Estimated", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "groupBy": [], - "hide": false, - "measurement": "km", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_km(est_battery_range_km, '$length_unit')) as \"Estimated Range\" FROM positions WHERE $__timeFilter(date) GROUP BY 1 ORDER BY 1 desc limit 1", - "refId": "Estimated", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["value"], - "type": "field" - }, - { - "params": [], - "type": "last" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "light-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Current" - }, - "properties": [ - { - "id": "unit", - "value": "amp" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 49, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_actual_current else ((2.85 + (usable_battery_level * 0.013)) * 96) * charger_power / 100 end) as \"Current\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "volt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 14 - }, - "id": 47, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^Volt$/", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(case when charger_voltage > 2 then charger_voltage else charger_power / GREATEST(0.1, (((2.85 + (usable_battery_level * 0.013)) * 96.0) * charger_power / 100.0)) * 1000.0 end) as \"Volt\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "orange", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "kwatt" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 18 - }, - "id": 34, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(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\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Current", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "celsius" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 18 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(outside_temp, '$temp_unit')) as \"Outdoor\" FROM charges WHERE charging_process_id = $charging_processes AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Outdoor", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__timeGroupAlias(date,$__interval), avg(convert_celsius(inside_temp, '$temp_unit')) AS \"Inside\" FROM positions WHERE car_id = $car_id and inside_temp is not null AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Inside", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \t$__timeGroupAlias(date,$__interval), \tavg(convert_celsius(driver_temp_setting, '$temp_unit')) as \"Driver\" FROM positions WHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date) GROUP BY 1 ORDER BY 1 ", - "refId": "Driver", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - } - ], - "refresh": false, - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_charge_time", - "options": [], - "query": "SELECT (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "charging_processes", - "options": [], - "query": "SELECT id FROM charging_processes WHERE car_id = $car_id ORDER BY start_date DESC LIMIT 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_end_time", - "options": [], - "query": "SELECT CASE WHEN end_date IS NULL THEN 'now&refresh=10s' ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END FROM charging_processes WHERE id = $charging_processes", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Current Charge View", - "uid": "jchm9RxutVS7a", - "version": 7, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentDriveView.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentDriveView.json deleted file mode 100644 index 0917402bf8a..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentDriveView.json +++ /dev/null @@ -1,1858 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:286", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "A high level overview of your car", - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - }, - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Current Drive", - "tooltip": "Adjust to current drive", - "type": "link", - "url": "d/jchmkOuP_Fggz/current-drive-view?kiosk&var-car_id=${car_id}&from=${current_drive_start_time}&to=${current_drive_end_time}&var-current_drive=${current_drive}&var-BatteryCapacity=${BatteryCapacity}&var-efficiency=${efficiency}&var-preferred_range=${preferred_range}" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "This is a special dashboard to load while driving. When you open this dashboard it will show the last 15 minutes, but you should click the \"Current Drive\" button at the top right corner, to enter in Kiosk mode:\n\n - If you are driving, you will see the information from the start time of the current drive until now and it will refesh automatically every 30 seconds.\n\n - If you are just browsing (not driving) you will see the information of the last drive.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 5, - "gradientMode": "hue", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "line" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Battery heater" - }, - "properties": [ - { - "id": "unit", - "value": "bool_on_off" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power" - }, - { - "id": "color", - "value": { - "fixedColor": "dark-orange", - "mode": "fixed", - "seriesBy": "last" - } - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "thresholds", - "value": { - "mode": "absolute", - "steps": [ - { - "color": "transparent", - "value": null - }, - { - "color": "dark-green", - "value": 0 - } - ] - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation" - }, - { - "id": "unit", - "value": "lengthm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "light-blue", - "mode": "fixed" - } - }, - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Speed" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - } - ] - } - ] - }, - "gridPos": { - "h": 12, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 26, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.4", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tavg(power) AS Power,\n\tavg(battery_heater::integer) AS \"Battery heater\",\n\tavg(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions\nWHERE\n car_id = $car_id AND\n $__timeFilter(date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Elevation", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Power", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "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": 3, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 24, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM charging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t end_date IS NOT NULL AND\n\t c.car_id = $car_id AND\n\t $__timeFilter(start_date)\n\tORDER BY start_date\n),\n\nrange_loss_between_charges AS (\n SELECT sum(range_loss) AS range_loss\n FROM d\n WHERE distance >= 0 AND range_loss >= 0\n GROUP BY car_id\n),\n\ncharge_dates AS (\n\tSELECT\n\t\tmin(start_date) as first_charge,\n\t\tmax(end_date) as last_charge\n\tFROM\n\t\tcharging_processes\n\tWHERE\n\t\tend_date IS NOT NULL\n\t\tAND car_id = $car_id\n\t\tAND $__timeFilter(start_date)\n),\n\nrange_loss_before_first_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND ((select first_charge from charge_dates) is null OR date < (select first_charge from charge_dates))\n),\n\nrange_loss_after_last_charge AS (\n\tSELECT\n\t\tmax([[preferred_range]]_battery_range_km) - min([[preferred_range]]_battery_range_km) AS range_loss\n\tFROM positions, charge_dates\n\tWHERE\n\t\tcar_id = $car_id\n\t\tAND $__timeFilter(date)\n\t\tAND date > (select last_charge from charge_dates)\t\n),\n\ntotal_range_loss AS (\n SELECT sum(range_loss) as range_loss\n FROM (\n SELECT range_loss FROM range_loss_between_charges\n UNION ALL\n SELECT range_loss FROM range_loss_before_first_charge\n UNION ALL\n SELECT range_loss FROM range_loss_after_last_charge\n ) r\n),\n\ndistance AS (\n SELECT max(odometer) - min(odometer) as distance\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)\n)\n\nSELECT \n NULLIF(range_loss, 0) * (c.efficiency * 1000) / convert_km(NULLIF(distance::numeric, 0), '$length_unit') as \"consumption_$length_unit\"\nFROM total_range_loss, distance\nLEFT JOIN cars c ON c.id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current Consumption", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 3 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN $efficiency\n\t WHEN '$length_unit' = 'mi' THEN $efficiency * 1.60934\n\tEND as \"efficiency_$length_unit\"\nFROM settings\nWHERE\tid = $car_id;\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-orange", - "value": 80 - }, - { - "color": "light-blue", - "value": 100 - } - ] - }, - "unit": "%" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 20, - "y": 6 - }, - "id": 29, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "orderByTime": "ASC", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "SOC", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "dark-red", - "value": null - }, - { - "color": "dark-green", - "value": 7.84 - }, - { - "color": "semi-dark-orange", - "value": 31.36 - }, - { - "color": "light-blue", - "value": 35.28 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 2, - "x": 22, - "y": 6 - }, - "id": 31, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^kwh$/", - "values": false - }, - "showUnfilled": true, - "text": {}, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "groupBy": [ - { - "params": ["$__interval"], - "type": "time" - }, - { - "params": ["null"], - "type": "fill" - } - ], - "measurement": "%", - "metricColumn": "none", - "policy": "default", - "rawQuery": true, - "rawSql": "(SELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM positions\nWHERE car_id = $car_id\nORDER BY date DESC\nLIMIT 1)\nUNION\nSELECT battery_level * $BatteryCapacity / 100 as kWh, date, $BatteryCapacity as Total\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "bargauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 12 - }, - "id": 8, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 12 - }, - "id": 9, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 12 - }, - "id": 16, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "lengthkm" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 12 - }, - "id": 27, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT convert_km((max(odometer) - min(odometer))::numeric, '$length_unit') as \"distance_$length_unit\"\n FROM positions\n WHERE car_id = $car_id AND $__timeFilter(date)", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 12 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 15, - "y": 12 - }, - "id": 6, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(date), convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id \norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 33, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - } - ], - "refresh": "10s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select 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, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive", - "options": [], - "query": "SELECT drive_id FROM positions WHERE car_id = $car_id AND drive_id IS NOT NULL ORDER BY date DESC LIMIT 1;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_start_time", - "options": [], - "query": "SELECT \n (round(extract(epoch FROM start_date) - 10) * 1000) AS start_date_ts\n FROM drives \n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "current_drive_end_time", - "options": [], - "query": "SELECT \n CASE WHEN end_date IS NULL THEN 'now&refresh=10s' \n ELSE CAST(round(extract(epoch FROM end_date) - 10) * 1000 AS VARCHAR(100)) END\n FROM drives\n WHERE id = $current_drive", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "--- Extracted from Battery Health Dashboard", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "BatteryCapacity", - "options": [], - "query": "SELECT AVG(Capacity) AS CurrentCapacity FROM\n (SELECT (100.0 * cp.charge_energy_added) / (GREATEST(1,MAX(usable_battery_level) - MIN(usable_battery_level))) AS Capacity\t\n FROM charging_processes cp\n\t INNER JOIN charges c ON cp.id = c.charging_process_id\n\t WHERE cp.car_id = $car_id AND \n cp.charge_energy_added >= (SELECT efficiency FROM cars WHERE id = 1) * 100.0\n GROUP BY cp.charge_energy_added, cp.end_date\n ORDER BY cp.end_date DESC \n LIMIT 5) AS lastEstimatedCapacity;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "efficiency", - "options": [], - "query": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "hidden": false, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current Drive View", - "uid": "jchmkOuP_Fggz", - "version": 8, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentState.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentState.json deleted file mode 100644 index 4c487639572..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/CurrentState.json +++ /dev/null @@ -1,1841 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "gauge", - "name": "Gauge", - "version": "" - }, - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "panel", - "id": "piechart", - "name": "Pie chart", - "version": "" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "state-timeline", - "name": "State timeline", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:427", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "Only distinguishes between online, offline and asleep.", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^state$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current State", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "dateTimeAsSystem" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 8, - "x": 4, - "y": 0 - }, - "id": 2, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^time$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select $__time(start_date), state from states where car_id = $car_id AND $__timeFilter(start_date) order by start_date desc limit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Last state change", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 0 - }, - "id": 69, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND [[preferred_range]]_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km([[preferred_range]]_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "$preferred_range range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "range_km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "range_mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - } - ] - } - ] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 0 - }, - "id": 70, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT $__time(date), range as \"range_$length_unit\"\nFROM (\n\t(SELECT date, convert_km(est_battery_range_km, '$length_unit') AS range\n\tFROM positions\n\tWHERE car_id = $car_id AND est_battery_range_km IS NOT NULL AND $__timeFilter(date)\n ORDER BY date DESC\n\tLIMIT 1)\n\tUNION ALL\n\t(SELECT date, convert_km(ideal_battery_range_km, '$length_unit') AS range\n\tFROM charges c\n\tJOIN charging_processes p ON p.id = c.charging_process_id\n\tWHERE p.car_id = $car_id AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1)\n) AS data\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "estimated range", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "displayName": "", - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-red", - "value": null - }, - { - "color": "semi-dark-yellow", - "value": 10 - }, - { - "color": "semi-dark-green", - "value": 20 - }, - { - "color": "semi-dark-yellow", - "value": 81 - }, - { - "color": "light-red", - "value": 91 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 85, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "(SELECT battery_level, date FROM positions WHERE car_id = $car_id AND $__timeFilter(date) ORDER BY date DESC LIMIT 1)\nUNION\nSELECT battery_level, date\nFROM charges c\nJOIN charging_processes p ON p.id = c.charging_process_id\nWHERE $__timeFilter(date) AND p.car_id = $car_id\nORDER BY date DESC\nLIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["battery_level"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [] - } - ], - "title": "Battery Level", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 71, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": true - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n convert_tire_pressure(tpms_pressure_fl,'$pressure_unit') AS \"Front left\",\r\n convert_tire_pressure(tpms_pressure_fr,'$pressure_unit') AS \"Front right\",\r\n convert_tire_pressure(tpms_pressure_rl,'$pressure_unit') AS \"Rear left\",\r\n convert_tire_pressure(tpms_pressure_rr,'$pressure_unit') AS \"Rear right\"\r\nFROM\r\n positions\r\nWHERE\r\n car_id = $car_id AND\r\n $__timeFilter(date) AND\r\n tpms_pressure_fl is not null\r\nORDER BY\r\n date DESC LIMIT 1", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Tire Pressure ($pressure_unit)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 14, - "w": 12, - "x": 0, - "y": 3 - }, - "id": 86, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n $__time(date),\n latitude,\n longitude\nFROM positions\nWHERE \n car_id = $car_id AND \n $__timeFilter(date)\nORDER BY \n date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 12, - "y": 4 - }, - "id": 59, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t$__time(date),\n\tconvert_celsius(driver_temp_setting, '$temp_unit') as \"Driver Temperature [°$temp_unit]\"\nFROM positions\nWHERE driver_temp_setting IS NOT NULL AND car_id = $car_id AND $__timeFilter(date)\nORDER BY date DESC\nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Driver Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 15, - "y": 4 - }, - "id": 63, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n date,\n convert_celsius(inside_temp, '$temp_unit') AS \"Inside Temperature [°$temp_unit]\"\nFROM positions\nWHERE\n car_id = $car_id\n and inside_temp is not null AND $__timeFilter(date)\norder by date desc\nlimit 1 ", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Inside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "degree" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 18, - "y": 4 - }, - "id": 61, - "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": ["firstNotNull"], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH last_position AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM positions\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n),\nlast_charge AS (\n\tSELECT date, convert_celsius(outside_temp, '$temp_unit') AS \"Outside Temperature [°$temp_unit]\"\n\tFROM charges\n\tJOIN charging_processes ON charges.charging_process_id = charging_processes.id\n\tWHERE car_id = $car_id AND outside_temp IS NOT NULL AND $__timeFilter(date)\n\tORDER BY date DESC\n\tLIMIT 1\n)\nSELECT * FROM last_position\nUNION ALL\nSELECT * FROM last_charge\nORDER BY date DESC \nLIMIT 1;", - "refId": "A", - "select": [ - [ - { - "params": ["outside_temp"], - "type": "column" - } - ] - ], - "table": "positions", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Outside Temp", - "type": "gauge" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-blue", - "mode": "fixed" - }, - "mappings": [], - "noValue": "-", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 8 - }, - "id": 79, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^coalesce$/", - "values": false - }, - "text": {}, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n COALESCE(g.name, CONCAT_WS(', ', COALESCE(addresses.name, CONCAT_WS(' ', addresses.road, addresses.house_number)), addresses.city))\n\tFROM drives d\n\tLEFT JOIN addresses ON addresses.id = d.end_address_id\n\tLEFT JOIN geofences g ON g.id = d.end_geofence_id\nWHERE\n\t $__timeFilter(d.end_date) AND d.car_id = $car_id \nORDER BY d.end_date DESC\nLIMIT 1", - "refId": "Voltage", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Location", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "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" - } - ], - "noValue": "0", - "unit": "dtdhms" - }, - "overrides": [] - }, - "gridPos": { - "h": 9, - "w": 9, - "x": 15, - "y": 8 - }, - "id": 41, - "options": { - "displayLabels": ["percent", "name"], - "legend": { - "displayMode": "table", - "placement": "right", - "showLegend": true, - "values": ["value", "percent"] - }, - "pieType": "pie", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/^total_time$/", - "values": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [2, 0]) AS state\r\n FROM charging_processes\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [1, 0]) AS state\r\n FROM drives\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n start_date AS date,\r\n CASE\r\n WHEN state = 'offline' THEN 3\r\n WHEN state = 'asleep' THEN 4\r\n WHEN state = 'online' THEN 5\r\n END AS state\r\n FROM states\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n UNION\r\n SELECT\r\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\r\n unnest(ARRAY [6, 0]) AS state\r\n FROM updates\r\n WHERE\r\n car_id = $car_id AND \r\n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \r\n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\r\n), aux AS (\r\n SELECT $__timeFrom() :: timestamp AS date, (SELECT state FROM states WHERE date <= $__timeFrom() ORDER BY date DESC LIMIT 1) AS state, false AS include\r\n UNION\r\n SELECT date, state, true AS include FROM states\r\n UNION\r\n SELECT $__timeTo() :: timestamp as date, NULL AS state, true as include\r\n ORDER BY date\r\n), states_elapsed AS (\r\n SELECT \r\n date, state AS current_state, include,\r\n LAG(state) OVER (ORDER BY date) AS state,\r\n LAG(date) OVER (ORDER BY date) AS last_state_time,\r\n date - LAG(date) OVER (ORDER BY date) AS elapsed_time\r\n FROM aux \r\n)\r\nSELECT \r\n CASE\r\n WHEN state = 0 OR state = 5 THEN 'online'\r\n WHEN state = 1 THEN 'driving'\r\n WHEN state = 2 THEN 'charging'\r\n WHEN state = 3 THEN 'offline'\r\n WHEN state = 4 THEN 'asleep'\r\n WHEN state = 6 THEN 'updating'\r\n END AS state,\r\n EXTRACT(EPOCH FROM SUM(elapsed_time)) as Total_Time\r\nFROM states_elapsed\r\nWHERE $__timeFilter(date) AND include\r\nGROUP BY 1\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "States", - "type": "piechart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "odometer_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "odometer_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 11 - }, - "id": 55, - "links": [ - { - "targetBlank": true, - "title": "Mileage", - "url": "/d/NjtMTFggz/mileage?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(odometer::numeric, '$length_unit') as \"odometer_$length_unit\"\nfrom positions \nwhere car_id = $car_id AND $__timeFilter(date)\norder by date desc \nlimit 1;", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Odometer", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "version" - }, - "properties": [ - { - "id": "unit", - "value": "string" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 14 - }, - "id": 57, - "links": [ - { - "targetBlank": true, - "title": "Updates", - "url": "/d/IiC07mgWz/updates?" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["first"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "/^version$/", - "values": true - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as version \nfrom updates \nwhere car_id = $car_id AND start_date <= $__timeTo()\norder by start_date desc \nlimit 1", - "refId": "A", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Firmware", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "fillOpacity": 100, - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineWidth": 0, - "spanNulls": false - }, - "mappings": [ - { - "options": { - "0": { - "color": "#6ED0E0", - "index": 0, - "text": "online" - }, - "1": { - "color": "#8F3BB8", - "index": 1, - "text": "driving" - }, - "2": { - "color": "#F2CC0C", - "index": 2, - "text": "charging" - }, - "3": { - "color": "#FFB357", - "index": 3, - "text": "offline" - }, - "4": { - "color": "#56A64B", - "index": 4, - "text": "asleep" - }, - "5": { - "color": "#6ED0E0", - "index": 5, - "text": "online" - }, - "6": { - "color": "#E02F44", - "index": 6, - "text": "updating" - }, - "null": { - "index": 7, - "text": "N/A" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 83, - "links": [ - { - "title": "States", - "url": "/d/xo4BNRkZz/states" - } - ], - "options": { - "alignValue": "center", - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "mergeValues": true, - "rowHeight": 0.9, - "showValue": "auto", - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH states AS (\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [2, 0]) AS state\n FROM charging_processes\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [1, 0]) AS state\n FROM drives\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n start_date AS date,\n CASE\n WHEN state = 'offline' THEN 3\n WHEN state = 'asleep' THEN 4\n WHEN state = 'online' THEN 5\n END AS state\n FROM states\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n UNION\n SELECT\n unnest(ARRAY [start_date + interval '1 second', end_date]) AS date,\n unnest(ARRAY [6, 0]) AS state\n FROM updates\n WHERE\n car_id = $car_id AND \n ($__timeFrom() :: timestamp - interval '30 day') < start_date AND \n (end_date < ($__timeTo() :: timestamp + interval '30 day') OR end_date IS NULL)\n)\nSELECT date AS \"time\", state\nFROM states\nWHERE \n date IS NOT NULL AND\n ($__timeFrom() :: timestamp - interval '30 day') < date AND \n date < ($__timeTo() :: timestamp + interval '30 day') \nORDER BY date ASC, state ASC;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "geofences", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Timeline", - "type": "state-timeline" - } - ], - "refresh": "30s", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_temperature from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "temp_unit", - "options": [], - "query": "select unit_of_temperature from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_pressure from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "pressure_unit", - "options": [], - "query": "select unit_of_pressure from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Current State", - "uid": "jchmo4BNRkZz", - "version": 11, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/DCChargingCurvesByCarrier.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/DCChargingCurvesByCarrier.json deleted file mode 100644 index 427731fac92..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/DCChargingCurvesByCarrier.json +++ /dev/null @@ -1,1026 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - }, - { - "type": "panel", - "id": "xychart", - "name": "XY Chart", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:75", - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-RdYlGr" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "pointSize": { - "fixed": 5 - }, - "scaleDistribution": { - "type": "linear" - }, - "show": "points" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byFrameRefID", - "options": "A" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Show charge details", - "url": "d/BHhxFeZRz?from=${__data.fields.start_date.numeric}&to=${__data.fields.end_date.numeric}&var-car_id=${car_id}&var-charging_process_id=${__data.fields.charging_process_id.numeric}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 20, - "x": 0, - "y": 0 - }, - "id": 32, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": false - }, - "series": [ - { - "pointColor": { - "field": "Power [kW]" - }, - "pointSize": { - "fixed": 2, - "max": 100, - "min": 1 - }, - "x": "SOC [%]", - "y": "Power [kW]" - }, - { - "pointColor": { - "field": "B - Avg Power [kW]" - }, - "pointSize": { - "fixed": 12, - "max": 100, - "min": 1 - }, - "x": "B - SOC [%]", - "y": "B - Avg Power [kW]" - } - ], - "seriesMapping": "manual", - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "7.5.11", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n c.battery_level as \"SOC [%]\",\r\n round(avg(c.charger_power), 0) as \"Power [kW]\",\r\n c.charging_process_id as \"charging_process_id\",\r\n COALESCE(g.name, a.name) || ' ' || to_char(c.date, 'YYYY-MM-dd') as \"Charge\",\r\n p.start_date as \"start_date\",\r\n p.end_date as \"end_date\"\r\nFROM\r\n charges c\r\nJOIN charging_processes p ON p.id = c.charging_process_id \r\nJOIN addresses a ON a.id = p.address_id\r\nLEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n $__timeFilter(date)\r\n AND p.car_id = $car_id\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY c.battery_level, c.charging_process_id, a.name, g.name, p.start_date, p.end_date, to_char(c.date, 'YYYY-MM-dd')", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n c.battery_level as \"B - SOC [%]\",\n PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY charger_power) as \"B - Avg Power [kW]\"\nFROM\n charges c\nJOIN charging_processes p ON p.id = c.charging_process_id \nJOIN addresses a ON a.id = p.address_id\nLEFT JOIN geofences g ON g.id = p.geofence_id\nWHERE\n $__timeFilter(date)\n AND p.car_id = $car_id\n AND c.fast_charger_present\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%'\nGROUP BY battery_level", - "refId": "B", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Charger Carrier Contains: $carrier", - "type": "xychart" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 44, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n COALESCE(g.name, a.name) AS name\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id, g.name, a.name\r\n)\r\nSELECT name AS \"Charger Carrier\" FROM data GROUP BY name\r\n\r\n\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 16 - }, - "id": 35, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_added)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Added", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 6, - "y": 16 - }, - "id": 36, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.charge_energy_used)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Energy Used", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "m" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 11, - "y": 16 - }, - "id": 34, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(duration_min)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\n", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Time", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 16, - "y": 16 - }, - "id": 37, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n AVG(p.cost)\r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 16 - }, - "id": 38, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH data AS (\r\nSELECT\r\n AVG(p.charge_energy_used) AS charge_energy_used, AVG(p.cost) AS cost \r\nFROM charging_processes p\r\n LEFT JOIN charges c ON c.charging_process_id = p.id\r\n LEFT JOIN addresses a ON a.id = p.address_id\r\n LEFT JOIN geofences g ON g.id = p.geofence_id\r\nWHERE\r\n p.car_id = $car_id \r\n AND $__timeFilter(start_date)\r\n AND c.fast_charger_present\r\n AND COALESCE(g.name, a.name) ILIKE '%$carrier%' \r\nGROUP BY p.id\r\n)\r\nSELECT AVG(cost) / AVG(charge_energy_used) cost_kwh FROM data", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Avg. Cost per kWh", - "transformations": [], - "transparent": true, - "type": "stat" - }, - { - "collapsed": true, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "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" - } - ], - "title": "Help", - "type": "row" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "description": "Carrier Name", - "hide": 0, - "label": "Carrier", - "name": "carrier", - "options": [ - { - "selected": true, - "text": "", - "value": "" - } - ], - "query": "", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-1M", - "to": "now" - }, - "timepicker": { - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "DC Charging Curves by Carrier", - "uid": "jchmXpkcccIkh", - "version": 6, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/DatabaseDashboadInfo.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/DatabaseDashboadInfo.json deleted file mode 100644 index 1607e0f4915..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/DatabaseDashboadInfo.json +++ /dev/null @@ -1,1233 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 0 - }, - "id": 32, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT ROUND(convert_km((max(odometer) - min(odometer))::numeric, '$length_unit'),0)|| ' $length_unit' as \"Logged\"\nfrom positions where car_id = $car_id;", - "refId": "DistanceLogged", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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;", - "refId": "Odometer", - "select": [ - [ - { - "params": ["efficiency"], - "type": "column" - } - ] - ], - "table": "cars", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Mileage", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 5, - "y": 0 - }, - "id": 36, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Charges\" FROM charging_processes WHERE car_id=$car_id \n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives\" FROM drives WHERE car_id=$car_id ", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Stats", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 10, - "y": 0 - }, - "id": 39, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Nº Car Updates\"\nFROM Updates \nWHERE car_id = $car_id\n", - "refId": "Car Updates", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "select split_part(version, ' ', 1) as \"Current Car Firmware\" \r\nfrom updates \r\nwhere car_id = $car_id \r\norder by start_date desc \r\nlimit 1", - "refId": "Firmware", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Software", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 15, - "y": 0 - }, - "id": 42, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) as \"Charges not closed\"\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\n", - "refId": "Charges", - "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": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT COUNT(id) AS \"Drives not closed\"\r\nFROM drives \r\nWHERE car_id = $car_id AND end_date is null", - "refId": "Drives", - "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" - } - ] - } - ], - "title": "Incomplete Data", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 4, - "w": 4, - "x": 20, - "y": 0 - }, - "id": 40, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "You can go to the
    \nIncomplete Data dashboard
    \nto see details of the **Drives** or **Charges** not closed.\n", - "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" - } - ] - } - ], - "title": "About incomplete data", - "type": "text" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 34, - "panels": [], - "title": "Database Information", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Size" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 0, - "y": 5 - }, - "id": 33, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT \r\n relname AS \"Table\",\r\n pg_size_pretty(pg_total_relation_size(relid)) As \"Size\"\r\nFROM \r\n pg_catalog.pg_statio_user_tables\r\nORDER BY \r\n pg_total_relation_size(relid) DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Row Count" - }, - "properties": [ - { - "id": "custom.align", - "value": "right" - }, - { - "id": "custom.width", - "value": 150 - } - ] - } - ] - }, - "gridPos": { - "h": 16, - "w": 5, - "x": 5, - "y": 5 - }, - "id": 38, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT table_name AS \"Table Name\", \r\n (xpath('/row/cnt/text()', xml_count))[1]::text::int AS \"Row Count\"\r\nFROM (\r\n SELECT table_name, \r\n query_to_xml(format('SELECT count(*) as cnt FROM %I.%I', table_schema, table_name), false, true, '') AS xml_count\r\n FROM information_schema.tables\r\n WHERE table_schema NOT IN ('pg_catalog', 'information_schema')\r\n) AS t\r\nORDER BY 2 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "These statistics can help you evaluate the efficiency of your indexes.\n\nYou should reindex all the database periodically.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 16, - "w": 14, - "x": 10, - "y": 5 - }, - "id": 41, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "rawQuery": true, - "rawSql": "SELECT\r\n relname AS \"Table\",\r\n indexrelname AS \"Index\",\r\n idx_scan AS \"Index Scans\",\r\n idx_tup_read AS \"Tuples Read\",\r\n idx_tup_fetch AS \"Tuples Fetched\"\r\nFROM\r\n pg_stat_all_indexes\r\nWHERE\r\n schemaname NOT LIKE 'pg_%' AND\r\n indexrelname IS NOT NULL\r\nORDER BY 3 DESC;", - "refId": "A", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "Indexes", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 10, - "x": 0, - "y": 21 - }, - "id": 35, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \n pg_size_pretty(SUM(pg_total_relation_size(relid))) As \"Size\"\nFROM \n pg_catalog.pg_statio_user_tables;", - "refId": "DistanceLogged", - "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" - } - ] - } - ], - "title": "Database Total Size", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "links": [ - { - "targetBlank": true, - "title": "Click to check last Version", - "url": "https://github.com/jheredianet/Teslamate-CustomGrafanaDashboards/releases/" - } - ], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-blue", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 14, - "x": 10, - "y": 21 - }, - "id": 43, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "hide": false, - "rawQuery": true, - "rawSql": "SELECT '2024.04.02' AS \"Current Version\"", - "refId": "DashboardVersion", - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - } - } - ], - "title": "About Teslamate Custom Dashboards", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "description": "", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "browser", - "title": "Database Information", - "uid": "jchm_dbInfo", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/IncompleteData.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/IncompleteData.json deleted file mode 100644 index 84e5fce4dcc..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/IncompleteData.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "__elements": [], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "8.5.15" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "iteration": 1686842645876, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "footer": { - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": false - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT 'Car ID: ' || id as id, 'Name: '|| name as name , 'Model: '|| model as model, 'VIN: '|| vin as vin, \n 'Color: '|| exterior_color as color, 'Wheels: '|| wheel_type, 'Efficiency: '|| efficiency as efficiency \nFROM cars\nWHERE id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Car Information 🚘", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 3 - }, - "id": 10, - "options": { - "content": "#### Incomplete Data\n\nFrom here you can check if you have incomplete data of **Drives** and **Charges**. If so, you may follow the official guide by Manually fixing data", - "mode": "markdown" - }, - "pluginVersion": "8.5.15", - "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" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 6 - }, - "id": 15, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id AS \"Drive ID\", start_date, end_date, distance, duration_min \nFROM drives \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Drives 🛣️", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "center", - "displayMode": "auto", - "inspect": false - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 22, - "links": [], - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT id as \"Charging Process ID\", start_date, end_date, charge_energy_added, charge_energy_used, start_battery_level, end_battery_level, duration_min\nFROM charging_processes \nWHERE car_id = $car_id AND end_date is null\nORDER BY start_date DESC\n", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Incomplete Charges 🪫", - "type": "table" - } - ], - "refresh": false, - "schemaVersion": 36, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Incomplete Data", - "uid": "jchmIDopVO_mgz", - "version": 1, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/MileageStats.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/MileageStats.json deleted file mode 100644 index 27ca8a4fe6f..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/MileageStats.json +++ /dev/null @@ -1,816 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "barchart", - "name": "Bar chart", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": "TeslaMate", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 4, - "panels": [], - "repeat": "car_id", - "title": "$car_id", - "type": "row" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false, - "width": 120 - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "red", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "green", - "value": 90 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Time driven" - }, - "properties": [ - { - "id": "unit", - "value": "dtdurations" - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "decimals", - "value": 2 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Period" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Trip", - "url": "d/FkUpJpQZk/trip?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Efficiency" - }, - "properties": [ - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width" - }, - { - "id": "max", - "value": 1 - }, - { - "id": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "# drives" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "targetBlank": true, - "title": "Drives", - "url": "d/Y8upc6ZRk/drives?from=${__data.fields.date_from}&to=${__data.fields.date_to}&var-car_id=$car_id" - } - ] - }, - { - "id": "custom.align", - "value": "auto" - }, - { - "id": "custom.width", - "value": 80 - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.align", - "value": "auto" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_from" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "date_to" - }, - "properties": [ - { - "id": "custom.hidden", - "value": true - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 9, - "x": 0, - "y": 1 - }, - "id": 10, - "maxPerRow": 2, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Starting at" - } - ] - }, - "pluginVersion": "10.1.2", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Stats per ${period}", - "transformations": [ - { - "id": "seriesToColumns", - "options": { - "byField": "date" - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_km" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_km", - "binary": { - "left": "efficiency_charged_net_km_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi_temp", - "binary": { - "left": "sum_consumption_kwh", - "operator": "/", - "reducer": "sum", - "right": "sum_distance_mi" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - }, - "replaceFields": false - } - }, - { - "id": "calculateField", - "options": { - "alias": "efficiency_charged_net_mi", - "binary": { - "left": "efficiency_charged_net_mi_temp", - "operator": "*", - "reducer": "sum", - "right": "1000" - }, - "mode": "binary", - "reduce": { - "reducer": "sum" - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "date": true, - "date_from": false, - "date_to": false, - "efficiency_charged_net_km_temp": true, - "efficiency_charged_net_mi_temp": true, - "timezone": true - }, - "indexByName": { - "avg_consumption_kwh": 9, - "avg_outside_temp_c": 5, - "cnt": 6, - "cnt_charges": 11, - "cost_charges": 10, - "date": 1, - "date_from": 16, - "date_to": 17, - "display": 0, - "efficiency": 7, - "efficiency_charged_net_km": 14, - "efficiency_charged_net_mi": 15, - "efficiency_net_km": 12, - "efficiency_net_mi": 13, - "sum_consumption_kwh": 8, - "sum_distance_km": 3, - "sum_distance_mi": 4, - "sum_duration_h": 2 - }, - "renameByName": { - "avg_consumption_kwh": "Avg charged", - "avg_outside_temp_c": "", - "cnt": "# drives", - "cnt_charges": "# charges", - "cost_charges": "Costs", - "date": "Starting at", - "date_from": "", - "date_to": "", - "display": "Period", - "efficiency": "Efficiency", - "efficiency_net_km": "", - "sum_consumption_kwh": "Energy charged", - "sum_distance_km": "", - "sum_duration_h": "Time driven" - } - } - } - ], - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMin": 0, - "fillOpacity": 80, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineWidth": 1, - "scaleDistribution": { - "type": "linear" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "noValue": "--", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_km/" - }, - "properties": [ - { - "id": "unit", - "value": "km" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "/sum_distance_mi/" - }, - "properties": [ - { - "id": "displayName", - "value": "Distance" - }, - { - "id": "unit", - "value": "mi" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "cnt" - }, - "properties": [ - { - "id": "unit", - "value": "drives" - }, - { - "id": "custom.axisPlacement", - "value": "hidden" - }, - { - "id": "displayName", - "value": "Count" - } - ] - } - ] - }, - "gridPos": { - "h": 14, - "w": 15, - "x": 9, - "y": 1 - }, - "id": 27, - "options": { - "barRadius": 0, - "barWidth": 0.97, - "fullHighlight": false, - "groupWidth": 0.7, - "legend": { - "calcs": ["max", "min"], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "orientation": "auto", - "showValue": "always", - "stacking": "none", - "tooltip": { - "mode": "single", - "sort": "none" - }, - "xTickLabelRotation": 0, - "xTickLabelSpacing": 0 - }, - "pluginVersion": "8.5.6", - "repeatDirection": "h", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "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 date_trunc('$period', start_date::TIMESTAMP) 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 \"Period\",\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 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": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "${length_unit} & drives per ${period}", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": ["sum_distance_km", "cnt", "Period"] - } - } - } - ], - "type": "barchart" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 2, - "includeAll": true, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "month", - "value": "month" - }, - "hide": 0, - "includeAll": false, - "label": "Period", - "multi": false, - "name": "period", - "options": [ - { - "selected": true, - "text": "month", - "value": "month" - }, - { - "selected": false, - "text": "year", - "value": "year" - }, - { - "selected": false, - "text": "day", - "value": "day" - }, - { - "selected": false, - "text": "week", - "value": "week" - } - ], - "query": "month,year,day,week", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-6M", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Mileage Stats", - "uid": "jchmNjtMTFx", - "version": 4, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/SpeedRates.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/SpeedRates.json deleted file mode 100644 index 666e8f8c3cc..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/SpeedRates.json +++ /dev/null @@ -1,1218 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "bargauge", - "name": "Bar gauge", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "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": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "avg_consumption_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_consumption_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Consumption" - }, - { - "id": "unit", - "value": "Wh/mi" - }, - { - "id": "custom.width", - "value": 200 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "km" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "min" - }, - { - "id": "max" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_distance_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Distance" - }, - { - "id": "unit", - "value": "mi" - }, - { - "id": "custom.cellOptions", - "value": { - "mode": "gradient", - "type": "gauge" - } - }, - { - "id": "max" - }, - { - "id": "min" - }, - { - "id": "color", - "value": { - "mode": "continuous-GrYlRd" - } - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (km/h)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_range_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Segment (mph)" - }, - { - "id": "custom.width", - "value": 125 - }, - { - "id": "custom.align", - "value": "center" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_km" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg Speed" - }, - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_speed_mi" - }, - "properties": [ - { - "id": "displayName", - "value": "Avg. Speed" - }, - { - "id": "unit", - "value": "velocitymph" - }, - { - "id": "custom.width", - "value": 120 - }, - { - "id": "decimals", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "avg_power" - }, - "properties": [ - { - "id": "custom.width", - "value": 200 - }, - { - "id": "displayName", - "value": "Avg. Power" - }, - { - "id": "unit", - "value": "kwatt" - }, - { - "id": "decimals", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 13, - "w": 14, - "x": 0, - "y": 0 - }, - "id": 2, - "links": [], - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\r\n BinnedData.speed_bin AS speed_range_$length_unit,\r\n convert_km(BinnedData.total_odometer_distance::numeric, '$length_unit') AS avg_distance_$length_unit,\r\n BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END AS avg_speed_$length_unit,\r\n ((BinnedData.total_energy_consumed / (BinnedData.total_distance * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END)) * 1000 ) / (BinnedData.avg_speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END) AS avg_consumption_$length_unit,\r\n avg_power\r\nFROM\r\n (SELECT\r\n CASE\r\n WHEN elevation_diff >= 1 THEN 'Uphill'\r\n WHEN elevation_diff <= -1 THEN 'Downhill'\r\n ELSE 'Flat'\r\n END AS terrain_type,\r\n ROUND(speed * CASE WHEN '$length_unit' = 'km' THEN 1 WHEN '$length_unit' = 'mi' THEN 0.621371 END / 10, 0) * 10 AS speed_bin,\r\n AVG(power) AS avg_power,\r\n SUM(power::integer * speed::integer / 60.0) AS total_energy_consumed,\r\n SUM(speed / 60.0) AS total_distance,\r\n SUM(odometer_distance) AS total_odometer_distance,\r\n AVG(speed) AS avg_speed,\r\n car_id\r\n FROM\r\n (SELECT\r\n drives.car_id,\r\n positions.speed,\r\n positions.power,\r\n positions.elevation - LAG(positions.elevation) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS elevation_diff,\r\n positions.odometer - LAG(positions.odometer) OVER (PARTITION BY positions.drive_id ORDER BY positions.date) AS odometer_distance\r\n FROM\r\n drives\r\n JOIN positions ON drives.id = positions.drive_id\r\n WHERE\r\n $__timeFilter(drives.start_date)\r\n AND drives.car_id = $car_id\r\n AND drives.end_date IS NOT NULL\r\n AND drives.distance >= convert_km($min_distance::numeric, '$length_unit')\r\n ) AS DifferentialData\r\n GROUP BY speed_bin, terrain_type, car_id\r\n ) AS BinnedData\r\nJOIN cars ON BinnedData.car_id = cars.id\r\nWHERE BinnedData.terrain_type = '$terrain_type'\r\n AND BinnedData.total_distance > 0 \r\n AND BinnedData.total_odometer_distance > 0\r\n AND BinnedData.speed_bin >= $min_speed_segment\r\nORDER BY BinnedData.speed_bin DESC;\r\n", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption by speed - $terrain_type Terrain", - "type": "table" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "distance_km" - }, - "properties": [ - { - "id": "unit", - "value": "km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "distance_mi" - }, - "properties": [ - { - "id": "unit", - "value": "mi" - } - ] - } - ] - }, - "gridPos": { - "h": 6, - "w": 10, - "x": 14, - "y": 0 - }, - "id": 6, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(sum(distance)::numeric, '$length_unit') as \"distance_$length_unit\" \nfrom drives \nwhere $__timeFilter(end_date) and car_id = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Logged Distance", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 14, - "y": 6 - }, - "id": 4, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select \n sum((start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km) * cars.efficiency) / sum(distance) * 1000 * \n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nfrom drives \ninner join cars on cars.id = car_id\nwhere $__timeFilter(end_date) \n and distance is not null and\n start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km >= 0.1 and\n car_id = $car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (net)", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 0, - "mappings": [], - "noValue": "N/A", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#c7d0d9", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "consumption_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "consumption_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 3, - "x": 17, - "y": 6 - }, - "id": 8, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": ["mean"] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["mean"], - "fields": "", - "values": false - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH d1 AS (\n\tSELECT\n\t\tc.car_id,\n\t\tlag(end_[[preferred_range]]_range_km) OVER (ORDER BY start_date) - start_[[preferred_range]]_range_km AS range_loss,\n\t\tp.odometer - lag(p.odometer) OVER (ORDER BY start_date) AS distance\n\tFROM\n\t\tcharging_processes c\n\tLEFT JOIN positions p ON p.id = c.position_id \n\tWHERE\n\t $__timeFilter(end_date)\n\t and end_date IS NOT NULL AND\n\t c.car_id = $car_id\n\tORDER BY\n\t\tstart_date\n),\nd2 AS (\nSELECT\n\tcar_id,\n\tsum(range_loss) AS range_loss,\n\tsum(distance) AS distance\nFROM\n\td1\nWHERE\n\tdistance > 0 AND range_loss >= 0\nGROUP BY\n\tcar_id\n)\nSELECT\nrange_loss * c.efficiency / distance * 1000 *\n CASE WHEN '$length_unit' = 'km' THEN 1\n WHEN '$length_unit' = 'mi' THEN 1.60934\n END AS \"consumption_$length_unit\"\nFROM\n\td2\n\tLEFT JOIN cars c ON c.id = car_id", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Consumption (gross) ", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 0, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-green", - "value": null - } - ] - }, - "unit": "short" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "efficiency_km" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/km" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "efficiency_mi" - }, - "properties": [ - { - "id": "unit", - "value": "Wh/mi" - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 20, - "y": 6 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\tCASE WHEN '$length_unit' = 'km' THEN efficiency\n\t WHEN '$length_unit' = 'mi' THEN efficiency * 1.60934\n\tEND * 1000 as \"efficiency_$length_unit\"\nFROM\n\tcars\nWHERE\n\tid = $car_id;", - "refId": "A", - "select": [ - [ - { - "params": ["charge_energy_added"], - "type": "column" - } - ] - ], - "table": "charges", - "timeColumn": "date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Current $preferred_range efficiency", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "super-light-green", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "seconds_elapsed" - }, - "properties": [ - { - "id": "unit", - "value": "s" - }, - { - "id": "decimals", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 16, - "links": [], - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": true - }, - "showUnfilled": false, - "valueMode": "color" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT \r\n speed_section_$length_unit || CASE WHEN '$length_unit' = 'km' THEN ' km/h' WHEN '$length_unit' = 'mi' THEN ' mph' END AS speed,\r\n SUM(seconds_elapsed) AS seconds_elapsed\r\nFROM (\r\n SELECT\r\n ROUND(convert_km(p.speed::numeric, '$length_unit') / 10,0) * 10 AS speed_section_$length_unit,\r\n EXTRACT(EPOCH FROM (LEAD(p.\"date\") OVER (ORDER BY p.\"date\") - p.\"date\")) AS seconds_elapsed\r\n FROM drives d\r\n INNER JOIN positions p ON p.drive_id = d.id\r\n WHERE\r\n $__timeFilter(d.start_date)\r\n AND d.car_id = $car_id \r\n AND d.end_date IS NOT NULL\r\n AND d.distance >= convert_km($min_distance::numeric,'$length_unit')\r\n AND p.speed > 0.1\r\n) AS drivedata\r\nWHERE speed_section_$length_unit >= $min_speed_segment\r\nGROUP BY speed_section_$length_unit\r\nORDER BY speed_section_$length_unit DESC", - "refId": "A", - "select": [ - [ - { - "params": ["value"], - "type": "column" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ], - "limit": 50 - }, - "timeColumn": "time", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Top Speeds", - "type": "bargauge" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select unit_of_length from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "length_unit", - "options": [], - "query": "select unit_of_length from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "50", - "value": "50" - }, - "hide": 0, - "includeAll": false, - "label": "Min. speed segment", - "multi": false, - "name": "min_speed_segment", - "options": [ - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": false, - "text": "20", - "value": "20" - }, - { - "selected": false, - "text": "30", - "value": "30" - }, - { - "selected": false, - "text": "40", - "value": "40" - }, - { - "selected": true, - "text": "50", - "value": "50" - } - ], - "query": "10,20,30,40,50", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": true, - "text": "25", - "value": "25" - }, - "hide": 0, - "includeAll": false, - "label": "Min. driving distance", - "multi": false, - "name": "min_distance", - "options": [ - { - "selected": false, - "text": "1", - "value": "1" - }, - { - "selected": false, - "text": "5", - "value": "5" - }, - { - "selected": false, - "text": "10", - "value": "10" - }, - { - "selected": true, - "text": "25", - "value": "25" - }, - { - "selected": false, - "text": "50", - "value": "50" - }, - { - "selected": false, - "text": "100", - "value": "100" - }, - { - "selected": false, - "text": "150", - "value": "150" - }, - { - "selected": false, - "text": "200", - "value": "200" - } - ], - "query": "1,5,10,25,50,100,150,200", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select base_url from settings limit 1;", - "hide": 2, - "includeAll": false, - "label": "", - "multi": false, - "name": "base_url", - "options": [], - "query": "select base_url from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - "hide": 0, - "includeAll": false, - "label": "Terrain Type", - "multi": false, - "name": "terrain_type", - "options": [ - { - "selected": true, - "text": "Flat", - "value": "Flat" - }, - { - "selected": false, - "text": "Uphill", - "value": "Uphill" - }, - { - "selected": false, - "text": "Downhill", - "value": "Downhill" - } - ], - "query": "Flat, Uphill, Downhill", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - } - ] - }, - "time": { - "from": "now-30d", - "to": "now" - }, - "timepicker": { - "hidden": false, - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Speed Rates", - "uid": "jchmfu4SiQgWz", - "version": 10, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/TrackingDrives.json b/incubator/TeslaMate/1.0.4/dashboards/teslamate2/TrackingDrives.json deleted file mode 100644 index 47a5a0d8b45..00000000000 --- a/incubator/TeslaMate/1.0.4/dashboards/teslamate2/TrackingDrives.json +++ /dev/null @@ -1,1363 +0,0 @@ -{ - "__elements": {}, - "__requires": [ - { - "type": "panel", - "id": "geomap", - "name": "Geomap", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.2" - }, - { - "type": "datasource", - "id": "postgres", - "name": "PostgreSQL", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "stat", - "name": "Stat", - "version": "" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "$$hashKey": "object:24", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "definition": "TeslaMate|U2FsdGVkX1/cEWK+8cz7pjEKXtzJnDN7b21ZDXt1MGneFGPWTLqOPtxKmu02mJPLzi/f29I+NBHd3vi0FB8R4Xn0+GtobWDgk6VAVSBTdSNniOKO8i2WPlhRaOsl2+hG7gnZ7wrf1Th2nxR7f1uYCrbwOek0IzkfLzrkjh7gkr6inT6bbDuJqrmogZajLxmAMrQ6V+/vHxBRGiwjJhgiEeq3hM1q2h04JKkNiZ8RHbsF5Cd/xd8Q9u0JVrZzIrtnhM/SFlaApU7RtRMu8CSj1llTX7WEOj6VDZAMSf+XUAanWdk725kEPN9MNu89o2zEq5P3E3cju8IbbBdPzXLV3oVuzD6/tMnxFToIIV1E/BrpF7s2RtNa8+KJJ1PF8xgs6m+/KTD2hy+WsP0636AgObRAmYg7+qotGrgNvpNPdE0EgrB7WHYlV7R/1q66bcq6tCe51X1Un70k+zo+K6AK0o4B1H6IyMlEVuRH/Fz8QVl9aYu2ztd08RbuKJlYVKpkH+pxVETAO9MclYQ90tzE6TfwDZrQZzsAlMenr4s1ZB1OlFXjLjVjnddnUilzO76cqv4yI2THQEuyQ47nuVQ4gUbx02K59vMQhns3C01JOAYokOaSXe66Y7QYdMlk09Lf|aes-256-cbc", - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": null, - "links": [ - { - "icon": "dashboard", - "tags": [], - "title": "TeslaMate", - "tooltip": "", - "type": "link", - "url": "[[base_url:raw]]" - }, - { - "asDropdown": true, - "icon": "external link", - "tags": ["tesla"], - "title": "Dashboards", - "type": "dashboards" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": ["TeslamateCustomDashboards"], - "targetBlank": false, - "title": "Custom Dashboards", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "battery_heater" - }, - "properties": [ - { - "id": "displayName", - "value": "Battery heater (On/Off)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "power" - }, - "properties": [ - { - "id": "displayName", - "value": "Power (kW)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "elevation_m" - }, - "properties": [ - { - "id": "displayName", - "value": "Elevation (m)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (km/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "displayName", - "value": "Speed (mi/h)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "soc" - }, - "properties": [ - { - "id": "displayName", - "value": "SOC (%)" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Battery heater (On/Off)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-red", - "mode": "fixed" - } - } - ] - }, - { - "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", - "options": "Power (kW)" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "semi-dark-orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Rated Efficiency (kWh/100km)" - }, - "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": "min", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Elevation (m)" - }, - "properties": [ - { - "id": "decimals", - "value": 0 - }, - { - "id": "min", - "value": 0 - } - ] - } - ] - }, - "gridPos": { - "h": 17, - "w": 15, - "x": 0, - "y": 0 - }, - "hideTimeOverride": false, - "id": 8, - "links": [], - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "8.5.15", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "time_series", - "group": [], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n\t$__time(date),\n\tAVG(convert_km(speed::numeric, '$length_unit')) AS speed_[[length_unit]]h,\n\tAVG(power) AS Power,\n\tAVG(battery_level) AS SOC,\n\tAVG(battery_heater::integer * 100) AS battery_heater,\n\tAVG(ROUND(convert_m(elevation, '$alternative_length_unit'))) AS elevation_[[alternative_length_unit]]\nFROM\n\tpositions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nGROUP BY 1 \nORDER BY\n\tdate ASC", - "refId": "Power", - "select": [ - [ - { - "params": ["id"], - "type": "column" - } - ] - ], - "table": "charging", - "timeColumn": "Datum", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Drive", - "type": "timeseries" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "red", - "mode": "thresholds" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 20, - "w": 9, - "x": 15, - "y": 0 - }, - "id": 18, - "links": [], - "maxDataPoints": 50000, - "options": { - "basemap": { - "config": {}, - "name": "Layer 0", - "type": "osm-standard" - }, - "controls": { - "mouseWheelZoom": true, - "showAttribution": true, - "showDebug": false, - "showMeasure": false, - "showScale": false, - "showZoom": true - }, - "layers": [ - { - "config": { - "arrow": 0, - "style": { - "color": { - "fixed": "dark-blue" - }, - "lineWidth": 2, - "opacity": 1, - "rotation": { - "fixed": 0, - "max": 360, - "min": -360, - "mode": "mod" - }, - "size": { - "fixed": 3, - "max": 15, - "min": 2 - }, - "symbol": { - "field": "", - "fixed": "", - "mode": "fixed" - }, - "symbolAlign": { - "horizontal": "center", - "vertical": "center" - }, - "textConfig": { - "fontSize": 12, - "offsetX": 0, - "offsetY": 0, - "textAlign": "center", - "textBaseline": "middle" - } - } - }, - "location": { - "mode": "auto" - }, - "name": "route", - "opacity": 1, - "tooltip": true, - "type": "route" - } - ], - "tooltip": { - "mode": "details" - }, - "view": { - "allLayers": true, - "id": "fit", - "lat": 0, - "lon": 0, - "zoom": 15 - } - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "alias": "", - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "editorMode": "code", - "format": "time_series", - "group": [ - { - "params": ["$__interval", "none"], - "type": "time" - } - ], - "hide": false, - "metricColumn": "none", - "rawQuery": true, - "rawSql": "WITH journey AS (SELECT start_date, end_date FROM drives WHERE id = $journey)\nSELECT\n $__time(date), latitude, longitude\nFROM positions, journey\nWHERE\n car_id = $car_id AND (date BETWEEN journey.start_date AND journey.end_date)\nORDER BY date ASC", - "refId": "A", - "select": [ - [ - { - "params": ["lat"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ], - [ - { - "params": ["lng"], - "type": "column" - }, - { - "params": ["avg"], - "type": "aggregate" - }, - { - "params": ["lat"], - "type": "alias" - } - ] - ], - "sql": { - "columns": [ - { - "parameters": [], - "type": "function" - } - ], - "groupBy": [ - { - "property": { - "type": "string" - }, - "type": "groupBy" - } - ] - }, - "table": "pos", - "timeColumn": "Datum", - "timeColumnType": "datetime", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "geomap" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-purple", - "value": null - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "sec_diff" - }, - "properties": [ - { - "id": "displayName", - "value": "Duration" - }, - { - "id": "unit", - "value": "clocks" - }, - { - "id": "decimals", - "value": 1 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "displayName", - "value": "Consumption" - }, - { - "id": "unit", - "value": "Wh/km" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 17 - }, - "id": 14, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "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", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "description": "", - "fieldConfig": { - "defaults": { - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "light-blue", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "km" - }, - "properties": [ - { - "id": "unit", - "value": "lengthkm" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "mi" - }, - "properties": [ - { - "id": "unit", - "value": "lengthmi" - }, - { - "id": "displayName", - "value": "Distance" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_mih" - }, - "properties": [ - { - "id": "unit", - "value": "velocitymih" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "speed_kmh" - }, - "properties": [ - { - "id": "unit", - "value": "velocitykmh" - }, - { - "id": "displayName", - "value": "Avg Speed" - } - ] - } - ] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 5, - "y": 17 - }, - "id": 12, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "auto" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "select convert_km(distance::numeric, '$length_unit') as \"$length_unit\" from drives where id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "hide": false, - "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", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "decimals": 2, - "displayName": "Energy used", - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-orange", - "value": null - } - ] - }, - "unit": "kwatth" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 17 - }, - "id": 16, - "links": [], - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "format": "table", - "group": [], - "metricColumn": "none", - "rawQuery": true, - "rawSql": "SELECT\n\t(NULLIF(GREATEST(start_[[preferred_range]]_range_km - end_[[preferred_range]]_range_km, 0), 0) * car.efficiency)\nFROM\n\tdrives d\nJOIN cars car ON car.id = car_id\nWHERE\n\td.id = $journey;", - "refId": "A", - "select": [ - [ - { - "params": ["latitude"], - "type": "column" - } - ] - ], - "table": "addresses", - "timeColumn": "inserted_at", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Energy used", - "type": "stat" - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 17 - }, - "id": 10, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "vertical", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "/.*/", - "values": false - }, - "text": { - "titleSize": 16 - }, - "textMode": "value_and_name" - }, - "pluginVersion": "10.1.2", - "targets": [ - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "A", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - }, - { - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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", - "refId": "B", - "select": [ - [ - { - "params": ["start_km"], - "type": "column" - } - ] - ], - "table": "drives", - "timeColumn": "start_date", - "timeColumnType": "timestamp", - "where": [ - { - "name": "$__timeFilter", - "params": [], - "type": "macro" - } - ] - } - ], - "title": "Elevation", - "type": "stat" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": ["TeslamateCustomDashboards"], - "templating": { - "list": [ - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "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" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "alternative_length_unit", - "options": [], - "query": "select case when unit_of_length = 'km' then 'm' when unit_of_length = 'mi' then 'ft' end from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "hide": 0, - "includeAll": false, - "label": "Car", - "multi": false, - "name": "car_id", - "options": [], - "query": "SELECT name AS __text, id AS __value FROM cars ORDER BY display_priority ASC, name ASC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Year", - "options": [], - "query": "SELECT TO_CHAR(start_date, 'YYYY') as year FROM drives\nWHERE car_id = $car_id\nGROUP BY 1\nORDER BY 1 DESC;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Month", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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);", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "Day", - "options": [], - "query": "(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);", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "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;", - "hide": 0, - "includeAll": false, - "label": "Journey", - "multi": false, - "name": "journey", - "options": [], - "query": "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;", - "refresh": 1, - "regex": "/route=\"(?[^\"]+)|id=\"(?[^\"]+)/g", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": {}, - "datasource": { - "type": "postgres", - "uid": "TeslaMate" - }, - "definition": "select preferred_range from settings limit 1;", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "preferred_range", - "options": [], - "query": "select preferred_range from settings limit 1;", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "2023-11-28T12:32:29.961Z", - "to": "2023-11-28T12:40:33.863Z" - }, - "timepicker": { - "hidden": true, - "refresh_intervals": [] - }, - "timezone": "", - "title": "Tracking Drives", - "uid": "jchmX8upc6ZRk", - "version": 3, - "weekStart": "" -} diff --git a/incubator/TeslaMate/1.0.4/icon-small.webp b/incubator/TeslaMate/1.0.4/icon-small.webp deleted file mode 100644 index 06f97ddfd5f87d7c972ecb515d4014afa6488852..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 394 zcmV;50d@XTNk&G30RRA3MM6+kP&il$0000G0000V0018V06|PpNWK6700DrqZQHWu z!QCY}jRwu;ZjCgTM%zK#FK~-qEiGDO$$j13mvBD+zUPZ;5itS4U!Huv9gqTk^pGHk zaypFVn9mWcnOO^leCUPXdEY4$6xt&M?gsgp=L&@2?5Lhg+WkbJ-XtU}nyoT{T-uN` zdI%9)7%4IO{ylmb2{Eb}ilqWpeoD#!sJXy7hyb@T^(X8zDFfcF)e^triW7uN8m{@A zR7wC*JMzc&J*)!cz-EacimPrAv132o00IG4P&go-0001x0|1=?Dj)zL00ICsC8Pin zU^y|tz?ax$YJ2NN!H(UtZe<_<0RH(9blPKk_dm~BA;C@uwcc-c#zoiav#)cBfJxvQ z`d;~F=@~qr^)$;yhD`dvKcM2LQXKGVKcV~VKUQz)t9@a58u0Ji|4*D&gK~mnE`2=0 ok_w|8siR6Za@8B31{EY3AJ%W{hs0_E8sx>!g@MUM*LnZ|07!PLy8r+H diff --git a/incubator/TeslaMate/1.0.4/icon.webp b/incubator/TeslaMate/1.0.4/icon.webp deleted file mode 100644 index c68d6fd7df6a04725889d4e15afec70d644b339a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1988 zcmV;#2RryuNk&Gz2LJ$9MM6+kP&il$0000G0001$005N$06|PpNYw-Y00E!{0ALx( zN;+D5*1Na%o^SVT+qP}nwr$%tw`be-t!+(rn&kO)+GM^SB4PpnB|Ul_{hXine05z*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zXSg|FE%a=&=80egTzF$_YxIn;YmEY1=xq=ua8MjARbAa8P zMYXNTVtkq#Y6bz*t%7?TEBqTcacy&N4PZUg)}4Mm5C55vdTMAnYhVg0oI34(o%;ud zl-tW2Swdhc`i(sIF)lgr=kuLyt$|5t7d3F!#4dqqKuZ8tP&gpK0ssK;6#$(9DwY72 z06vL2mPe%{q9HRscrc(5327$*WI_l6_y8NNueX*)85*y9;a(nlsrUM?LtXLsesR4c^|$8djJ|WHmND6dqyui!P{;f>Kq)Xi_~3i*!teqH%AS>mc+A9 zbG=_shA)oZ>GeZ+5xluB(BX9K~Whd@P{<0fg4Vl zM0qhB9yst*yG$I71P`R*^@l(J{-&@FWCWPBe0DM5N&_{b{FgK5XT_(1hM9o~Rp85T zzAbX56iL6i#uB+M6NIpU4#&hN^?BHHD=MzM!GSvy!}KI%qwvZqpC=Xutq5TVAY(;r z_urc1`!tBGfF3nCtgBzxN%nX^Nb()H+WXuqCVtF>{oskfJ_#|-e8%?)3sr#ng8rF| z_>?Csr zI9@TNxHxplq@;Bc1U3wBo-2JF+2mp`-7=0;#42xl3WBq)7^k@;)||lCv8=xuhU+l8 zUqA+z8(kzfSY75mRcole=oAx+gt%v{hp%2S8>GD0%A|{j24GY{_ zU%Z==c8MlteyICquv5Y<{h5_P2Ei9$+qSyp=xSj6>b)OBU;l>xCfwyc2}{2z&MI!K WQm1xc!%47n0V*8herjL<0002EX|MhO diff --git a/incubator/TeslaMate/1.0.4/ix_values.yaml b/incubator/TeslaMate/1.0.4/ix_values.yaml deleted file mode 100644 index dc76692a496..00000000000 --- a/incubator/TeslaMate/1.0.4/ix_values.yaml +++ /dev/null @@ -1,84 +0,0 @@ -image: - repository: teslamate/teslamate - pullPolicy: IfNotPresent - tag: 1.28.5@sha256:aa3f37ecccc7ea77fa1e259391c8f2a05533e208228a42ebb4dbe560828db057 - -securityContext: - container: - readOnlyRootFilesystem: false - -service: - main: - ports: - main: - protocol: http - port: 4000 - -workload: - main: - replicas: 1 - strategy: RollingUpdate - podSpec: - containers: - main: - env: - ENCRYPTION_KEY: - secretKeyRef: - name: teslamate-secrets - key: TESLAMATE_ENCRYPTION_KEY - DATABASE_USER: "{{ .Values.cnpg.main.user }}" - DATABASE_PASS: - secretKeyRef: - name: cnpg-main-user - key: password - DATABASE_NAME: "{{ .Values.cnpg.main.database }}" - DATABASE_HOST: - secretKeyRef: - name: cnpg-main-urls - key: host - DISABLE_MQTT: true - MQTT_HOST: "" - MQTT_PORT: 1883 - MQTT_USERNAME: "" - MQTT_PASSWORD: "" - -configmap: - datasource: - enabled: true - labels: - grafana_datasources: "1" - data: - datasourceteslamatepsql.yaml: |- - apiVersion: 1 - datasources: - - name: TeslaMate - type: postgres - uid: TeslaMate - url: {{ printf "%s.%s:5432" (.Values.cnpg.main.creds.host | trimAll "\"") .Release.Namespace }} - access: proxy - user: {{ .Values.cnpg.main.user }} - secureJsonData: - password: {{ .Values.cnpg.main.creds.password | default "na" }} - jsonData: - database: {{ .Values.cnpg.main.database }} - sslmode: 'disable' # disable/require/verify-ca/verify-full - maxOpenConns: 100 # Grafana v5.4+ - maxIdleConns: 100 # Grafana v5.4+ - maxIdleConnsAuto: true # Grafana v9.5.1+ - connMaxLifetime: 14400 # Grafana v5.4+ - postgresVersion: 1500 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10 - timescaledb: false - -portal: - open: - enabled: true - -cnpg: - main: - enabled: true - user: teslamate - database: teslamate - cluster: - initdb: - postInitApplicationSQL: - - ALTER USER teslamate WITH SUPERUSER diff --git a/incubator/TeslaMate/1.0.4/questions.yaml b/incubator/TeslaMate/1.0.4/questions.yaml deleted file mode 100755 index bd2a3b89f95..00000000000 --- a/incubator/TeslaMate/1.0.4/questions.yaml +++ /dev/null @@ -1,3224 +0,0 @@ -groups: - - name: Image - description: | - Configured the images to be used for the Chart. - It's wise to use "digest pinned" tags and to avoid using "latest". - - Checkout the following documentation for more information: - - https://truecharts.org/common/#images - - - - name: General - description: | - For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general. - - Checkout the following documentation for more information: - - https://truecharts.org/common/global/ - - https://truecharts.org/common/#tz - - https://truecharts.org/common/podoptions/ - - Image Pull Secrets - - - - name: Workload - description: | - These settings configure how the actual Pods and containers are running. - Generally, on SCALE, we only expose a limited subset of these settings for the primary workload and container. - - Checkout the following documentation for more information: - - https://truecharts.org/common/workload/ - - https://truecharts.org/common/container/ - - - - name: App Configuration - description: | - Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application. - Most options should have a Tooltip (Circled Question Mark) to further describe said option. - - To find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/ - - - name: Services - description: | - Service and Networking options for any applications are contained here. - Some applications may have complicated networking setups with multiple options or some may have no options here at all. - - Options here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes. - - Checkout the following documentation for more information: - - https://truecharts.org/common/service/ - - - name: Networking - description: | - Contains advanced networking options that are not actively supported by the TrueCharts team. - Currently only contains scaleExternalInterfaces. - - Checkout the following documentation for more information: - - https://truecharts.org/common/scaleexternalinterface/ - - - name: Persistence - description: | - Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types. - This storage is called Persistence since it is not deleted upon restart or upgrade of an application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/ - - https://truecharts.org/scale/guides/nfs-share/ - - https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath - - - - name: Ingress - description: | - Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names). - If you choose to enable this you must have a "Ingress Provider" aka "Reverse Proxy" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/) - It also requiresa DNS service to actually resolve the DNS name of the FQDN specified. - - Checkout the following documentation for more information: - - https://truecharts.org/common/ingress/ - - - - name: SecurityContext - description: | - The security settings for each application and/or permissions that each application may have for the files/directories created. - Each application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities. - - Unless necessary users are advised to keep this section mostly to defaults. - - Checkout the following documentation for more information: - - https://truecharts.org/common/securitycontext/ - - - - name: Resources - description: | - Resources limits that have been defined by each application are in this section. - Most will have a specific default that some users may want to change based on their specific hardware or needs. - - This also contains the options to mount GPUs or, more precisely, "request" GPU's to be mounted. - - Checkout the following documentation for more information: - - https://truecharts.org/common/resources/ - - - name: Devices - description: | - These are special "mountpoints" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts. - For clearity we've decided to seperate this from persistence on SCALE. - - Checkout the following documentation for more information: - - https://truecharts.org/common/persistence/device/ - - https://truecharts.org/scale/guides/pci-passthrough/ - - - name: Middlewares - description: Traefik Middlewares - - - name: StorageClass - description: | - StorageClasses define where to storage Storage. - - Checkout the following documentation for more information: - - - name: Metrics - description: | - Contains options to configure Prometheus metrics for the application. - - Checkout the following documentation for more information: - - https://truecharts.org/common/metrics/ - - - - name: Addons - description: | - Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application’s defaults. - Things included here are VPN addons, Codeserver for editing files inside the application’s container, Netshoot for network troubelshooting, etc. - - Generally not required for use but may be necessary or usefull at times for specific applications. - - Checkout the following documentation for more information: - - https://truecharts.org/common/addons/ - - https://truecharts.org/scale/guides/vpn-setup/ - - - - name: Experimental - description: | - Experimental Configuration Options - Often these are not fully flushed-out, could randomly break or might not work at-all. - - - name: Postgresql - description: | - For Postgresql we use "CloudNative-PG" as a backend, which has to be installed first. - - Checkout the following documentation for more information: - - https://truecharts.org/common/cnpg/ - - https://truecharts.org/scale/guides/sql-export/ - - https://truecharts.org/scale/guides/recover-cnpg/ - - - name: Dependencies - description: | - contains dependency setting for which we, currently, do not have seperate catagories (yet) - - - - name: Documentation - description: | - We added this section to make everyone aware that OpenSource isn't always easy. - It doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects. - - Before installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/ - We would also advice going over our https://truecharts.org/scale/guides/scale-intro/ - and many of the other documentation pages... - -portals: - open: - protocols: - - "$kubernetes-resource_configmap_tcportal-open_protocol" - host: - - "$kubernetes-resource_configmap_tcportal-open_host" - ports: - - "$kubernetes-resource_configmap_tcportal-open_port" - -questions: - - variable: global - group: General - label: "Global Settings" - schema: - additional_attrs: true - type: dict - attrs: - - variable: stopAll - label: Stop All - description: "Stops All Running pods and hibernates cnpg" - schema: - type: boolean - default: false - - - variable: credentialsList - group: General - label: "Credentials (Experimental)" - schema: - type: list - default: [] - items: - - variable: credentialsEntry - label: "Enter Credentials" - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: "Name" - schema: - type: string - required: true - default: "" - - variable: type - label: Type - description: "Type of Credential" - schema: - type: string - default: "s3" - enum: - - value: s3 - description: s3 Storage - - variable: url - label: "url" - schema: - type: string - default: "" - required: true - - variable: path - label: "path" - description: "Path Prefix not needed for most cases" - schema: - type: string - default: "" - - variable: bucket - label: "bucket" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - required: true - - variable: accessKey - label: "accessKey" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - required: true - - variable: secretKey - label: "secretKey" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "" - required: true - - variable: encrKey - label: "encrKey" - description: "The Encryption key is needed for tools like volsync if not needed it will be ignored" - schema: - show_if: [["type", "=", "s3"]] - type: string - default: "MYSECRETPASSPHRASE" - required: true - - - variable: workload - group: "Workload" - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type (Advanced) - schema: - type: string - default: Deployment - enum: - - value: Deployment - description: Deployment - - value: DaemonSet - description: DaemonSet - - - variable: replicas - label: Replicas (Advanced) - description: Set the number of Replicas - schema: - type: int - show_if: [["type", "!=", "DaemonSet"]] - default: 1 - - - variable: podSpec - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: containers - label: Containers - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: Main Container - schema: - additional_attrs: true - type: dict - attrs: - - - 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]] - - - variable: envList - label: Extra Environment Variables - description: "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting..." - schema: - type: list - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - - variable: value - label: Value - schema: - type: string - - variable: extraArgs - label: Extra Args - schema: - type: list - default: [] - items: - - variable: arg - label: Arg - schema: - type: string - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: command - label: Command - schema: - type: list - default: [] - items: - - variable: param - label: Param - schema: - type: string - - - variable: TZ - label: Timezone - group: "General" - schema: - type: string - default: "Etc/UTC" - $ref: - - "definitions/timezone" - - - variable: podOptions - group: "General" - label: "Global Pod Options (Advanced)" - schema: - additional_attrs: true - type: dict - attrs: - - variable: expertPodOpts - label: "Expert - Pod Options" - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hostNetwork - label: "Host Networking" - schema: - type: boolean - default: false - - variable: dnsConfig - label: "DNS Configuration" - schema: - type: dict - additional_attrs: true - attrs: - - variable: options - label: "Options" - schema: - type: list - default: [{"name": "ndots", "value": "1"}] - items: - - variable: optionsEntry - label: "Option Entry" - schema: - type: dict - additional_attrs: true - attrs: - - variable: name - label: "Name" - schema: - type: string - required: true - - variable: value - label: "Value" - schema: - type: string - - variable: nameservers - label: "Nameservers" - schema: - type: list - default: [] - items: - - variable: nsEntry - label: "Nameserver Entry" - schema: - type: string - required: true - - variable: searches - label: "Searches" - schema: - type: list - default: [] - items: - - variable: searchEntry - label: "Search Entry" - schema: - type: string - required: true - - - variable: imagePullSecretList - group: "General" - label: "Image Pull Secrets" - schema: - type: list - default: [] - items: - - variable: pullsecretentry - label: "Pull Secret" - schema: - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: true - - variable: data - label: Data - schema: - type: dict - additional_attrs: true - attrs: - - variable: registry - label: "Registry" - schema: - type: string - required: true - default: "https://index.docker.io/v1/" - - variable: username - label: "Username" - schema: - type: string - required: true - default: "" - - variable: password - label: "Password" - schema: - type: string - required: true - private: true - default: "" - - variable: email - label: "Email" - schema: - type: string - required: true - default: "" - - - variable: service - group: Services - label: Configure Service(s) - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service" - description: "The Primary service on which the healthcheck runs, often the webUI" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Service - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "Service's Port(s) Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Service Port Configuration" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: "Port" - description: "This port exposes the container port on the service" - schema: - type: int - default: 10038 - required: true - - variable: scaleExternalInterface - description: 'Add External Interfaces (Experimental, might change or be removed without further notice)' - label: Add external Interfaces (Experimental) - group: Networking - schema: - type: list - items: - - variable: interfaceConfiguration - description: Interface Configuration - label: Interface Configuration - schema: - additional_attrs: true - type: dict - $ref: - - "normalize/interfaceConfiguration" - attrs: - - variable: hostInterface - description: Please Specify Host Interface - label: Host Interface - schema: - type: string - required: true - $ref: - - "definitions/interface" - - variable: ipam - description: Define how IP Address will be managed - label: IP Address Management - schema: - additional_attrs: true - type: dict - required: true - attrs: - - variable: type - description: Specify type for IPAM - label: IPAM Type - schema: - type: string - required: true - enum: - - value: dhcp - description: Use DHCP - - value: static - description: Use Static IP - - variable: staticIPConfigurations - label: Static IP Addresses - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticIP - label: Static IP - schema: - type: ipaddr - cidr: true - - variable: staticRoutes - label: Static Routes - schema: - type: list - show_if: [["type", "=", "static"]] - items: - - variable: staticRouteConfiguration - label: Static Route Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: destination - label: Destination - schema: - type: ipaddr - cidr: true - required: true - - variable: gateway - label: Gateway - schema: - type: ipaddr - cidr: false - required: true - - - - variable: serviceList - label: Add Manual Custom Services - group: Services - schema: - type: list - default: [] - items: - - variable: serviceListEntry - label: Custom Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the service - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: LoadBalancer - description: LoadBalancer (Expose Ports) - - value: ClusterIP - description: ClusterIP (Do Not Expose Ports) - - value: Simple - description: Deprecated CHANGE THIS - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: advancedsvcset - label: Show Advanced Service Settings - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: externalIPs - label: "External IP's" - description: "External IP's" - schema: - type: list - default: [] - items: - - variable: externalIP - label: External IP - schema: - type: string - - variable: ipFamilyPolicy - label: IP Family Policy - description: Specify the IP Policy - schema: - type: string - default: SingleStack - enum: - - value: SingleStack - description: SingleStack - - value: PreferDualStack - description: PreferDualStack - - value: RequireDualStack - description: RequireDualStack - - variable: ipFamilies - label: IP Families - description: (Advanced) The IP Families that should be used - schema: - type: list - default: [] - items: - - variable: ipFamily - label: IP Family - schema: - type: string - - variable: portsList - label: Additional Service Ports - schema: - type: list - default: [] - items: - - variable: portsListEntry - label: Custom ports - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Port - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Port Name - schema: - type: string - default: "" - - variable: protocol - label: Port Type - schema: - type: string - default: tcp - enum: - - value: http - description: HTTP - - value: https - description: HTTPS - - value: tcp - description: TCP - - value: udp - description: UDP - - variable: targetPort - label: Target Port - description: This port exposes the container port on the service - schema: - type: int - required: true - - variable: port - label: Container Port - schema: - type: int - required: true - - - variable: persistence - label: Integrated Persistent Storage - description: Integrated Persistent Storage - group: Persistence - schema: - additional_attrs: true - type: dict - attrs: - - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: pvc - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - value: iscsi - description: iSCSI Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
    - Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size quotum of Storage (Do NOT REDUCE after installation) - description: This value can ONLY be INCREASED after the installation - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: volsync - label: 'VolSync (Experimental)' - description: Backup, Restore and Synchronise PVC storage - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: VolSyncEntry - label: VolSync Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: "Name of backup configuration" - schema: - type: string - default: "" - required: true - - variable: type - label: Type VolSync/Backup - description: Sets the VolSync Type - schema: - type: string - default: "restic" - enum: - - value: restic - description: Restic - - variable: credentials - label: Credentials - description: "Name of credentials in the credentials section" - schema: - type: string - default: "" - required: true - - variable: dest - label: VolSync Destination (Restore) - description: VolSYnc Destination is the location where data is the reciever and configures recovery of backups - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: src - label: VolSync Source (Backup) - description: VolSYnc Source is the location where data is the sender and creates backups to storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: disabled - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: persistenceList - label: Additional App Storage - group: Persistence - schema: - type: list - default: [] - items: - - variable: persistenceListEntry - label: Custom Storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the storage - schema: - type: boolean - default: true - hidden: true - - variable: type - label: Type of Storage - description: Sets the persistence type, Anything other than PVC could break rollback! - schema: - type: string - default: hostPath - enum: - - value: pvc - description: PVC - - value: hostPath - description: Host Path - - value: emptyDir - description: emptyDir - - value: nfs - description: NFS Share - - variable: server - label: NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: path - label: Path on NFS Server - schema: - show_if: [["type", "=", "nfs"]] - type: string - default: "" - - variable: iscsi - label: iSCSI Options - schema: - show_if: [["type", "=", "iscsi"]] - type: dict - additional_attrs: true - attrs: - - variable: targetPortal - label: targetPortal - schema: - type: string - required: true - default: "" - - variable: iqn - label: iqn - schema: - type: string - required: true - default: "" - - variable: lun - label: lun - schema: - type: int - default: 0 - - variable: authSession - label: authSession - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: authDiscovery - label: authDiscovery - schema: - type: dict - additional_attrs: true - attrs: - - variable: username - label: username - schema: - type: string - default: "" - - variable: password - label: password - schema: - type: string - default: "" - - variable: usernameInitiator - label: usernameInitiator - schema: - type: string - default: "" - - variable: passwordInitiator - label: passwordInitiator - schema: - type: string - default: "" - - variable: autoPermissions - label: Automatic Permissions Configuration - description: Automatically set permissions - schema: - show_if: [["type", "!=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: chown - label: Run CHOWN - description: | - It will run CHOWN on the path with the given fsGroup - schema: - type: boolean - default: false - - variable: chmod - label: Run CHMOD - description: | - It will run CHMOD on the path with the given value
    - Format should be 3 digits, e.g. 770 - schema: - type: string - valid_chars: '[0-9]{3}' - default: "" - - variable: recursive - label: Recursive - description: | - It will run CHOWN and CHMOD recursively - schema: - type: boolean - default: false - - variable: readOnly - label: Read Only - schema: - type: boolean - default: false - - variable: hostPath - label: Host Path - description: Path inside the container the storage is mounted - schema: - show_if: [["type", "=", "hostPath"]] - type: hostpath - - variable: mountPath - label: Mount Path - description: Path inside the container the storage is mounted - schema: - type: string - default: "" - required: true - valid_chars: '^\/([a-zA-Z0-9._-]+(\s?[a-zA-Z0-9._-]+|\/?))+$' - - variable: medium - label: EmptyDir Medium - schema: - show_if: [["type", "=", "emptyDir"]] - type: string - default: "" - enum: - - value: "" - description: Default - - value: Memory - description: Memory - - variable: size - label: Size Quotum of Storage - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: 256Gi - - variable: storageClass - label: 'storageClass (Advanced)' - description: 'sets the storageClass to something other than iX default. Only for advanced usecases!' - schema: - show_if: [["type", "=", "pvc"]] - type: string - default: "" - - variable: volsync - label: 'VolSync (Experimental)' - description: Backup, Restore and Synchronise PVC storage - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: VolSyncEntry - label: VolSync Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: "Name of backup configuration" - schema: - type: string - default: "" - required: true - - variable: type - label: Type VolSync/Backup - description: Sets the VolSync Type - schema: - type: string - default: "restic" - enum: - - value: restic - description: Restic - - variable: credentials - label: Credentials - description: "Name of credentials in the credentials section" - schema: - type: string - default: "" - required: true - - variable: dest - label: VolSync Destination (Restore) - description: VolSYnc Destination is the location where data is the reciever and configures recovery of backups - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: src - label: VolSync Source (Backup) - description: VolSYnc Source is the location where data is the sender and creates backups to storage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable - schema: - type: boolean - default: true - - variable: static - label: 'Static Fixed PVC Bindings (Experimental)' - description: Link a PVC to a specific storage location - schema: - show_if: [["type", "=", "pvc"]] - type: dict - additional_attrs: true - attrs: - - variable: mode - label: mode - description: | - disabled: use normal dynamic PVCs - smb: connect to an SMB share - nfs: connect to an NFS share - schema: - type: string - default: "disabled" - enum: - - value: "disabled" - description: disabled - - value: smb - description: smb - - value: nfs - description: nfs - - variable: server - label: Server - description: server to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "myserver" - - variable: share - label: Share - description: share to connect to - schema: - type: string - show_if: [["mode", "!=", "disabled"]] - default: "/myshare" - - variable: user - label: User - description: connecting user - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "myuser" - - variable: domain - label: Domain - description: user domain - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: password - label: Password - description: connecting password - schema: - type: string - show_if: [["mode", "=", "smb"]] - default: "" - - variable: volumeSnapshots - label: 'Volume Snapshots (Experimental)' - description: Add an entry to the list to force creation of a volumeSnapshot of this PVC - schema: - show_if: [["type", "=", "pvc"]] - type: list - default: [] - items: - - variable: volumeSnapshotEntry - label: Custom volumeSnapshot - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - description: 'WARNING: renaming this, means deletion of the snapshot with the old name!' - schema: - type: string - default: "mysnapshot" - required: true - - variable: volumeSnapshotClassName - label: 'volumeSnapshot Class Name (Advanced)' - description: For use with PVCs using a non-default storageClass - schema: - type: string - default: "" - - - variable: ingress - label: "" - group: Ingress - schema: - additional_attrs: true - type: dict - attrs: - - - variable: main - label: "Main Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name (Optional) - description: Defaults to chart name - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description (Optional) - description: Defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: icon - label: Icon (Optional) - description: Defaults to chart icon - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - variable: widget - label: Widget Settings - schema: - type: dict - additional_attrs: true - show_if: [["enabled", "=", true]] - attrs: - - variable: enabled - label: Enable Widget - description: When disabled all widget annotations are skipped. - schema: - type: boolean - default: true - - variable: custom - label: Options - schema: - type: dict - additional_attrs: true - attrs: - - variable: key - label: API-key (key) - schema: - type: string - default: "" - - variable: customkv - label: Custom Options - schema: - type: list - default: [] - items: - - variable: option - label: Option - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - default: "" - required: true - - variable: value - label: Value - schema: - type: string - default: "" - required: true - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - - variable: ingressList - label: Add Manual Custom Ingresses - group: Ingress - schema: - type: list - default: [] - items: - - variable: ingressListEntry - label: Custom Ingress - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: true - hidden: true - - variable: name - label: Name - schema: - type: string - default: "" - - variable: ingressClassName - label: IngressClass Name - schema: - type: string - default: "" - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: overrideService - label: Linked Service - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Service Name - schema: - type: string - default: "" - - variable: port - label: Service Port - schema: - type: int - - variable: tls - label: TLS-Settings - schema: - type: list - default: [] - show_if: [["certificateIssuer", "=", ""]] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: Use Custom Secret (Advanced) - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: "Allow Cross Origin Requests" - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: namespace - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: homepage - label: Homepage - description: Connect ingress with Homepage - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: name - label: Name - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: description - label: Description - description: defaults to chart description - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: group - label: Group - schema: - type: string - required: true - default: "default" - show_if: [["enabled", "=", true]] - - - variable: securityContext - group: SecurityContext - label: Security Context - schema: - additional_attrs: true - type: dict - attrs: - - variable: container - label: Container - schema: - additional_attrs: true - type: dict - attrs: - # Settings from questions.yaml get appended here on a per-app basis - - - variable: runAsUser - label: "runAsUser" - description: "The UserID of the user running the application" - schema: - type: int - default: 568 - - variable: runAsGroup - label: "runAsGroup" - description: "The groupID of the user running the application" - schema: - type: int - default: 568 - # Settings from questions.yaml get appended here on a per-app basis - - variable: PUID - label: Process User ID - PUID - description: When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps - schema: - type: int - show_if: [["runAsUser", "=", 0]] - default: 568 - - variable: UMASK - label: UMASK - description: When supported by the container, this sets the UMASK for the App. Not supported by all Apps - schema: - type: string - default: "0022" - - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: privileged - label: "Privileged mode" - schema: - type: boolean - default: false - - variable: readOnlyRootFilesystem - label: "ReadOnly Root Filesystem" - schema: - type: boolean - default: true - - - variable: pod - label: Pod - schema: - additional_attrs: true - type: dict - attrs: - - variable: fsGroupChangePolicy - label: "When should we take ownership?" - schema: - type: string - default: OnRootMismatch - enum: - - value: OnRootMismatch - description: OnRootMismatch - - value: Always - description: Always - - variable: supplementalGroups - label: Supplemental Groups - schema: - type: list - default: [] - items: - - variable: supplementalGroupsEntry - label: Supplemental Group - schema: - type: int - # Settings from questions.yaml get appended here on a per-app basis - - - variable: fsGroup - label: "fsGroup" - description: "The group that should own ALL storage." - schema: - type: int - default: 568 - - variable: resources - group: Resources - label: "Resource Limits" - schema: - additional_attrs: true - type: dict - attrs: - - variable: limits - label: Advanced Limit Resource Consumption - schema: - additional_attrs: true - type: dict - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 4000m - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: RAM - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 8Gi - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: 'gpu.intel.com/i915' - label: Add Intel i915 GPUs - schema: - type: int - default: 0 - - variable: 'nvidia.com/gpu' - label: Add NVIDIA GPUs (Experimental) - schema: - type: int - default: 0 - - variable: 'amd.com/gpu' - label: Add AMD GPUs - schema: - type: int - default: 0 - - variable: requests - label: "Minimum Resources Required (request)" - schema: - additional_attrs: true - type: dict - hidden: true - attrs: - - variable: cpu - label: CPU - description: "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 10m - hidden: true - valid_chars: '^(?!^0(\.0|m|)$)([0-9]+)(\.[0-9]|m?)$' - - variable: memory - label: "RAM" - description: "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation" - schema: - type: string - default: 50Mi - hidden: true - valid_chars: '^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$' - - variable: deviceList - label: Mount USB Devices - group: Devices - schema: - type: list - default: [] - items: - - variable: deviceListEntry - label: Device - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable the Storage - schema: - type: boolean - default: true - - variable: type - label: (Advanced) Type of Storage - description: Sets the persistence type - schema: - type: string - default: device - hidden: true - - variable: readOnly - label: readOnly - schema: - type: boolean - default: false - - variable: hostPath - label: Host Device Path - description: Path to the device on the host system - schema: - type: path - - variable: mountPath - label: Container Device Path - description: Path inside the container the device is mounted - schema: - type: string - default: "/dev/ttyACM0" - - - variable: metrics - group: Metrics - label: Prometheus Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: main - label: Main Metrics - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - - variable: prometheusRule - label: PrometheusRule - description: Enable and configure Prometheus Rules for the App. - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - description: Enable Prometheus Metrics - schema: - type: boolean - default: false - # TODO: Rule List section - -# - variable: horizontalPodAutoscaler -# group: Experimental -# label: (Advanced) Horizontal Pod Autoscaler -# schema: -# type: list -# default: [] -# items: -# - variable: hpaEntry -# label: HPA Entry -# schema: -# additional_attrs: true -# type: dict -# attrs: -# - variable: name -# label: Name -# schema: -# type: string -# required: true -# default: "" -# - variable: enabled -# label: Enabled -# schema: -# type: boolean -# default: false -# show_subquestions_if: true -# subquestions: -# - variable: target -# label: Target -# description: Deployment name, Defaults to Main Deployment -# schema: -# type: string -# default: "" -# - variable: minReplicas -# label: Minimum Replicas -# schema: -# type: int -# default: 1 -# - variable: maxReplicas -# label: Maximum Replicas -# schema: -# type: int -# default: 5 -# - variable: targetCPUUtilizationPercentage -# label: Target CPU Utilization Percentage -# schema: -# type: int -# default: 80 -# - variable: targetMemoryUtilizationPercentage -# label: Target Memory Utilization Percentage -# schema: -# type: int -# default: 80 - - variable: networkPolicy - group: Experimental - label: (Advanced) Network Policy - schema: - type: list - default: [] - items: - - variable: netPolicyEntry - label: Network Policy Entry - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - default: "" - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: policyType - label: Policy Type - schema: - type: string - default: "" - enum: - - value: "" - description: Default - - value: ingress - description: Ingress - - value: egress - description: Egress - - value: ingress-egress - description: Ingress and Egress - - variable: egress - label: Egress - schema: - type: list - default: [] - items: - - variable: egressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: to - label: To - schema: - type: list - default: [] - items: - - variable: toEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - variable: ingress - label: Ingress - schema: - type: list - default: [] - items: - - variable: ingressEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: from - label: From - schema: - type: list - default: [] - items: - - variable: fromEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: ipBlock - label: IP Block - schema: - additional_attrs: true - type: dict - attrs: - - variable: cidr - label: CIDR - schema: - type: string - default: "" - - variable: except - label: Except - schema: - type: list - default: [] - items: - - variable: exceptint - label: "" - schema: - type: string - - variable: namespaceSelector - label: Namespace Selector - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: podSelector - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: matchExpressions - label: Match Expressions - schema: - type: list - default: [] - items: - - variable: expressionEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: key - label: Key - schema: - type: string - - variable: operator - label: Operator - schema: - type: string - default: TCP - enum: - - value: In - description: In - - value: NotIn - description: NotIn - - value: Exists - description: Exists - - value: DoesNotExist - description: DoesNotExist - - variable: values - label: Values - schema: - type: list - default: [] - items: - - variable: value - label: "" - schema: - type: string - - variable: ports - label: Ports - schema: - type: list - default: [] - items: - - variable: portsEntry - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - - variable: endPort - label: End Port - schema: - type: int - - variable: protocol - label: Protocol - schema: - type: string - default: TCP - enum: - - value: TCP - description: TCP - - value: UDP - description: UDP - - value: SCTP - description: SCTP - - - variable: addons - group: Addons - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - - variable: codeserver - label: Codeserver - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: service - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Service Type - description: "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer" - schema: - type: string - default: LoadBalancer - enum: - - value: NodePort - description: Deprecated CHANGE THIS - - value: ClusterIP - description: ClusterIP - - value: LoadBalancer - description: LoadBalancer - - variable: loadBalancerIP - label: LoadBalancer IP - description: "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB" - schema: - show_if: [["type", "=", "LoadBalancer"]] - type: string - default: "" - - variable: ports - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: codeserver - label: "" - schema: - additional_attrs: true - type: dict - attrs: - - variable: port - label: Port - schema: - type: int - default: 36107 - - variable: ingress - label: "Ingress" - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enable Ingress - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: hosts - label: Hosts - schema: - type: list - default: [] - items: - - variable: hostEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: host - label: HostName - schema: - type: string - default: "" - required: true - - variable: paths - label: Paths - schema: - type: list - default: [{path: "/", pathType: "Prefix"}] - items: - - variable: pathEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: path - label: Path - schema: - type: string - required: true - default: "/" - - variable: pathType - label: Path Type - schema: - type: string - required: true - default: Prefix - - variable: integrations - label: Integrations - description: Connect ingress with other charts - schema: - additional_attrs: true - type: dict - attrs: - - variable: traefik - label: Traefik - description: Connect ingress with Traefik - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: true - - variable: allowCors - label: 'Allow Cross Origin Requests (advanced)' - schema: - type: boolean - default: false - show_if: [["enabled", "=", true]] - - variable: entrypoints - label: Entrypoints - schema: - type: list - default: ["websecure"] - show_if: [["enabled", "=", true]] - items: - - variable: entrypoint - label: Entrypoint - schema: - type: string - - variable: middlewares - label: Middlewares - schema: - type: list - default: [] - show_if: [["enabled", "=", true]] - items: - - variable: middleware - label: Middleware - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: name - schema: - type: string - default: "" - required: true - - variable: namespace - label: 'namespace (optional)' - schema: - type: string - default: "" - - variable: certManager - label: certManager - description: Connect ingress with certManager - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: enabled - schema: - type: boolean - default: false - - variable: certificateIssuer - label: certificateIssuer - description: defaults to chartname - schema: - type: string - default: "" - show_if: [["enabled", "=", true]] - - variable: advanced - label: Show Advanced Settings - description: Advanced settings are not covered by TrueCharts Support - schema: - type: boolean - default: false - - variable: ingressClassName - label: (Advanced/Optional) IngressClass Name - schema: - type: string - show_if: [["advanced", "=", true]] - default: "" - - variable: tls - label: TLS-Settings - schema: - type: list - show_if: [["advanced", "=", true]] - default: [] - items: - - variable: tlsEntry - label: Host - schema: - additional_attrs: true - type: dict - attrs: - - variable: hosts - label: Certificate Hosts - schema: - type: list - default: [] - items: - - variable: host - label: Host - schema: - type: string - default: "" - required: true - - - variable: certificateIssuer - label: Use Cert-Manager clusterIssuer - description: 'add the name of your cert-manager clusterIssuer here for automatic tls certificates.' - schema: - type: string - default: "" - - variable: clusterCertificate - label: 'Cluster Certificate (Advanced)' - description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.' - schema: - type: string - show_if: [["certificateIssuer", "=", ""]] - default: "" - - variable: secretName - label: 'Use Custom Certificate Secret (Advanced)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: string - default: "" - - variable: scaleCert - label: 'Use TrueNAS SCALE Certificate (Deprecated)' - schema: - show_if: [["certificateIssuer", "=", ""]] - type: int - $ref: - - "definitions/certificate" - - variable: envList - label: Codeserver Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: netshoot - label: Netshoot - schema: - additional_attrs: true - type: dict - attrs: - - variable: enabled - label: Enabled - schema: - type: boolean - default: false - show_subquestions_if: true - subquestions: - - variable: envList - label: Netshoot Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: vpn - label: VPN - schema: - additional_attrs: true - type: dict - attrs: - - variable: type - label: Type - schema: - type: string - default: disabled - enum: - - value: disabled - description: disabled - - value: gluetun - description: Gluetun - - value: tailscale - description: Tailscale - - value: openvpn - description: OpenVPN (Deprecated) - - value: wireguard - description: Wireguard (Deprecated) - - variable: openvpn - label: OpenVPN Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "openvpn"]] - attrs: - - variable: username - label: Authentication Username (Optional) - description: Authentication Username, Optional - schema: - type: string - default: "" - - variable: password - label: Authentication Password - description: Authentication Credentials - schema: - type: string - show_if: [["username", "!=", ""]] - default: "" - required: true - - variable: tailscale - label: Tailscale Settings - schema: - additional_attrs: true - type: dict - show_if: [["type", "=", "tailscale"]] - attrs: - - variable: authkey - label: Authentication Key - description: Provide an auth key to automatically authenticate the node as your user account. - schema: - type: string - private: true - default: "" - - variable: auth_once - label: Auth Once - description: Only attempt to log in if not already logged in. - schema: - type: boolean - default: true - - variable: accept_dns - label: Accept DNS - description: Accept DNS configuration from the admin console. - schema: - type: boolean - default: false - - variable: userspace - label: Userspace - description: Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device. - schema: - type: boolean - default: false - - variable: routes - label: Routes - description: Expose physical subnet routes to your entire Tailscale network. - schema: - type: string - default: "" - - variable: dest_ip - label: Destination IP - description: Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched. - schema: - type: string - default: "" - - variable: sock5_server - label: Sock5 Server - description: The address on which to listen for SOCKS5 proxying into the tailscale net. - schema: - type: string - default: "" - - variable: outbound_http_proxy_listen - label: Outbound HTTP Proxy Listen - description: The address on which to listen for HTTP proxying into the tailscale net. - schema: - type: string - default: "" - - variable: extra_args - label: Extra Args - description: Extra Args - schema: - type: string - default: "" - - variable: daemon_extra_args - label: Tailscale Daemon Extra Args - description: Tailscale Daemon Extra Args - schema: - type: string - default: "" - - variable: killSwitch - label: Enable Killswitch - schema: - type: boolean - show_if: [["type", "!=", "disabled"]] - default: true - - variable: excludedNetworks_IPv4 - label: Killswitch Excluded IPv4 networks - description: List of Killswitch Excluded IPv4 Addresses - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv4 - label: IPv4 Network - schema: - type: string - required: true - - variable: excludedNetworks_IPv6 - label: Killswitch Excluded IPv6 networks - description: "List of Killswitch Excluded IPv6 Addresses" - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: networkv6 - label: IPv6 Network - schema: - type: string - required: true - - variable: configFile - label: VPN Config File Location - schema: - type: string - show_if: [["type", "!=", "disabled"]] - default: "" - - - variable: envList - label: VPN Environment Variables - schema: - type: list - show_if: [["type", "!=", "disabled"]] - default: [] - items: - - variable: envItem - label: Environment Variable - schema: - additional_attrs: true - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - max_length: 10240 - - - variable: docs - group: Documentation - label: Please read the documentation at https://truecharts.org - description: Please read the documentation at -
    https://truecharts.org - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDocs - label: I have checked the documentation - schema: - type: boolean - default: true - - variable: donateNag - group: Documentation - label: Please consider supporting TrueCharts, see https://truecharts.org/sponsor - description: Please consider supporting TrueCharts, see -
    https://truecharts.org/sponsor - schema: - additional_attrs: true - type: dict - attrs: - - variable: confirmDonate - label: I have considered donating - schema: - type: boolean - default: true - hidden: true - diff --git a/incubator/TeslaMate/1.0.4/templates/NOTES.txt b/incubator/TeslaMate/1.0.4/templates/NOTES.txt deleted file mode 100644 index efcb74cb772..00000000000 --- a/incubator/TeslaMate/1.0.4/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/incubator/TeslaMate/1.0.4/templates/_configmap.tpl b/incubator/TeslaMate/1.0.4/templates/_configmap.tpl deleted file mode 100644 index 70d78d4d3fb..00000000000 --- a/incubator/TeslaMate/1.0.4/templates/_configmap.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{{/* Define the configmap */}} -{{- define "teslamate.configmaps" -}} -{{- $rootDir := "dashboards/" -}} -{{- $dirs := dict -}} -{{- range $path, $_ := .Files.Glob (printf "%s**/*.json" $rootDir) }} - {{- $pathElements := splitList "/" $path -}} - {{- $dirName := index $pathElements 1 }} - {{- $existingFiles := get $dirs $dirName | default list -}} - {{- $updatedFiles := append $existingFiles $path -}} - {{- $_ := set $dirs $dirName $updatedFiles }} -{{- end }} - -{{- range $dir, $files := $dirs }} -{{- range $files }} -{{- $fileName := lower (base .) }} -{{- $fileNameWithoutExt := trimSuffix ".json" $fileName }} -{{- $configMapKey := printf "%s-%s-%s" "dashboard" $dir $fileNameWithoutExt }} -{{ $configMapKey | quote }}: - enabled: true - annotations: - k8s-sidecar-target-directory: "TeslaMate" - labels: - grafana_dashboard: "1" - data: - {{ $fileName | quote }}: | -{{ $.Files.Get . | indent 6 }} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/incubator/TeslaMate/1.0.4/templates/_secrets.tpl b/incubator/TeslaMate/1.0.4/templates/_secrets.tpl deleted file mode 100644 index 5f1092a2032..00000000000 --- a/incubator/TeslaMate/1.0.4/templates/_secrets.tpl +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Define the secrets */}} -{{- define "teslamate.secrets" -}} -{{- $secretName := (printf "%s-teslamate-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }} - -{{- $encryptionKey := randAlphaNum 64 -}} - - {{- with lookup "v1" "Secret" .Release.Namespace $secretName -}} - {{- $encryptionKey = index .data "TESLAMATE_ENCRYPTION_KEY" | b64dec -}} - {{- end }} -enabled: true -data: - TESLAMATE_ENCRYPTION_KEY: {{ $encryptionKey }} -{{- end -}} diff --git a/incubator/TeslaMate/1.0.4/templates/common.yaml b/incubator/TeslaMate/1.0.4/templates/common.yaml deleted file mode 100644 index cf915e29079..00000000000 --- a/incubator/TeslaMate/1.0.4/templates/common.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{/* Make sure all variables are set properly */}} -{{- include "tc.v1.common.loader.init" . -}} - -{{/* Render secrets for teslamate */}} -{{- $secrets := include "teslamate.secrets" . | fromYaml -}} -{{- if $secrets -}} - {{- $_ := set .Values.secret "teslamate-secrets" $secrets -}} -{{- end -}} - -{{/* Render configmaps for dashboards */}} -{{- $configmaps := include "teslamate.configmaps" . | fromYaml -}} -{{- if $configmaps -}} - {{- $_ := mustMergeOverwrite .Values.configmap $configmaps -}} -{{- end -}} - -{{/* Render the templates */}} -{{- include "tc.v1.common.loader.apply" . -}} diff --git a/incubator/TeslaMate/1.0.4/values.yaml b/incubator/TeslaMate/1.0.4/values.yaml deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/incubator/TeslaMate/app_versions.json b/incubator/TeslaMate/app_versions.json deleted file mode 100644 index 2c35e9c5c31..00000000000 --- a/incubator/TeslaMate/app_versions.json +++ /dev/null @@ -1,20972 +0,0 @@ -{ - "1.0.4": { - "healthy": true, - "supported": true, - "healthy_error": null, - "location": "/home/runner/_work/catalog/catalog/incubator/TeslaMate/1.0.4", - "last_update": "2024-05-29 12:35:14", - "required_features": [ - "definitions/timezone", - "normalize/interfaceConfiguration", - "definitions/certificate", - "definitions/interface" - ], - "human_version": "1.28.5_1.0.4", - "version": "1.0.4", - "chart_metadata": { - "annotations": { - "max_scale_version": "24.04.1", - "min_scale_version": "24.04.0", - "truecharts.org/SCALE-support": "true", - "truecharts.org/category": "metrics", - "truecharts.org/max_helm_version": "3.14", - "truecharts.org/min_helm_version": "3.11", - "truecharts.org/train": "incubator" - }, - "apiVersion": "v2", - "appVersion": "1.28.5", - "dependencies": [ - { - "name": "common", - "version": "23.0.0", - "repository": "oci://tccr.io/truecharts", - "condition": "", - "alias": "", - "tags": [], - "import-values": [] - } - ], - "deprecated": false, - "description": "A self-hosted data logger for your Tesla", - "home": "https://truecharts.org/charts/incubator/TeslaMate", - "icon": "https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp", - "keywords": [ - "analytics", - "monitoring", - "metrics", - "logs" - ], - "kubeVersion": ">=1.24.0-0", - "maintainers": [ - { - "name": "TrueCharts", - "email": "info@truecharts.org", - "url": "https://truecharts.org" - } - ], - "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" - }, - "app_metadata": null, - "schema": { - "groups": [ - { - "name": "Image", - "description": "Configured the images to be used for the Chart.\nIt's wise to use \"digest pinned\" tags and to avoid using \"latest\".\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/#images\n" - }, - { - "name": "General", - "description": "For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general.\n\nCheckout the following documentation for more information:\n - https://truecharts.org/common/global/\n - https://truecharts.org/common/#tz\n - https://truecharts.org/common/podoptions/\n - Image Pull Secrets\n" - }, - { - "name": "Workload", - "description": "These settings configure how the actual Pods and containers are running.\nGenerally, on SCALE, we only expose a limited subset of these settings for the primary workload and container.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/workload/\n- https://truecharts.org/common/container/\n" - }, - { - "name": "App Configuration", - "description": "Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application.\nMost options should have a Tooltip (Circled Question Mark) to further describe said option.\n\nTo find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/\n" - }, - { - "name": "Services", - "description": "Service and Networking options for any applications are contained here.\nSome applications may have complicated networking setups with multiple options or some may have no options here at all.\n\nOptions here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/service/\n" - }, - { - "name": "Networking", - "description": "Contains advanced networking options that are not actively supported by the TrueCharts team.\nCurrently only contains scaleExternalInterfaces.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/scaleexternalinterface/\n" - }, - { - "name": "Persistence", - "description": "Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types.\nThis storage is called Persistence since it is not deleted upon restart or upgrade of an application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/\n- https://truecharts.org/scale/guides/nfs-share/\n- https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath\n" - }, - { - "name": "Ingress", - "description": "Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names).\nIf you choose to enable this you must have a \"Ingress Provider\" aka \"Reverse Proxy\" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/)\nIt also requiresa DNS service to actually resolve the DNS name of the FQDN specified.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/ingress/\n" - }, - { - "name": "SecurityContext", - "description": "The security settings for each application and/or permissions that each application may have for the files/directories created.\nEach application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities.\n\nUnless necessary users are advised to keep this section mostly to defaults.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/securitycontext/\n" - }, - { - "name": "Resources", - "description": "Resources limits that have been defined by each application are in this section.\nMost will have a specific default that some users may want to change based on their specific hardware or needs.\n\nThis also contains the options to mount GPUs or, more precisely, \"request\" GPU's to be mounted.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/resources/\n" - }, - { - "name": "Devices", - "description": "These are special \"mountpoints\" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts.\nFor clearity we've decided to seperate this from persistence on SCALE.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/device/\n- https://truecharts.org/scale/guides/pci-passthrough/\n" - }, - { - "name": "Middlewares", - "description": "Traefik Middlewares" - }, - { - "name": "StorageClass", - "description": "StorageClasses define where to storage Storage.\n\nCheckout the following documentation for more information:\n" - }, - { - "name": "Metrics", - "description": "Contains options to configure Prometheus metrics for the application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/metrics/\n" - }, - { - "name": "Addons", - "description": "Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application\u2019s defaults.\nThings included here are VPN addons, Codeserver for editing files inside the application\u2019s container, Netshoot for network troubelshooting, etc.\n\nGenerally not required for use but may be necessary or usefull at times for specific applications.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/addons/\n- https://truecharts.org/scale/guides/vpn-setup/\n" - }, - { - "name": "Experimental", - "description": "Experimental Configuration Options\nOften these are not fully flushed-out, could randomly break or might not work at-all.\n" - }, - { - "name": "Postgresql", - "description": "For Postgresql we use \"CloudNative-PG\" as a backend, which has to be installed first.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/cnpg/\n- https://truecharts.org/scale/guides/sql-export/\n- https://truecharts.org/scale/guides/recover-cnpg/\n" - }, - { - "name": "Dependencies", - "description": "contains dependency setting for which we, currently, do not have seperate catagories (yet)\n" - }, - { - "name": "Documentation", - "description": "We added this section to make everyone aware that OpenSource isn't always easy.\nIt doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects.\n\nBefore installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/\nWe would also advice going over our https://truecharts.org/scale/guides/scale-intro/\nand many of the other documentation pages...\n" - } - ], - "portals": { - "open": { - "protocols": [ - "$kubernetes-resource_configmap_tcportal-open_protocol" - ], - "host": [ - "$kubernetes-resource_configmap_tcportal-open_host" - ], - "ports": [ - "$kubernetes-resource_configmap_tcportal-open_port" - ] - } - }, - "questions": [ - { - "variable": "global", - "group": "General", - "label": "Global Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "stopAll", - "label": "Stop All", - "description": "Stops All Running pods and hibernates cnpg", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - }, - { - "variable": "credentialsList", - "group": "General", - "label": "Credentials (Experimental)", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "credentialsEntry", - "label": "Enter Credentials", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "Name", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "type", - "label": "Type", - "description": "Type of Credential", - "schema": { - "type": "string", - "default": "s3", - "enum": [ - { - "value": "s3", - "description": "s3 Storage" - } - ] - } - }, - { - "variable": "url", - "label": "url", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "path", - "label": "path", - "description": "Path Prefix not needed for most cases", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "bucket", - "label": "bucket", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "accessKey", - "label": "accessKey", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "secretKey", - "label": "secretKey", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "encrKey", - "label": "encrKey", - "description": "The Encryption key is needed for tools like volsync if not needed it will be ignored", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "MYSECRETPASSPHRASE", - "required": true - } - } - ] - } - } - ] - } - }, - { - "variable": "workload", - "group": "Workload", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type (Advanced)", - "schema": { - "type": "string", - "default": "Deployment", - "enum": [ - { - "value": "Deployment", - "description": "Deployment" - }, - { - "value": "DaemonSet", - "description": "DaemonSet" - } - ] - } - }, - { - "variable": "replicas", - "label": "Replicas (Advanced)", - "description": "Set the number of Replicas", - "schema": { - "type": "int", - "show_if": [ - [ - "type", - "!=", - "DaemonSet" - ] - ], - "default": 1 - } - }, - { - "variable": "podSpec", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "containers", - "label": "Containers", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "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 - ] - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Extra Environment Variables", - "description": "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting...", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string" - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "extraArgs", - "label": "Extra Args", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "arg", - "label": "Arg", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "command", - "label": "Command", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "param", - "label": "Param", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "TZ", - "label": "Timezone", - "group": "General", - "schema": { - "type": "string", - "default": "America/Los_Angeles", - "$ref": [ - "definitions/timezone" - ], - "enum": [ - { - "value": "Asia/Damascus", - "description": "'Asia/Damascus' timezone" - }, - { - "value": "Asia/Saigon", - "description": "'Asia/Saigon' timezone" - } - ] - } - }, - { - "variable": "podOptions", - "group": "General", - "label": "Global Pod Options (Advanced)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "expertPodOpts", - "label": "Expert - Pod Options", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hostNetwork", - "label": "Host Networking", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "dnsConfig", - "label": "DNS Configuration", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "options", - "label": "Options", - "schema": { - "type": "list", - "default": [ - { - "name": "ndots", - "value": "1" - } - ], - "items": [ - { - "variable": "optionsEntry", - "label": "Option Entry", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "nameservers", - "label": "Nameservers", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "nsEntry", - "label": "Nameserver Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "searches", - "label": "Searches", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "searchEntry", - "label": "Search Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "imagePullSecretList", - "group": "General", - "label": "Image Pull Secrets", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pullsecretentry", - "label": "Pull Secret", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "data", - "label": "Data", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "registry", - "label": "Registry", - "schema": { - "type": "string", - "required": true, - "default": "https://index.docker.io/v1/" - } - }, - { - "variable": "username", - "label": "Username", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "schema": { - "type": "string", - "required": true, - "private": true, - "default": "" - } - }, - { - "variable": "email", - "label": "Email", - "schema": { - "type": "string", - "required": true, - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "service", - "group": "Services", - "label": "Configure Service(s)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service", - "description": "The Primary service on which the healthcheck runs, often the webUI", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "Service's Port(s) Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service Port Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "default": 10038, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "scaleExternalInterface", - "description": "Add External Interfaces (Experimental, might change or be removed without further notice)", - "label": "Add external Interfaces (Experimental)", - "group": "Networking", - "schema": { - "type": "list", - "items": [ - { - "variable": "interfaceConfiguration", - "description": "Interface Configuration", - "label": "Interface Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "$ref": [ - "normalize/interfaceConfiguration" - ], - "attrs": [ - { - "variable": "hostInterface", - "description": "Please Specify Host Interface", - "label": "Host Interface", - "schema": { - "type": "string", - "required": true, - "$ref": [ - "definitions/interface" - ], - "enum": [] - } - }, - { - "variable": "ipam", - "description": "Define how IP Address will be managed", - "label": "IP Address Management", - "schema": { - "additional_attrs": true, - "type": "dict", - "required": true, - "attrs": [ - { - "variable": "type", - "description": "Specify type for IPAM", - "label": "IPAM Type", - "schema": { - "type": "string", - "required": true, - "enum": [ - { - "value": "dhcp", - "description": "Use DHCP" - }, - { - "value": "static", - "description": "Use Static IP" - } - ] - } - }, - { - "variable": "staticIPConfigurations", - "label": "Static IP Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticIP", - "label": "Static IP", - "schema": { - "type": "ipaddr", - "cidr": true - } - } - ] - } - }, - { - "variable": "staticRoutes", - "label": "Static Routes", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticRouteConfiguration", - "label": "Static Route Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "destination", - "label": "Destination", - "schema": { - "type": "ipaddr", - "cidr": true, - "required": true - } - }, - { - "variable": "gateway", - "label": "Gateway", - "schema": { - "type": "ipaddr", - "cidr": false, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "serviceList", - "label": "Add Manual Custom Services", - "group": "Services", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "serviceListEntry", - "label": "Custom Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - }, - { - "value": "Simple", - "description": "Deprecated CHANGE THIS" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "advancedsvcset", - "label": "Show Advanced Service Settings", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "externalIPs", - "label": "External IP's", - "description": "External IP's", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "externalIP", - "label": "External IP", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "ipFamilyPolicy", - "label": "IP Family Policy", - "description": "Specify the IP Policy", - "schema": { - "type": "string", - "default": "SingleStack", - "enum": [ - { - "value": "SingleStack", - "description": "SingleStack" - }, - { - "value": "PreferDualStack", - "description": "PreferDualStack" - }, - { - "value": "RequireDualStack", - "description": "RequireDualStack" - } - ] - } - }, - { - "variable": "ipFamilies", - "label": "IP Families", - "description": "(Advanced) The IP Families that should be used", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ipFamily", - "label": "IP Family", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "portsList", - "label": "Additional Service Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsListEntry", - "label": "Custom ports", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Port", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Port Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "protocol", - "label": "Port Type", - "schema": { - "type": "string", - "default": "tcp", - "enum": [ - { - "value": "http", - "description": "HTTP" - }, - { - "value": "https", - "description": "HTTPS" - }, - { - "value": "tcp", - "description": "TCP" - }, - { - "value": "udp", - "description": "UDP" - } - ] - } - }, - { - "variable": "targetPort", - "label": "Target Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "required": true - } - }, - { - "variable": "port", - "label": "Container Port", - "schema": { - "type": "int", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistence", - "label": "Integrated Persistent Storage", - "description": "Integrated Persistent Storage", - "group": "Persistence", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "pvc", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - }, - { - "value": "iscsi", - "description": "iSCSI Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size quotum of Storage (Do NOT REDUCE after installation)", - "description": "This value can ONLY be INCREASED after the installation", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "volsync", - "label": "VolSync (Experimental)", - "description": "Backup, Restore and Synchronise PVC storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "VolSyncEntry", - "label": "VolSync Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "Name of backup configuration", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "type", - "label": "Type VolSync/Backup", - "description": "Sets the VolSync Type", - "schema": { - "type": "string", - "default": "restic", - "enum": [ - { - "value": "restic", - "description": "Restic" - } - ] - } - }, - { - "variable": "credentials", - "label": "Credentials", - "description": "Name of credentials in the credentials section", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "dest", - "label": "VolSync Destination (Restore)", - "description": "VolSYnc Destination is the location where data is the reciever and configures recovery of backups", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "src", - "label": "VolSync Source (Backup)", - "description": "VolSYnc Source is the location where data is the sender and creates backups to storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistenceList", - "label": "Additional App Storage", - "group": "Persistence", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "persistenceListEntry", - "label": "Custom Storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the storage", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "hostPath", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "mountPath", - "label": "Mount Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "type": "string", - "default": "", - "required": true, - "valid_chars": "^\\/([a-zA-Z0-9._-]+(\\s?[a-zA-Z0-9._-]+|\\/?))+$" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size Quotum of Storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "volsync", - "label": "VolSync (Experimental)", - "description": "Backup, Restore and Synchronise PVC storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "VolSyncEntry", - "label": "VolSync Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "Name of backup configuration", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "type", - "label": "Type VolSync/Backup", - "description": "Sets the VolSync Type", - "schema": { - "type": "string", - "default": "restic", - "enum": [ - { - "value": "restic", - "description": "Restic" - } - ] - } - }, - { - "variable": "credentials", - "label": "Credentials", - "description": "Name of credentials in the credentials section", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "dest", - "label": "VolSync Destination (Restore)", - "description": "VolSYnc Destination is the location where data is the reciever and configures recovery of backups", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "src", - "label": "VolSync Source (Backup)", - "description": "VolSYnc Source is the location where data is the sender and creates backups to storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "", - "group": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name (Optional)", - "description": "Defaults to chart name", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description (Optional)", - "description": "Defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "icon", - "label": "Icon (Optional)", - "description": "Defaults to chart icon", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "widget", - "label": "Widget Settings", - "schema": { - "type": "dict", - "additional_attrs": true, - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "attrs": [ - { - "variable": "enabled", - "label": "Enable Widget", - "description": "When disabled all widget annotations are skipped.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "custom", - "label": "Options", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "key", - "label": "API-key (key)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "customkv", - "label": "Custom Options", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "option", - "label": "Option", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingressList", - "label": "Add Manual Custom Ingresses", - "group": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressListEntry", - "label": "Custom Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "ingressClassName", - "label": "IngressClass Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - }, - { - "variable": "overrideService", - "label": "Linked Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Service Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "port", - "label": "Service Port", - "schema": { - "type": "int" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Secret (Advanced)", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description", - "description": "defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "securityContext", - "group": "SecurityContext", - "label": "Security Context", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "container", - "label": "Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "runAsUser", - "label": "runAsUser", - "description": "The UserID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "runAsGroup", - "label": "runAsGroup", - "description": "The groupID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "PUID", - "label": "Process User ID - PUID", - "description": "When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps", - "schema": { - "type": "int", - "show_if": [ - [ - "runAsUser", - "=", - 0 - ] - ], - "default": 568 - } - }, - { - "variable": "UMASK", - "label": "UMASK", - "description": "When supported by the container, this sets the UMASK for the App. Not supported by all Apps", - "schema": { - "type": "string", - "default": "0022" - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "privileged", - "label": "Privileged mode", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "readOnlyRootFilesystem", - "label": "ReadOnly Root Filesystem", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - }, - { - "variable": "pod", - "label": "Pod", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "fsGroupChangePolicy", - "label": "When should we take ownership?", - "schema": { - "type": "string", - "default": "OnRootMismatch", - "enum": [ - { - "value": "OnRootMismatch", - "description": "OnRootMismatch" - }, - { - "value": "Always", - "description": "Always" - } - ] - } - }, - { - "variable": "supplementalGroups", - "label": "Supplemental Groups", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "supplementalGroupsEntry", - "label": "Supplemental Group", - "schema": { - "type": "int" - } - } - ] - } - }, - { - "variable": "fsGroup", - "label": "fsGroup", - "description": "The group that should own ALL storage.", - "schema": { - "type": "int", - "default": 568 - } - } - ] - } - } - ] - } - }, - { - "variable": "resources", - "group": "Resources", - "label": "Resource Limits", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "limits", - "label": "Advanced Limit Resource Consumption", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "4000m", - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "8Gi", - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - }, - { - "variable": "gpu.intel.com/i915", - "label": "Add Intel i915 GPUs", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "nvidia.com/gpu", - "label": "Add NVIDIA GPUs (Experimental)", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "amd.com/gpu", - "label": "Add AMD GPUs", - "schema": { - "type": "int", - "default": 0 - } - } - ] - } - }, - { - "variable": "requests", - "label": "Minimum Resources Required (request)", - "schema": { - "additional_attrs": true, - "type": "dict", - "hidden": true, - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "10m", - "hidden": true, - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "50Mi", - "hidden": true, - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - } - ] - } - } - ] - } - }, - { - "variable": "deviceList", - "label": "Mount USB Devices", - "group": "Devices", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "deviceListEntry", - "label": "Device", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Storage", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "type", - "label": "(Advanced) Type of Storage", - "description": "Sets the persistence type", - "schema": { - "type": "string", - "default": "device", - "hidden": true - } - }, - { - "variable": "readOnly", - "label": "readOnly", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Device Path", - "description": "Path to the device on the host system", - "schema": { - "type": "path" - } - }, - { - "variable": "mountPath", - "label": "Container Device Path", - "description": "Path inside the container the device is mounted", - "schema": { - "type": "string", - "default": "/dev/ttyACM0" - } - } - ] - } - } - ] - } - }, - { - "variable": "metrics", - "group": "Metrics", - "label": "Prometheus Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "prometheusRule", - "label": "PrometheusRule", - "description": "Enable and configure Prometheus Rules for the App.", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "networkPolicy", - "group": "Experimental", - "label": "(Advanced) Network Policy", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "netPolicyEntry", - "label": "Network Policy Entry", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "policyType", - "label": "Policy Type", - "schema": { - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "ingress", - "description": "Ingress" - }, - { - "value": "egress", - "description": "Egress" - }, - { - "value": "ingress-egress", - "description": "Ingress and Egress" - } - ] - } - }, - { - "variable": "egress", - "label": "Egress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "egressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "to", - "label": "To", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "toEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "from", - "label": "From", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "fromEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "addons", - "group": "Addons", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "Codeserver", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "service", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "NodePort", - "description": "Deprecated CHANGE THIS" - }, - { - "value": "ClusterIP", - "description": "ClusterIP" - }, - { - "value": "LoadBalancer", - "description": "LoadBalancer" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int", - "default": 36107 - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "scaleCert", - "label": "Use TrueNAS SCALE Certificate (Deprecated)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "int", - "$ref": [ - "definitions/certificate" - ], - "enum": [ - { - "value": null, - "description": "No Certificate" - } - ], - "default": null, - "null": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Codeserver Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "netshoot", - "label": "Netshoot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "envList", - "label": "Netshoot Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "vpn", - "label": "VPN", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "gluetun", - "description": "Gluetun" - }, - { - "value": "tailscale", - "description": "Tailscale" - }, - { - "value": "openvpn", - "description": "OpenVPN (Deprecated)" - }, - { - "value": "wireguard", - "description": "Wireguard (Deprecated)" - } - ] - } - }, - { - "variable": "openvpn", - "label": "OpenVPN Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "openvpn" - ] - ], - "attrs": [ - { - "variable": "username", - "label": "Authentication Username (Optional)", - "description": "Authentication Username, Optional", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "Authentication Password", - "description": "Authentication Credentials", - "schema": { - "type": "string", - "show_if": [ - [ - "username", - "!=", - "" - ] - ], - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "tailscale", - "label": "Tailscale Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "tailscale" - ] - ], - "attrs": [ - { - "variable": "authkey", - "label": "Authentication Key", - "description": "Provide an auth key to automatically authenticate the node as your user account.", - "schema": { - "type": "string", - "private": true, - "default": "" - } - }, - { - "variable": "auth_once", - "label": "Auth Once", - "description": "Only attempt to log in if not already logged in.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "accept_dns", - "label": "Accept DNS", - "description": "Accept DNS configuration from the admin console.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "userspace", - "label": "Userspace", - "description": "Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "routes", - "label": "Routes", - "description": "Expose physical subnet routes to your entire Tailscale network.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "dest_ip", - "label": "Destination IP", - "description": "Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "sock5_server", - "label": "Sock5 Server", - "description": "The address on which to listen for SOCKS5 proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "outbound_http_proxy_listen", - "label": "Outbound HTTP Proxy Listen", - "description": "The address on which to listen for HTTP proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "extra_args", - "label": "Extra Args", - "description": "Extra Args", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "daemon_extra_args", - "label": "Tailscale Daemon Extra Args", - "description": "Tailscale Daemon Extra Args", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "killSwitch", - "label": "Enable Killswitch", - "schema": { - "type": "boolean", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": true - } - }, - { - "variable": "excludedNetworks_IPv4", - "label": "Killswitch Excluded IPv4 networks", - "description": "List of Killswitch Excluded IPv4 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv4", - "label": "IPv4 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "excludedNetworks_IPv6", - "label": "Killswitch Excluded IPv6 networks", - "description": "List of Killswitch Excluded IPv6 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv6", - "label": "IPv6 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "configFile", - "label": "VPN Config File Location", - "schema": { - "type": "string", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": "" - } - }, - { - "variable": "envList", - "label": "VPN Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true, - "max_length": 10240 - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "docs", - "group": "Documentation", - "label": "Please read the documentation at https://truecharts.org", - "description": "Please read the documentation at
    https://truecharts.org", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDocs", - "label": "I have checked the documentation", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "donateNag", - "group": "Documentation", - "label": "Please consider supporting TrueCharts, see https://truecharts.org/sponsor", - "description": "Please consider supporting TrueCharts, see
    https://truecharts.org/sponsor", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDonate", - "label": "I have considered donating", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - } - ] - } - } - ] - }, - "app_readme": "

    A self-hosted data logger for your Tesla

    \n

    This App is supplied by TrueCharts, for more information visit the manual: https://truecharts.org/charts/incubator/TeslaMate

    \n
    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    ", - "detailed_readme": "
    \n

    title: README

    \n

    General Info

    \n

    TrueCharts can be installed as both normal Helm Charts or as TrueNAS SCALE Apps.\nBoth solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible

    \n

    For more information about this Chart, please check the docs on the TrueCharts website

    \n

    This chart is not maintained by the upstream project and any issues with the chart should be raised here

    \n

    Installation

    \n

    Helm-Chart installation

    \n

    To install TrueCharts Helm charts using Helm, you can use our OCI Repository.

    \n

    helm install mychart oci://tccr.io/truecharts/CHARTNAME

    \n

    For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/

    \n

    TrueNAS SCALE Apps

    \n

    For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the quick-start guides for TrueNAS SCALE.

    \n

    Configuration Options

    \n

    To view the chart specific options, please view Values.yaml included in the chart.

    \n

    All our Charts use a shared \"common\" library chart that contains most of the templating and options.\nFor the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/

    \n

    Chart Specific Guides and information

    \n

    All our charts have dedicated documentation pages.\nThe documentation for this chart can be found here:\nhttps://truecharts.org/charts/incubator/TeslaMate

    \n

    Support

    \n\n
    \n

    Sponsor TrueCharts

    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    \n

    All Rights Reserved - The TrueCharts Project

    ", - "changelog": "

    for the complete changelog, please refer to the website

    \n

    Important:

    " - }, - "1.0.3": { - "healthy": true, - "supported": true, - "healthy_error": null, - "location": "/home/runner/_work/catalog/catalog/incubator/TeslaMate/1.0.3", - "last_update": "2024-05-29 12:35:14", - "required_features": [ - "definitions/timezone", - "normalize/interfaceConfiguration", - "definitions/certificate", - "definitions/interface" - ], - "human_version": "1.28.5_1.0.3", - "version": "1.0.3", - "chart_metadata": { - "annotations": { - "max_scale_version": "24.04.1", - "min_scale_version": "24.04.0", - "truecharts.org/SCALE-support": "true", - "truecharts.org/category": "metrics", - "truecharts.org/max_helm_version": "3.14", - "truecharts.org/min_helm_version": "3.11", - "truecharts.org/train": "incubator" - }, - "apiVersion": "v2", - "appVersion": "1.28.5", - "dependencies": [ - { - "name": "common", - "version": "22.0.3", - "repository": "oci://tccr.io/truecharts", - "condition": "", - "alias": "", - "tags": [], - "import-values": [] - } - ], - "deprecated": false, - "description": "A self-hosted data logger for your Tesla", - "home": "https://truecharts.org/charts/incubator/TeslaMate", - "icon": "https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp", - "keywords": [ - "analytics", - "monitoring", - "metrics", - "logs" - ], - "kubeVersion": ">=1.24.0-0", - "maintainers": [ - { - "name": "TrueCharts", - "email": "info@truecharts.org", - "url": "https://truecharts.org" - } - ], - "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.3" - }, - "app_metadata": null, - "schema": { - "groups": [ - { - "name": "Image", - "description": "Configured the images to be used for the Chart.\nIt's wise to use \"digest pinned\" tags and to avoid using \"latest\".\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/#images\n" - }, - { - "name": "General", - "description": "For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general.\n\nCheckout the following documentation for more information:\n - https://truecharts.org/common/global/\n - https://truecharts.org/common/#tz\n - https://truecharts.org/common/podoptions/\n - Image Pull Secrets\n" - }, - { - "name": "Workload", - "description": "These settings configure how the actual Pods and containers are running.\nGenerally, on SCALE, we only expose a limited subset of these settings for the primary workload and container.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/workload/\n- https://truecharts.org/common/container/\n" - }, - { - "name": "App Configuration", - "description": "Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application.\nMost options should have a Tooltip (Circled Question Mark) to further describe said option.\n\nTo find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/\n" - }, - { - "name": "Services", - "description": "Service and Networking options for any applications are contained here.\nSome applications may have complicated networking setups with multiple options or some may have no options here at all.\n\nOptions here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/service/\n" - }, - { - "name": "Networking", - "description": "Contains advanced networking options that are not actively supported by the TrueCharts team.\nCurrently only contains scaleExternalInterfaces.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/scaleexternalinterface/\n" - }, - { - "name": "Persistence", - "description": "Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types.\nThis storage is called Persistence since it is not deleted upon restart or upgrade of an application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/\n- https://truecharts.org/scale/guides/nfs-share/\n- https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath\n" - }, - { - "name": "Ingress", - "description": "Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names).\nIf you choose to enable this you must have a \"Ingress Provider\" aka \"Reverse Proxy\" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/)\nIt also requiresa DNS service to actually resolve the DNS name of the FQDN specified.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/ingress/\n" - }, - { - "name": "SecurityContext", - "description": "The security settings for each application and/or permissions that each application may have for the files/directories created.\nEach application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities.\n\nUnless necessary users are advised to keep this section mostly to defaults.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/securitycontext/\n" - }, - { - "name": "Resources", - "description": "Resources limits that have been defined by each application are in this section.\nMost will have a specific default that some users may want to change based on their specific hardware or needs.\n\nThis also contains the options to mount GPUs or, more precisely, \"request\" GPU's to be mounted.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/resources/\n" - }, - { - "name": "Devices", - "description": "These are special \"mountpoints\" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts.\nFor clearity we've decided to seperate this from persistence on SCALE.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/device/\n- https://truecharts.org/scale/guides/pci-passthrough/\n" - }, - { - "name": "Middlewares", - "description": "Traefik Middlewares" - }, - { - "name": "StorageClass", - "description": "StorageClasses define where to storage Storage.\n\nCheckout the following documentation for more information:\n" - }, - { - "name": "Metrics", - "description": "Contains options to configure Prometheus metrics for the application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/metrics/\n" - }, - { - "name": "Addons", - "description": "Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application\u2019s defaults.\nThings included here are VPN addons, Codeserver for editing files inside the application\u2019s container, Netshoot for network troubelshooting, etc.\n\nGenerally not required for use but may be necessary or usefull at times for specific applications.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/addons/\n- https://truecharts.org/scale/guides/vpn-setup/\n" - }, - { - "name": "Experimental", - "description": "Experimental Configuration Options\nOften these are not fully flushed-out, could randomly break or might not work at-all.\n" - }, - { - "name": "Postgresql", - "description": "For Postgresql we use \"CloudNative-PG\" as a backend, which has to be installed first.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/cnpg/\n- https://truecharts.org/scale/guides/sql-export/\n- https://truecharts.org/scale/guides/recover-cnpg/\n" - }, - { - "name": "Dependencies", - "description": "contains dependency setting for which we, currently, do not have seperate catagories (yet)\n" - }, - { - "name": "Documentation", - "description": "We added this section to make everyone aware that OpenSource isn't always easy.\nIt doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects.\n\nBefore installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/\nWe would also advice going over our https://truecharts.org/scale/guides/scale-intro/\nand many of the other documentation pages...\n" - } - ], - "portals": { - "open": { - "protocols": [ - "$kubernetes-resource_configmap_tcportal-open_protocol" - ], - "host": [ - "$kubernetes-resource_configmap_tcportal-open_host" - ], - "ports": [ - "$kubernetes-resource_configmap_tcportal-open_port" - ] - } - }, - "questions": [ - { - "variable": "global", - "group": "General", - "label": "Global Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "stopAll", - "label": "Stop All", - "description": "Stops All Running pods and hibernates cnpg", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - }, - { - "variable": "credentialsList", - "group": "General", - "label": "Credentials (Experimental)", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "credentialsEntry", - "label": "Enter Credentials", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "Name", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "type", - "label": "Type", - "description": "Type of Credential", - "schema": { - "type": "string", - "default": "s3", - "enum": [ - { - "value": "s3", - "description": "s3 Storage" - } - ] - } - }, - { - "variable": "url", - "label": "url", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "path", - "label": "path", - "description": "Path Prefix not needed for most cases", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "region", - "label": "region", - "description": "region is primarily for AWS not needed for most cases", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "bucket", - "label": "bucket", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "accessKey", - "label": "accessKey", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "secretKey", - "label": "secretKey", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "encrKey", - "label": "encrKey", - "description": "The Encryption key is needed for tools like volsync if not needed it will be ignored", - "schema": { - "show_if": [ - [ - "type", - "=", - "s3" - ] - ], - "type": "string", - "default": "MYSECRETPASSPHRASE", - "required": true - } - } - ] - } - } - ] - } - }, - { - "variable": "workload", - "group": "Workload", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type (Advanced)", - "schema": { - "type": "string", - "default": "Deployment", - "enum": [ - { - "value": "Deployment", - "description": "Deployment" - }, - { - "value": "DaemonSet", - "description": "DaemonSet" - } - ] - } - }, - { - "variable": "replicas", - "label": "Replicas (Advanced)", - "description": "Set the number of Replicas", - "schema": { - "type": "int", - "show_if": [ - [ - "type", - "!=", - "DaemonSet" - ] - ], - "default": 1 - } - }, - { - "variable": "podSpec", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "containers", - "label": "Containers", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "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 - ] - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Extra Environment Variables", - "description": "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting...", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string" - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "extraArgs", - "label": "Extra Args", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "arg", - "label": "Arg", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "command", - "label": "Command", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "param", - "label": "Param", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "TZ", - "label": "Timezone", - "group": "General", - "schema": { - "type": "string", - "default": "America/Los_Angeles", - "$ref": [ - "definitions/timezone" - ], - "enum": [ - { - "value": "Asia/Damascus", - "description": "'Asia/Damascus' timezone" - }, - { - "value": "Asia/Saigon", - "description": "'Asia/Saigon' timezone" - } - ] - } - }, - { - "variable": "podOptions", - "group": "General", - "label": "Global Pod Options (Advanced)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "expertPodOpts", - "label": "Expert - Pod Options", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hostNetwork", - "label": "Host Networking", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "dnsConfig", - "label": "DNS Configuration", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "options", - "label": "Options", - "schema": { - "type": "list", - "default": [ - { - "name": "ndots", - "value": "1" - } - ], - "items": [ - { - "variable": "optionsEntry", - "label": "Option Entry", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "nameservers", - "label": "Nameservers", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "nsEntry", - "label": "Nameserver Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "searches", - "label": "Searches", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "searchEntry", - "label": "Search Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "imagePullSecretList", - "group": "General", - "label": "Image Pull Secrets", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pullsecretentry", - "label": "Pull Secret", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "data", - "label": "Data", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "registry", - "label": "Registry", - "schema": { - "type": "string", - "required": true, - "default": "https://index.docker.io/v1/" - } - }, - { - "variable": "username", - "label": "Username", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "schema": { - "type": "string", - "required": true, - "private": true, - "default": "" - } - }, - { - "variable": "email", - "label": "Email", - "schema": { - "type": "string", - "required": true, - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "service", - "group": "Services", - "label": "Configure Service(s)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service", - "description": "The Primary service on which the healthcheck runs, often the webUI", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "Service's Port(s) Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service Port Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "default": 10038, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "scaleExternalInterface", - "description": "Add External Interfaces (Experimental, might change or be removed without further notice)", - "label": "Add external Interfaces (Experimental)", - "group": "Networking", - "schema": { - "type": "list", - "items": [ - { - "variable": "interfaceConfiguration", - "description": "Interface Configuration", - "label": "Interface Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "$ref": [ - "normalize/interfaceConfiguration" - ], - "attrs": [ - { - "variable": "hostInterface", - "description": "Please Specify Host Interface", - "label": "Host Interface", - "schema": { - "type": "string", - "required": true, - "$ref": [ - "definitions/interface" - ], - "enum": [] - } - }, - { - "variable": "ipam", - "description": "Define how IP Address will be managed", - "label": "IP Address Management", - "schema": { - "additional_attrs": true, - "type": "dict", - "required": true, - "attrs": [ - { - "variable": "type", - "description": "Specify type for IPAM", - "label": "IPAM Type", - "schema": { - "type": "string", - "required": true, - "enum": [ - { - "value": "dhcp", - "description": "Use DHCP" - }, - { - "value": "static", - "description": "Use Static IP" - } - ] - } - }, - { - "variable": "staticIPConfigurations", - "label": "Static IP Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticIP", - "label": "Static IP", - "schema": { - "type": "ipaddr", - "cidr": true - } - } - ] - } - }, - { - "variable": "staticRoutes", - "label": "Static Routes", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticRouteConfiguration", - "label": "Static Route Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "destination", - "label": "Destination", - "schema": { - "type": "ipaddr", - "cidr": true, - "required": true - } - }, - { - "variable": "gateway", - "label": "Gateway", - "schema": { - "type": "ipaddr", - "cidr": false, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "serviceList", - "label": "Add Manual Custom Services", - "group": "Services", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "serviceListEntry", - "label": "Custom Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - }, - { - "value": "Simple", - "description": "Deprecated CHANGE THIS" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "advancedsvcset", - "label": "Show Advanced Service Settings", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "externalIPs", - "label": "External IP's", - "description": "External IP's", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "externalIP", - "label": "External IP", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "ipFamilyPolicy", - "label": "IP Family Policy", - "description": "Specify the IP Policy", - "schema": { - "type": "string", - "default": "SingleStack", - "enum": [ - { - "value": "SingleStack", - "description": "SingleStack" - }, - { - "value": "PreferDualStack", - "description": "PreferDualStack" - }, - { - "value": "RequireDualStack", - "description": "RequireDualStack" - } - ] - } - }, - { - "variable": "ipFamilies", - "label": "IP Families", - "description": "(Advanced) The IP Families that should be used", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ipFamily", - "label": "IP Family", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "portsList", - "label": "Additional Service Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsListEntry", - "label": "Custom ports", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Port", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Port Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "protocol", - "label": "Port Type", - "schema": { - "type": "string", - "default": "tcp", - "enum": [ - { - "value": "http", - "description": "HTTP" - }, - { - "value": "https", - "description": "HTTPS" - }, - { - "value": "tcp", - "description": "TCP" - }, - { - "value": "udp", - "description": "UDP" - } - ] - } - }, - { - "variable": "targetPort", - "label": "Target Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "required": true - } - }, - { - "variable": "port", - "label": "Container Port", - "schema": { - "type": "int", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistence", - "label": "Integrated Persistent Storage", - "description": "Integrated Persistent Storage", - "group": "Persistence", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "pvc", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - }, - { - "value": "iscsi", - "description": "iSCSI Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size quotum of Storage (Do NOT REDUCE after installation)", - "description": "This value can ONLY be INCREASED after the installation", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "volsync", - "label": "VolSync (Experimental)", - "description": "Backup, Restore and Synchronise PVC storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "VolSyncEntry", - "label": "VolSync Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "Name of backup configuration", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "type", - "label": "Type VolSync/Backup", - "description": "Sets the VolSync Type", - "schema": { - "type": "string", - "default": "restic", - "enum": [ - { - "value": "restic", - "description": "Restic" - } - ] - } - }, - { - "variable": "credentials", - "label": "Credentials", - "description": "Name of credentials in the credentials section", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "dest", - "label": "VolSync Destination (Restore)", - "description": "VolSYnc Destination is the location where data is the reciever and configures recovery of backups", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "src", - "label": "VolSync Source (Backup)", - "description": "VolSYnc Source is the location where data is the sender and creates backups to storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistenceList", - "label": "Additional App Storage", - "group": "Persistence", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "persistenceListEntry", - "label": "Custom Storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the storage", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "hostPath", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "mountPath", - "label": "Mount Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "type": "string", - "default": "", - "required": true, - "valid_chars": "^\\/([a-zA-Z0-9._-]+(\\s?[a-zA-Z0-9._-]+|\\/?))+$" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size Quotum of Storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "volsync", - "label": "VolSync (Experimental)", - "description": "Backup, Restore and Synchronise PVC storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "VolSyncEntry", - "label": "VolSync Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "Name of backup configuration", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "type", - "label": "Type VolSync/Backup", - "description": "Sets the VolSync Type", - "schema": { - "type": "string", - "default": "restic", - "enum": [ - { - "value": "restic", - "description": "Restic" - } - ] - } - }, - { - "variable": "credentials", - "label": "Credentials", - "description": "Name of credentials in the credentials section", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "dest", - "label": "VolSync Destination (Restore)", - "description": "VolSYnc Destination is the location where data is the reciever and configures recovery of backups", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "src", - "label": "VolSync Source (Backup)", - "description": "VolSYnc Source is the location where data is the sender and creates backups to storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "", - "group": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name (Optional)", - "description": "Defaults to chart name", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description (Optional)", - "description": "Defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "icon", - "label": "Icon (Optional)", - "description": "Defaults to chart icon", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "widget", - "label": "Widget Settings", - "schema": { - "type": "dict", - "additional_attrs": true, - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "attrs": [ - { - "variable": "enabled", - "label": "Enable Widget", - "description": "When disabled all widget annotations are skipped.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "custom", - "label": "Options", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "key", - "label": "API-key (key)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "customkv", - "label": "Custom Options", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "option", - "label": "Option", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingressList", - "label": "Add Manual Custom Ingresses", - "group": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressListEntry", - "label": "Custom Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "ingressClassName", - "label": "IngressClass Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - }, - { - "variable": "overrideService", - "label": "Linked Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Service Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "port", - "label": "Service Port", - "schema": { - "type": "int" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Secret (Advanced)", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description", - "description": "defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "securityContext", - "group": "SecurityContext", - "label": "Security Context", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "container", - "label": "Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "runAsUser", - "label": "runAsUser", - "description": "The UserID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "runAsGroup", - "label": "runAsGroup", - "description": "The groupID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "PUID", - "label": "Process User ID - PUID", - "description": "When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps", - "schema": { - "type": "int", - "show_if": [ - [ - "runAsUser", - "=", - 0 - ] - ], - "default": 568 - } - }, - { - "variable": "UMASK", - "label": "UMASK", - "description": "When supported by the container, this sets the UMASK for the App. Not supported by all Apps", - "schema": { - "type": "string", - "default": "0022" - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "privileged", - "label": "Privileged mode", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "readOnlyRootFilesystem", - "label": "ReadOnly Root Filesystem", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - }, - { - "variable": "pod", - "label": "Pod", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "fsGroupChangePolicy", - "label": "When should we take ownership?", - "schema": { - "type": "string", - "default": "OnRootMismatch", - "enum": [ - { - "value": "OnRootMismatch", - "description": "OnRootMismatch" - }, - { - "value": "Always", - "description": "Always" - } - ] - } - }, - { - "variable": "supplementalGroups", - "label": "Supplemental Groups", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "supplementalGroupsEntry", - "label": "Supplemental Group", - "schema": { - "type": "int" - } - } - ] - } - }, - { - "variable": "fsGroup", - "label": "fsGroup", - "description": "The group that should own ALL storage.", - "schema": { - "type": "int", - "default": 568 - } - } - ] - } - } - ] - } - }, - { - "variable": "resources", - "group": "Resources", - "label": "Resource Limits", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "limits", - "label": "Advanced Limit Resource Consumption", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "4000m", - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "8Gi", - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - }, - { - "variable": "gpu.intel.com/i915", - "label": "Add Intel i915 GPUs", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "nvidia.com/gpu", - "label": "Add NVIDIA GPUs (Experimental)", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "amd.com/gpu", - "label": "Add AMD GPUs", - "schema": { - "type": "int", - "default": 0 - } - } - ] - } - }, - { - "variable": "requests", - "label": "Minimum Resources Required (request)", - "schema": { - "additional_attrs": true, - "type": "dict", - "hidden": true, - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "10m", - "hidden": true, - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "50Mi", - "hidden": true, - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - } - ] - } - } - ] - } - }, - { - "variable": "deviceList", - "label": "Mount USB Devices", - "group": "Devices", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "deviceListEntry", - "label": "Device", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Storage", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "type", - "label": "(Advanced) Type of Storage", - "description": "Sets the persistence type", - "schema": { - "type": "string", - "default": "device", - "hidden": true - } - }, - { - "variable": "readOnly", - "label": "readOnly", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Device Path", - "description": "Path to the device on the host system", - "schema": { - "type": "path" - } - }, - { - "variable": "mountPath", - "label": "Container Device Path", - "description": "Path inside the container the device is mounted", - "schema": { - "type": "string", - "default": "/dev/ttyACM0" - } - } - ] - } - } - ] - } - }, - { - "variable": "metrics", - "group": "Metrics", - "label": "Prometheus Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "prometheusRule", - "label": "PrometheusRule", - "description": "Enable and configure Prometheus Rules for the App.", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "networkPolicy", - "group": "Experimental", - "label": "(Advanced) Network Policy", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "netPolicyEntry", - "label": "Network Policy Entry", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "policyType", - "label": "Policy Type", - "schema": { - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "ingress", - "description": "Ingress" - }, - { - "value": "egress", - "description": "Egress" - }, - { - "value": "ingress-egress", - "description": "Ingress and Egress" - } - ] - } - }, - { - "variable": "egress", - "label": "Egress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "egressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "to", - "label": "To", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "toEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "from", - "label": "From", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "fromEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "addons", - "group": "Addons", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "Codeserver", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "service", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "NodePort", - "description": "Deprecated CHANGE THIS" - }, - { - "value": "ClusterIP", - "description": "ClusterIP" - }, - { - "value": "LoadBalancer", - "description": "LoadBalancer" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int", - "default": 36107 - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "scaleCert", - "label": "Use TrueNAS SCALE Certificate (Deprecated)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "int", - "$ref": [ - "definitions/certificate" - ], - "enum": [ - { - "value": null, - "description": "No Certificate" - } - ], - "default": null, - "null": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Codeserver Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "netshoot", - "label": "Netshoot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "envList", - "label": "Netshoot Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "vpn", - "label": "VPN", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "gluetun", - "description": "Gluetun" - }, - { - "value": "tailscale", - "description": "Tailscale" - }, - { - "value": "openvpn", - "description": "OpenVPN (Deprecated)" - }, - { - "value": "wireguard", - "description": "Wireguard (Deprecated)" - } - ] - } - }, - { - "variable": "openvpn", - "label": "OpenVPN Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "openvpn" - ] - ], - "attrs": [ - { - "variable": "username", - "label": "Authentication Username (Optional)", - "description": "Authentication Username, Optional", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "Authentication Password", - "description": "Authentication Credentials", - "schema": { - "type": "string", - "show_if": [ - [ - "username", - "!=", - "" - ] - ], - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "tailscale", - "label": "Tailscale Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "tailscale" - ] - ], - "attrs": [ - { - "variable": "authkey", - "label": "Authentication Key", - "description": "Provide an auth key to automatically authenticate the node as your user account.", - "schema": { - "type": "string", - "private": true, - "default": "" - } - }, - { - "variable": "auth_once", - "label": "Auth Once", - "description": "Only attempt to log in if not already logged in.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "accept_dns", - "label": "Accept DNS", - "description": "Accept DNS configuration from the admin console.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "userspace", - "label": "Userspace", - "description": "Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "routes", - "label": "Routes", - "description": "Expose physical subnet routes to your entire Tailscale network.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "dest_ip", - "label": "Destination IP", - "description": "Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "sock5_server", - "label": "Sock5 Server", - "description": "The address on which to listen for SOCKS5 proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "outbound_http_proxy_listen", - "label": "Outbound HTTP Proxy Listen", - "description": "The address on which to listen for HTTP proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "extra_args", - "label": "Extra Args", - "description": "Extra Args", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "daemon_extra_args", - "label": "Tailscale Daemon Extra Args", - "description": "Tailscale Daemon Extra Args", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "killSwitch", - "label": "Enable Killswitch", - "schema": { - "type": "boolean", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": true - } - }, - { - "variable": "excludedNetworks_IPv4", - "label": "Killswitch Excluded IPv4 networks", - "description": "List of Killswitch Excluded IPv4 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv4", - "label": "IPv4 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "excludedNetworks_IPv6", - "label": "Killswitch Excluded IPv6 networks", - "description": "List of Killswitch Excluded IPv6 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv6", - "label": "IPv6 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "configFile", - "label": "VPN Config File Location", - "schema": { - "type": "string", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": "" - } - }, - { - "variable": "envList", - "label": "VPN Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true, - "max_length": 10240 - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "docs", - "group": "Documentation", - "label": "Please read the documentation at https://truecharts.org", - "description": "Please read the documentation at
    https://truecharts.org", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDocs", - "label": "I have checked the documentation", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "donateNag", - "group": "Documentation", - "label": "Please consider supporting TrueCharts, see https://truecharts.org/sponsor", - "description": "Please consider supporting TrueCharts, see
    https://truecharts.org/sponsor", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDonate", - "label": "I have considered donating", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - } - ] - } - } - ] - }, - "app_readme": "

    A self-hosted data logger for your Tesla

    \n

    This App is supplied by TrueCharts, for more information visit the manual: https://truecharts.org/charts/incubator/TeslaMate

    \n
    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    ", - "detailed_readme": "
    \n

    title: README

    \n

    General Info

    \n

    TrueCharts can be installed as both normal Helm Charts or as TrueNAS SCALE Apps.\nBoth solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible

    \n

    For more information about this Chart, please check the docs on the TrueCharts website

    \n

    This chart is not maintained by the upstream project and any issues with the chart should be raised here

    \n

    Installation

    \n

    Helm-Chart installation

    \n

    To install TrueCharts Helm charts using Helm, you can use our OCI Repository.

    \n

    helm install mychart oci://tccr.io/truecharts/CHARTNAME

    \n

    For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/

    \n

    TrueNAS SCALE Apps

    \n

    For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the quick-start guides for TrueNAS SCALE.

    \n

    Configuration Options

    \n

    To view the chart specific options, please view Values.yaml included in the chart.

    \n

    All our Charts use a shared \"common\" library chart that contains most of the templating and options.\nFor the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/

    \n

    Chart Specific Guides and information

    \n

    All our charts have dedicated documentation pages.\nThe documentation for this chart can be found here:\nhttps://truecharts.org/charts/incubator/TeslaMate

    \n

    Support

    \n\n
    \n

    Sponsor TrueCharts

    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    \n

    All Rights Reserved - The TrueCharts Project

    ", - "changelog": "

    for the complete changelog, please refer to the website

    \n

    Important:

    " - }, - "0.0.16": { - "healthy": true, - "supported": true, - "healthy_error": null, - "location": "/home/runner/_work/catalog/catalog/incubator/TeslaMate/0.0.16", - "last_update": "2024-05-29 12:35:14", - "required_features": [ - "definitions/timezone", - "normalize/interfaceConfiguration", - "definitions/certificate", - "definitions/interface" - ], - "human_version": "1.28.5_0.0.16", - "version": "0.0.16", - "chart_metadata": { - "annotations": { - "max_scale_version": "24.04.0", - "min_scale_version": "23.10.0", - "truecharts.org/SCALE-support": "true", - "truecharts.org/category": "metrics", - "truecharts.org/max_helm_version": "3.14", - "truecharts.org/min_helm_version": "3.11", - "truecharts.org/train": "incubator" - }, - "apiVersion": "v2", - "appVersion": "1.28.5", - "dependencies": [ - { - "name": "common", - "version": "20.3.12", - "repository": "oci://tccr.io/truecharts", - "condition": "", - "alias": "", - "tags": [], - "import-values": [] - } - ], - "deprecated": false, - "description": "A self-hosted data logger for your Tesla", - "home": "https://truecharts.org/charts/incubator/TeslaMate", - "icon": "https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp", - "keywords": [ - "analytics", - "monitoring", - "metrics", - "logs" - ], - "kubeVersion": ">=1.24.0-0", - "maintainers": [ - { - "name": "TrueCharts", - "email": "info@truecharts.org", - "url": "https://truecharts.org" - } - ], - "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": "0.0.16" - }, - "app_metadata": null, - "schema": { - "groups": [ - { - "name": "Image", - "description": "Configured the images to be used for the Chart.\nIt's wise to use \"digest pinned\" tags and to avoid using \"latest\".\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/#images\n" - }, - { - "name": "General", - "description": "For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general.\n\nCheckout the following documentation for more information:\n - https://truecharts.org/common/global/\n - https://truecharts.org/common/#tz\n - https://truecharts.org/common/podoptions/\n - Image Pull Secrets\n" - }, - { - "name": "Workload", - "description": "These settings configure how the actual Pods and containers are running.\nGenerally, on SCALE, we only expose a limited subset of these settings for the primary workload and container.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/workload/\n- https://truecharts.org/common/container/\n" - }, - { - "name": "App Configuration", - "description": "Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application.\nMost options should have a Tooltip (Circled Question Mark) to further describe said option.\n\nTo find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/\n" - }, - { - "name": "Services", - "description": "Service and Networking options for any applications are contained here.\nSome applications may have complicated networking setups with multiple options or some may have no options here at all.\n\nOptions here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/service/\n" - }, - { - "name": "Networking", - "description": "Contains advanced networking options that are not actively supported by the TrueCharts team.\nCurrently only contains scaleExternalInterfaces.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/scaleexternalinterface/\n" - }, - { - "name": "Persistence", - "description": "Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types.\nThis storage is called Persistence since it is not deleted upon restart or upgrade of an application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/\n- https://truecharts.org/scale/guides/nfs-share/\n- https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath\n" - }, - { - "name": "Ingress", - "description": "Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names).\nIf you choose to enable this you must have a \"Ingress Provider\" aka \"Reverse Proxy\" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/)\nIt also requiresa DNS service to actually resolve the DNS name of the FQDN specified.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/ingress/\n" - }, - { - "name": "SecurityContext", - "description": "The security settings for each application and/or permissions that each application may have for the files/directories created.\nEach application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities.\n\nUnless necessary users are advised to keep this section mostly to defaults.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/securitycontext/\n" - }, - { - "name": "Resources", - "description": "Resources limits that have been defined by each application are in this section.\nMost will have a specific default that some users may want to change based on their specific hardware or needs.\n\nThis also contains the options to mount GPUs or, more precisely, \"request\" GPU's to be mounted.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/resources/\n" - }, - { - "name": "Devices", - "description": "These are special \"mountpoints\" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts.\nFor clearity we've decided to seperate this from persistence on SCALE.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/device/\n- https://truecharts.org/scale/guides/pci-passthrough/\n" - }, - { - "name": "Middlewares", - "description": "Traefik Middlewares" - }, - { - "name": "StorageClass", - "description": "StorageClasses define where to storage Storage.\n\nCheckout the following documentation for more information:\n" - }, - { - "name": "Metrics", - "description": "Contains options to configure Prometheus metrics for the application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/metrics/\n" - }, - { - "name": "Addons", - "description": "Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application\u2019s defaults.\nThings included here are VPN addons, Codeserver for editing files inside the application\u2019s container, Netshoot for network troubelshooting, etc.\n\nGenerally not required for use but may be necessary or usefull at times for specific applications.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/addons/\n- https://truecharts.org/scale/guides/vpn-setup/\n" - }, - { - "name": "Experimental", - "description": "Experimental Configuration Options\nOften these are not fully flushed-out, could randomly break or might not work at-all.\n" - }, - { - "name": "Postgresql", - "description": "For Postgresql we use \"CloudNative-PG\" as a backend, which has to be installed first.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/cnpg/\n- https://truecharts.org/scale/guides/sql-export/\n- https://truecharts.org/scale/guides/recover-cnpg/\n" - }, - { - "name": "Dependencies", - "description": "contains dependency setting for which we, currently, do not have seperate catagories (yet)\n" - }, - { - "name": "Documentation", - "description": "We added this section to make everyone aware that OpenSource isn't always easy.\nIt doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects.\n\nBefore installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/\nWe would also advice going over our https://truecharts.org/scale/guides/scale-intro/\nand many of the other documentation pages...\n" - } - ], - "portals": { - "open": { - "protocols": [ - "$kubernetes-resource_configmap_tcportal-open_protocol" - ], - "host": [ - "$kubernetes-resource_configmap_tcportal-open_host" - ], - "ports": [ - "$kubernetes-resource_configmap_tcportal-open_port" - ] - } - }, - "questions": [ - { - "variable": "global", - "group": "General", - "label": "Global Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "stopAll", - "label": "Stop All", - "description": "Stops All Running pods and hibernates cnpg", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - }, - { - "variable": "workload", - "group": "Workload", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type (Advanced)", - "schema": { - "type": "string", - "default": "Deployment", - "enum": [ - { - "value": "Deployment", - "description": "Deployment" - }, - { - "value": "DaemonSet", - "description": "DaemonSet" - } - ] - } - }, - { - "variable": "replicas", - "label": "Replicas (Advanced)", - "description": "Set the number of Replicas", - "schema": { - "type": "int", - "show_if": [ - [ - "type", - "!=", - "DaemonSet" - ] - ], - "default": 1 - } - }, - { - "variable": "podSpec", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "containers", - "label": "Containers", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "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 - ] - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Extra Environment Variables", - "description": "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting...", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string" - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "extraArgs", - "label": "Extra Args", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "arg", - "label": "Arg", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "command", - "label": "Command", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "param", - "label": "Param", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "TZ", - "label": "Timezone", - "group": "General", - "schema": { - "type": "string", - "default": "America/Los_Angeles", - "$ref": [ - "definitions/timezone" - ], - "enum": [ - { - "value": "Asia/Damascus", - "description": "'Asia/Damascus' timezone" - }, - { - "value": "Asia/Saigon", - "description": "'Asia/Saigon' timezone" - } - ] - } - }, - { - "variable": "podOptions", - "group": "General", - "label": "Global Pod Options (Advanced)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "expertPodOpts", - "label": "Expert - Pod Options", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hostNetwork", - "label": "Host Networking", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "dnsConfig", - "label": "DNS Configuration", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "options", - "label": "Options", - "schema": { - "type": "list", - "default": [ - { - "name": "ndots", - "value": "1" - } - ], - "items": [ - { - "variable": "optionsEntry", - "label": "Option Entry", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "nameservers", - "label": "Nameservers", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "nsEntry", - "label": "Nameserver Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "searches", - "label": "Searches", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "searchEntry", - "label": "Search Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "imagePullSecretList", - "group": "General", - "label": "Image Pull Secrets", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pullsecretentry", - "label": "Pull Secret", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "data", - "label": "Data", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "registry", - "label": "Registry", - "schema": { - "type": "string", - "required": true, - "default": "https://index.docker.io/v1/" - } - }, - { - "variable": "username", - "label": "Username", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "schema": { - "type": "string", - "required": true, - "private": true, - "default": "" - } - }, - { - "variable": "email", - "label": "Email", - "schema": { - "type": "string", - "required": true, - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "service", - "group": "Services", - "label": "Configure Service(s)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service", - "description": "The Primary service on which the healthcheck runs, often the webUI", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "Service's Port(s) Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service Port Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "default": 10038, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "scaleExternalInterface", - "description": "Add External Interfaces (Experimental, might change or be removed without further notice)", - "label": "Add external Interfaces (Experimental)", - "group": "Networking", - "schema": { - "type": "list", - "items": [ - { - "variable": "interfaceConfiguration", - "description": "Interface Configuration", - "label": "Interface Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "$ref": [ - "normalize/interfaceConfiguration" - ], - "attrs": [ - { - "variable": "hostInterface", - "description": "Please Specify Host Interface", - "label": "Host Interface", - "schema": { - "type": "string", - "required": true, - "$ref": [ - "definitions/interface" - ], - "enum": [] - } - }, - { - "variable": "ipam", - "description": "Define how IP Address will be managed", - "label": "IP Address Management", - "schema": { - "additional_attrs": true, - "type": "dict", - "required": true, - "attrs": [ - { - "variable": "type", - "description": "Specify type for IPAM", - "label": "IPAM Type", - "schema": { - "type": "string", - "required": true, - "enum": [ - { - "value": "dhcp", - "description": "Use DHCP" - }, - { - "value": "static", - "description": "Use Static IP" - } - ] - } - }, - { - "variable": "staticIPConfigurations", - "label": "Static IP Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticIP", - "label": "Static IP", - "schema": { - "type": "ipaddr", - "cidr": true - } - } - ] - } - }, - { - "variable": "staticRoutes", - "label": "Static Routes", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticRouteConfiguration", - "label": "Static Route Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "destination", - "label": "Destination", - "schema": { - "type": "ipaddr", - "cidr": true, - "required": true - } - }, - { - "variable": "gateway", - "label": "Gateway", - "schema": { - "type": "ipaddr", - "cidr": false, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "serviceList", - "label": "Add Manual Custom Services", - "group": "Services", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "serviceListEntry", - "label": "Custom Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - }, - { - "value": "Simple", - "description": "Deprecated CHANGE THIS" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "advancedsvcset", - "label": "Show Advanced Service Settings", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "externalIPs", - "label": "External IP's", - "description": "External IP's", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "externalIP", - "label": "External IP", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "ipFamilyPolicy", - "label": "IP Family Policy", - "description": "Specify the IP Policy", - "schema": { - "type": "string", - "default": "SingleStack", - "enum": [ - { - "value": "SingleStack", - "description": "SingleStack" - }, - { - "value": "PreferDualStack", - "description": "PreferDualStack" - }, - { - "value": "RequireDualStack", - "description": "RequireDualStack" - } - ] - } - }, - { - "variable": "ipFamilies", - "label": "IP Families", - "description": "(Advanced) The IP Families that should be used", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ipFamily", - "label": "IP Family", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "portsList", - "label": "Additional Service Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsListEntry", - "label": "Custom ports", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Port", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Port Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "protocol", - "label": "Port Type", - "schema": { - "type": "string", - "default": "tcp", - "enum": [ - { - "value": "http", - "description": "HTTP" - }, - { - "value": "https", - "description": "HTTPS" - }, - { - "value": "tcp", - "description": "TCP" - }, - { - "value": "udp", - "description": "UDP" - } - ] - } - }, - { - "variable": "targetPort", - "label": "Target Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "required": true - } - }, - { - "variable": "port", - "label": "Container Port", - "schema": { - "type": "int", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistence", - "label": "Integrated Persistent Storage", - "description": "Integrated Persistent Storage", - "group": "Persistence", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "pvc", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - }, - { - "value": "iscsi", - "description": "iSCSI Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size quotum of Storage (Do NOT REDUCE after installation)", - "description": "This value can ONLY be INCREASED after the installation", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistenceList", - "label": "Additional App Storage", - "group": "Persistence", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "persistenceListEntry", - "label": "Custom Storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the storage", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "hostPath", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "mountPath", - "label": "Mount Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "type": "string", - "default": "", - "required": true, - "valid_chars": "^\\/([a-zA-Z0-9._-]+(\\s?[a-zA-Z0-9._-]+|\\/?))+$" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size Quotum of Storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "", - "group": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name (Optional)", - "description": "Defaults to chart name", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description (Optional)", - "description": "Defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "icon", - "label": "Icon (Optional)", - "description": "Defaults to chart icon", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "widget", - "label": "Widget Settings", - "schema": { - "type": "dict", - "additional_attrs": true, - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "attrs": [ - { - "variable": "enabled", - "label": "Enable Widget", - "description": "When disabled all widget annotations are skipped.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "custom", - "label": "Options", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "key", - "label": "API-key (key)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "customkv", - "label": "Custom Options", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "option", - "label": "Option", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingressList", - "label": "Add Manual Custom Ingresses", - "group": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressListEntry", - "label": "Custom Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "ingressClassName", - "label": "IngressClass Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - }, - { - "variable": "overrideService", - "label": "Linked Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Service Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "port", - "label": "Service Port", - "schema": { - "type": "int" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Secret (Advanced)", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description", - "description": "defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "securityContext", - "group": "SecurityContext", - "label": "Security Context", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "container", - "label": "Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "runAsUser", - "label": "runAsUser", - "description": "The UserID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "runAsGroup", - "label": "runAsGroup", - "description": "The groupID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "PUID", - "label": "Process User ID - PUID", - "description": "When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps", - "schema": { - "type": "int", - "show_if": [ - [ - "runAsUser", - "=", - 0 - ] - ], - "default": 568 - } - }, - { - "variable": "UMASK", - "label": "UMASK", - "description": "When supported by the container, this sets the UMASK for the App. Not supported by all Apps", - "schema": { - "type": "string", - "default": "0022" - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "privileged", - "label": "Privileged mode", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "readOnlyRootFilesystem", - "label": "ReadOnly Root Filesystem", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - }, - { - "variable": "pod", - "label": "Pod", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "fsGroupChangePolicy", - "label": "When should we take ownership?", - "schema": { - "type": "string", - "default": "OnRootMismatch", - "enum": [ - { - "value": "OnRootMismatch", - "description": "OnRootMismatch" - }, - { - "value": "Always", - "description": "Always" - } - ] - } - }, - { - "variable": "supplementalGroups", - "label": "Supplemental Groups", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "supplementalGroupsEntry", - "label": "Supplemental Group", - "schema": { - "type": "int" - } - } - ] - } - }, - { - "variable": "fsGroup", - "label": "fsGroup", - "description": "The group that should own ALL storage.", - "schema": { - "type": "int", - "default": 568 - } - } - ] - } - } - ] - } - }, - { - "variable": "resources", - "group": "Resources", - "label": "Resource Limits", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "limits", - "label": "Advanced Limit Resource Consumption", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "4000m", - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "8Gi", - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - }, - { - "variable": "gpu.intel.com/i915", - "label": "Add Intel i915 GPUs", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "nvidia.com/gpu", - "label": "Add NVIDIA GPUs (Experimental)", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "amd.com/gpu", - "label": "Add AMD GPUs", - "schema": { - "type": "int", - "default": 0 - } - } - ] - } - }, - { - "variable": "requests", - "label": "Minimum Resources Required (request)", - "schema": { - "additional_attrs": true, - "type": "dict", - "hidden": true, - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "10m", - "hidden": true, - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "50Mi", - "hidden": true, - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - } - ] - } - } - ] - } - }, - { - "variable": "deviceList", - "label": "Mount USB Devices", - "group": "Devices", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "deviceListEntry", - "label": "Device", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Storage", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "type", - "label": "(Advanced) Type of Storage", - "description": "Sets the persistence type", - "schema": { - "type": "string", - "default": "device", - "hidden": true - } - }, - { - "variable": "readOnly", - "label": "readOnly", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Device Path", - "description": "Path to the device on the host system", - "schema": { - "type": "path" - } - }, - { - "variable": "mountPath", - "label": "Container Device Path", - "description": "Path inside the container the device is mounted", - "schema": { - "type": "string", - "default": "/dev/ttyACM0" - } - } - ] - } - } - ] - } - }, - { - "variable": "metrics", - "group": "Metrics", - "label": "Prometheus Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "prometheusRule", - "label": "PrometheusRule", - "description": "Enable and configure Prometheus Rules for the App.", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "networkPolicy", - "group": "Experimental", - "label": "(Advanced) Network Policy", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "netPolicyEntry", - "label": "Network Policy Entry", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "policyType", - "label": "Policy Type", - "schema": { - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "ingress", - "description": "Ingress" - }, - { - "value": "egress", - "description": "Egress" - }, - { - "value": "ingress-egress", - "description": "Ingress and Egress" - } - ] - } - }, - { - "variable": "egress", - "label": "Egress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "egressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "to", - "label": "To", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "toEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "from", - "label": "From", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "fromEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "addons", - "group": "Addons", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "Codeserver", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "service", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "NodePort", - "description": "Deprecated CHANGE THIS" - }, - { - "value": "ClusterIP", - "description": "ClusterIP" - }, - { - "value": "LoadBalancer", - "description": "LoadBalancer" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int", - "default": 36107 - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "scaleCert", - "label": "Use TrueNAS SCALE Certificate (Deprecated)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "int", - "$ref": [ - "definitions/certificate" - ], - "enum": [ - { - "value": null, - "description": "No Certificate" - } - ], - "default": null, - "null": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Codeserver Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "netshoot", - "label": "Netshoot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "envList", - "label": "Netshoot Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "vpn", - "label": "VPN", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "gluetun", - "description": "Gluetun" - }, - { - "value": "tailscale", - "description": "Tailscale" - }, - { - "value": "openvpn", - "description": "OpenVPN (Deprecated)" - }, - { - "value": "wireguard", - "description": "Wireguard (Deprecated)" - } - ] - } - }, - { - "variable": "openvpn", - "label": "OpenVPN Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "openvpn" - ] - ], - "attrs": [ - { - "variable": "username", - "label": "Authentication Username (Optional)", - "description": "Authentication Username, Optional", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "Authentication Password", - "description": "Authentication Credentials", - "schema": { - "type": "string", - "show_if": [ - [ - "username", - "!=", - "" - ] - ], - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "tailscale", - "label": "Tailscale Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "tailscale" - ] - ], - "attrs": [ - { - "variable": "authkey", - "label": "Authentication Key", - "description": "Provide an auth key to automatically authenticate the node as your user account.", - "schema": { - "type": "string", - "private": true, - "default": "" - } - }, - { - "variable": "auth_once", - "label": "Auth Once", - "description": "Only attempt to log in if not already logged in.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "accept_dns", - "label": "Accept DNS", - "description": "Accept DNS configuration from the admin console.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "userspace", - "label": "Userspace", - "description": "Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "routes", - "label": "Routes", - "description": "Expose physical subnet routes to your entire Tailscale network.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "dest_ip", - "label": "Destination IP", - "description": "Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "sock5_server", - "label": "Sock5 Server", - "description": "The address on which to listen for SOCKS5 proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "outbound_http_proxy_listen", - "label": "Outbound HTTP Proxy Listen", - "description": "The address on which to listen for HTTP proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "extra_args", - "label": "Extra Args", - "description": "Extra Args", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "daemon_extra_args", - "label": "Tailscale Daemon Extra Args", - "description": "Tailscale Daemon Extra Args", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "killSwitch", - "label": "Enable Killswitch", - "schema": { - "type": "boolean", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": true - } - }, - { - "variable": "excludedNetworks_IPv4", - "label": "Killswitch Excluded IPv4 networks", - "description": "List of Killswitch Excluded IPv4 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv4", - "label": "IPv4 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "excludedNetworks_IPv6", - "label": "Killswitch Excluded IPv6 networks", - "description": "List of Killswitch Excluded IPv6 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv6", - "label": "IPv6 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "configFile", - "label": "VPN Config File Location", - "schema": { - "type": "string", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": "" - } - }, - { - "variable": "envList", - "label": "VPN Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true, - "max_length": 10240 - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "docs", - "group": "Documentation", - "label": "Please read the documentation at https://truecharts.org", - "description": "Please read the documentation at
    https://truecharts.org", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDocs", - "label": "I have checked the documentation", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "donateNag", - "group": "Documentation", - "label": "Please consider supporting TrueCharts, see https://truecharts.org/sponsor", - "description": "Please consider supporting TrueCharts, see
    https://truecharts.org/sponsor", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDonate", - "label": "I have considered donating", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - } - ] - } - } - ] - }, - "app_readme": "

    A self-hosted data logger for your Tesla

    \n

    This App is supplied by TrueCharts, for more information visit the manual: https://truecharts.org/charts/incubator/TeslaMate

    \n
    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    ", - "detailed_readme": "
    \n

    title: README

    \n

    General Info

    \n

    TrueCharts can be installed as both normal Helm Charts or as TrueNAS SCALE Apps.\nBoth solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible

    \n

    For more information about this Chart, please check the docs on the TrueCharts website

    \n

    This chart is not maintained by the upstream project and any issues with the chart should be raised here

    \n

    Installation

    \n

    Helm-Chart installation

    \n

    To install TrueCharts Helm charts using Helm, you can use our OCI Repository.

    \n

    helm install mychart oci://tccr.io/truecharts/CHARTNAME

    \n

    For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/

    \n

    TrueNAS SCALE Apps

    \n

    For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the quick-start guides for TrueNAS SCALE.

    \n

    Configuration Options

    \n

    To view the chart specific options, please view Values.yaml included in the chart.

    \n

    All our Charts use a shared \"common\" library chart that contains most of the templating and options.\nFor the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/

    \n

    Chart Specific Guides and information

    \n

    All our charts have dedicated documentation pages.\nThe documentation for this chart can be found here:\nhttps://truecharts.org/charts/incubator/TeslaMate

    \n

    Support

    \n\n
    \n

    Sponsor TrueCharts

    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    \n

    All Rights Reserved - The TrueCharts Project

    ", - "changelog": "

    for the complete changelog, please refer to the website

    \n

    Important:

    " - }, - "0.0.15": { - "healthy": true, - "supported": true, - "healthy_error": null, - "location": "/home/runner/_work/catalog/catalog/incubator/TeslaMate/0.0.15", - "last_update": "2024-05-29 12:35:14", - "required_features": [ - "definitions/timezone", - "normalize/interfaceConfiguration", - "definitions/certificate", - "definitions/interface" - ], - "human_version": "1.28.5_0.0.15", - "version": "0.0.15", - "chart_metadata": { - "annotations": { - "max_scale_version": "24.04.0", - "min_scale_version": "23.10.0", - "truecharts.org/SCALE-support": "true", - "truecharts.org/category": "metrics", - "truecharts.org/max_helm_version": "3.14", - "truecharts.org/min_helm_version": "3.11", - "truecharts.org/train": "incubator" - }, - "apiVersion": "v2", - "appVersion": "1.28.5", - "dependencies": [ - { - "name": "common", - "version": "20.3.11", - "repository": "oci://tccr.io/truecharts", - "condition": "", - "alias": "", - "tags": [], - "import-values": [] - } - ], - "deprecated": false, - "description": "A self-hosted data logger for your Tesla", - "home": "https://truecharts.org/charts/incubator/TeslaMate", - "icon": "https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp", - "keywords": [ - "analytics", - "monitoring", - "metrics", - "logs" - ], - "kubeVersion": ">=1.24.0-0", - "maintainers": [ - { - "name": "TrueCharts", - "email": "info@truecharts.org", - "url": "https://truecharts.org" - } - ], - "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": "0.0.15" - }, - "app_metadata": null, - "schema": { - "groups": [ - { - "name": "Image", - "description": "Configured the images to be used for the Chart.\nIt's wise to use \"digest pinned\" tags and to avoid using \"latest\".\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/#images\n" - }, - { - "name": "General", - "description": "For TrueNAS SCALE We've grouped a number of settings here, that all effact how apps run in general.\n\nCheckout the following documentation for more information:\n - https://truecharts.org/common/global/\n - https://truecharts.org/common/#tz\n - https://truecharts.org/common/podoptions/\n - Image Pull Secrets\n" - }, - { - "name": "Workload", - "description": "These settings configure how the actual Pods and containers are running.\nGenerally, on SCALE, we only expose a limited subset of these settings for the primary workload and container.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/workload/\n- https://truecharts.org/common/container/\n" - }, - { - "name": "App Configuration", - "description": "Every application has different values that may be required to run or have multiple options that the user may choose to enable or disable to change the behavior of the application.\nMost options should have a Tooltip (Circled Question Mark) to further describe said option.\n\nTo find more information, lookup your chart-specific documentation in the Charts List: https://truecharts.org/charts/description-list/\n" - }, - { - "name": "Services", - "description": "Service and Networking options for any applications are contained here.\nSome applications may have complicated networking setups with multiple options or some may have no options here at all.\n\nOptions here include the service and port configurations for the application, and more may be enabled or changed under the Advanced Settings and Show Expert Config boxes.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/service/\n" - }, - { - "name": "Networking", - "description": "Contains advanced networking options that are not actively supported by the TrueCharts team.\nCurrently only contains scaleExternalInterfaces.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/scaleexternalinterface/\n" - }, - { - "name": "Persistence", - "description": "Many applications will have certain options for storage to be configurable by the user, the main two being PVC and hostpath but may include other types.\nThis storage is called Persistence since it is not deleted upon restart or upgrade of an application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/\n- https://truecharts.org/scale/guides/nfs-share/\n- https://truecharts.org/general/faq/#why-pvc-is-recommended-over-hostpath\n" - }, - { - "name": "Ingress", - "description": "Ingress (more commonly known as Reverse Proxy) settings can be configured here. This is how Kubernetes connects your Applications in containers to FQDNs (fully qualified domain names).\nIf you choose to enable this you must have a \"Ingress Provider\" aka \"Reverse Proxy\" installed (We highly advice Traefik: https://truecharts.org/charts/premium/traefik/)\nIt also requiresa DNS service to actually resolve the DNS name of the FQDN specified.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/ingress/\n" - }, - { - "name": "SecurityContext", - "description": "The security settings for each application and/or permissions that each application may have for the files/directories created.\nEach application will come with predefined permissions but users may want to change certain setting depending on their usage or capabilities.\n\nUnless necessary users are advised to keep this section mostly to defaults.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/securitycontext/\n" - }, - { - "name": "Resources", - "description": "Resources limits that have been defined by each application are in this section.\nMost will have a specific default that some users may want to change based on their specific hardware or needs.\n\nThis also contains the options to mount GPUs or, more precisely, \"request\" GPU's to be mounted.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/resources/\n" - }, - { - "name": "Devices", - "description": "These are special \"mountpoints\" that can be used to mount miscelanious USB and PCI devices using special hostPath mounts.\nFor clearity we've decided to seperate this from persistence on SCALE.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/persistence/device/\n- https://truecharts.org/scale/guides/pci-passthrough/\n" - }, - { - "name": "Middlewares", - "description": "Traefik Middlewares" - }, - { - "name": "StorageClass", - "description": "StorageClasses define where to storage Storage.\n\nCheckout the following documentation for more information:\n" - }, - { - "name": "Metrics", - "description": "Contains options to configure Prometheus metrics for the application.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/metrics/\n" - }, - { - "name": "Addons", - "description": "Addons that are supplied by the TrueCharts team to add additional capabilities for users to use on top of the application\u2019s defaults.\nThings included here are VPN addons, Codeserver for editing files inside the application\u2019s container, Netshoot for network troubelshooting, etc.\n\nGenerally not required for use but may be necessary or usefull at times for specific applications.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/addons/\n- https://truecharts.org/scale/guides/vpn-setup/\n" - }, - { - "name": "Experimental", - "description": "Experimental Configuration Options\nOften these are not fully flushed-out, could randomly break or might not work at-all.\n" - }, - { - "name": "Postgresql", - "description": "For Postgresql we use \"CloudNative-PG\" as a backend, which has to be installed first.\n\nCheckout the following documentation for more information:\n- https://truecharts.org/common/cnpg/\n- https://truecharts.org/scale/guides/sql-export/\n- https://truecharts.org/scale/guides/recover-cnpg/\n" - }, - { - "name": "Dependencies", - "description": "contains dependency setting for which we, currently, do not have seperate catagories (yet)\n" - }, - { - "name": "Documentation", - "description": "We added this section to make everyone aware that OpenSource isn't always easy.\nIt doesn't keep existing without signficant ongoing support, so please consider supporting TrueCharts and other OpenSource projects.\n\nBefore installing, be sure you've followed the https://truecharts.org/scale/guides/getting-started/\nWe would also advice going over our https://truecharts.org/scale/guides/scale-intro/\nand many of the other documentation pages...\n" - } - ], - "portals": { - "open": { - "protocols": [ - "$kubernetes-resource_configmap_tcportal-open_protocol" - ], - "host": [ - "$kubernetes-resource_configmap_tcportal-open_host" - ], - "ports": [ - "$kubernetes-resource_configmap_tcportal-open_port" - ] - } - }, - "questions": [ - { - "variable": "global", - "group": "General", - "label": "Global Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "stopAll", - "label": "Stop All", - "description": "Stops All Running pods and hibernates cnpg", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - }, - { - "variable": "workload", - "group": "Workload", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type (Advanced)", - "schema": { - "type": "string", - "default": "Deployment", - "enum": [ - { - "value": "Deployment", - "description": "Deployment" - }, - { - "value": "DaemonSet", - "description": "DaemonSet" - } - ] - } - }, - { - "variable": "replicas", - "label": "Replicas (Advanced)", - "description": "Set the number of Replicas", - "schema": { - "type": "int", - "show_if": [ - [ - "type", - "!=", - "DaemonSet" - ] - ], - "default": 1 - } - }, - { - "variable": "podSpec", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "containers", - "label": "Containers", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "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 - ] - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Extra Environment Variables", - "description": "Please be aware that some variables are set in the background, adding duplicates here might cause issues or prevent the app from starting...", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string" - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "extraArgs", - "label": "Extra Args", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "arg", - "label": "Arg", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "command", - "label": "Command", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "param", - "label": "Param", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "TZ", - "label": "Timezone", - "group": "General", - "schema": { - "type": "string", - "default": "America/Los_Angeles", - "$ref": [ - "definitions/timezone" - ], - "enum": [ - { - "value": "Asia/Damascus", - "description": "'Asia/Damascus' timezone" - }, - { - "value": "Asia/Saigon", - "description": "'Asia/Saigon' timezone" - } - ] - } - }, - { - "variable": "podOptions", - "group": "General", - "label": "Global Pod Options (Advanced)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "expertPodOpts", - "label": "Expert - Pod Options", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hostNetwork", - "label": "Host Networking", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "dnsConfig", - "label": "DNS Configuration", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "options", - "label": "Options", - "schema": { - "type": "list", - "default": [ - { - "name": "ndots", - "value": "1" - } - ], - "items": [ - { - "variable": "optionsEntry", - "label": "Option Entry", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "nameservers", - "label": "Nameservers", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "nsEntry", - "label": "Nameserver Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "searches", - "label": "Searches", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "searchEntry", - "label": "Search Entry", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "imagePullSecretList", - "group": "General", - "label": "Image Pull Secrets", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pullsecretentry", - "label": "Pull Secret", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "data", - "label": "Data", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "registry", - "label": "Registry", - "schema": { - "type": "string", - "required": true, - "default": "https://index.docker.io/v1/" - } - }, - { - "variable": "username", - "label": "Username", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "schema": { - "type": "string", - "required": true, - "private": true, - "default": "" - } - }, - { - "variable": "email", - "label": "Email", - "schema": { - "type": "string", - "required": true, - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "service", - "group": "Services", - "label": "Configure Service(s)", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service", - "description": "The Primary service on which the healthcheck runs, often the webUI", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "Service's Port(s) Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Service Port Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "default": 10038, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "scaleExternalInterface", - "description": "Add External Interfaces (Experimental, might change or be removed without further notice)", - "label": "Add external Interfaces (Experimental)", - "group": "Networking", - "schema": { - "type": "list", - "items": [ - { - "variable": "interfaceConfiguration", - "description": "Interface Configuration", - "label": "Interface Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "$ref": [ - "normalize/interfaceConfiguration" - ], - "attrs": [ - { - "variable": "hostInterface", - "description": "Please Specify Host Interface", - "label": "Host Interface", - "schema": { - "type": "string", - "required": true, - "$ref": [ - "definitions/interface" - ], - "enum": [] - } - }, - { - "variable": "ipam", - "description": "Define how IP Address will be managed", - "label": "IP Address Management", - "schema": { - "additional_attrs": true, - "type": "dict", - "required": true, - "attrs": [ - { - "variable": "type", - "description": "Specify type for IPAM", - "label": "IPAM Type", - "schema": { - "type": "string", - "required": true, - "enum": [ - { - "value": "dhcp", - "description": "Use DHCP" - }, - { - "value": "static", - "description": "Use Static IP" - } - ] - } - }, - { - "variable": "staticIPConfigurations", - "label": "Static IP Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticIP", - "label": "Static IP", - "schema": { - "type": "ipaddr", - "cidr": true - } - } - ] - } - }, - { - "variable": "staticRoutes", - "label": "Static Routes", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "=", - "static" - ] - ], - "items": [ - { - "variable": "staticRouteConfiguration", - "label": "Static Route Configuration", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "destination", - "label": "Destination", - "schema": { - "type": "ipaddr", - "cidr": true, - "required": true - } - }, - { - "variable": "gateway", - "label": "Gateway", - "schema": { - "type": "ipaddr", - "cidr": false, - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "serviceList", - "label": "Add Manual Custom Services", - "group": "Services", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "serviceListEntry", - "label": "Custom Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the service", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "LoadBalancer", - "description": "LoadBalancer (Expose Ports)" - }, - { - "value": "ClusterIP", - "description": "ClusterIP (Do Not Expose Ports)" - }, - { - "value": "Simple", - "description": "Deprecated CHANGE THIS" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "advancedsvcset", - "label": "Show Advanced Service Settings", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "externalIPs", - "label": "External IP's", - "description": "External IP's", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "externalIP", - "label": "External IP", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "ipFamilyPolicy", - "label": "IP Family Policy", - "description": "Specify the IP Policy", - "schema": { - "type": "string", - "default": "SingleStack", - "enum": [ - { - "value": "SingleStack", - "description": "SingleStack" - }, - { - "value": "PreferDualStack", - "description": "PreferDualStack" - }, - { - "value": "RequireDualStack", - "description": "RequireDualStack" - } - ] - } - }, - { - "variable": "ipFamilies", - "label": "IP Families", - "description": "(Advanced) The IP Families that should be used", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ipFamily", - "label": "IP Family", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "portsList", - "label": "Additional Service Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsListEntry", - "label": "Custom ports", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Port", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Port Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "protocol", - "label": "Port Type", - "schema": { - "type": "string", - "default": "tcp", - "enum": [ - { - "value": "http", - "description": "HTTP" - }, - { - "value": "https", - "description": "HTTPS" - }, - { - "value": "tcp", - "description": "TCP" - }, - { - "value": "udp", - "description": "UDP" - } - ] - } - }, - { - "variable": "targetPort", - "label": "Target Port", - "description": "This port exposes the container port on the service", - "schema": { - "type": "int", - "required": true - } - }, - { - "variable": "port", - "label": "Container Port", - "schema": { - "type": "int", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistence", - "label": "Integrated Persistent Storage", - "description": "Integrated Persistent Storage", - "group": "Persistence", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "pvc", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - }, - { - "value": "iscsi", - "description": "iSCSI Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size quotum of Storage (Do NOT REDUCE after installation)", - "description": "This value can ONLY be INCREASED after the installation", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "persistenceList", - "label": "Additional App Storage", - "group": "Persistence", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "persistenceListEntry", - "label": "Custom Storage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the storage", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "type", - "label": "Type of Storage", - "description": "Sets the persistence type, Anything other than PVC could break rollback!", - "schema": { - "type": "string", - "default": "hostPath", - "enum": [ - { - "value": "pvc", - "description": "PVC" - }, - { - "value": "hostPath", - "description": "Host Path" - }, - { - "value": "emptyDir", - "description": "emptyDir" - }, - { - "value": "nfs", - "description": "NFS Share" - } - ] - } - }, - { - "variable": "server", - "label": "NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "path", - "label": "Path on NFS Server", - "schema": { - "show_if": [ - [ - "type", - "=", - "nfs" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "iscsi", - "label": "iSCSI Options", - "schema": { - "show_if": [ - [ - "type", - "=", - "iscsi" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "targetPortal", - "label": "targetPortal", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "iqn", - "label": "iqn", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "lun", - "label": "lun", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "authSession", - "label": "authSession", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "authDiscovery", - "label": "authDiscovery", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "username", - "label": "username", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "password", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "usernameInitiator", - "label": "usernameInitiator", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "passwordInitiator", - "label": "passwordInitiator", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "autoPermissions", - "label": "Automatic Permissions Configuration", - "description": "Automatically set permissions", - "schema": { - "show_if": [ - [ - "type", - "!=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "chown", - "label": "Run CHOWN", - "description": "It will run CHOWN on the path with the given fsGroup\n", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "chmod", - "label": "Run CHMOD", - "description": "It will run CHMOD on the path with the given value
    \nFormat should be 3 digits, e.g. 770\n", - "schema": { - "type": "string", - "valid_chars": "[0-9]{3}", - "default": "" - } - }, - { - "variable": "recursive", - "label": "Recursive", - "description": "It will run CHOWN and CHMOD recursively\n", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - }, - { - "variable": "readOnly", - "label": "Read Only", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "show_if": [ - [ - "type", - "=", - "hostPath" - ] - ], - "type": "hostpath" - } - }, - { - "variable": "mountPath", - "label": "Mount Path", - "description": "Path inside the container the storage is mounted", - "schema": { - "type": "string", - "default": "", - "required": true, - "valid_chars": "^\\/([a-zA-Z0-9._-]+(\\s?[a-zA-Z0-9._-]+|\\/?))+$" - } - }, - { - "variable": "medium", - "label": "EmptyDir Medium", - "schema": { - "show_if": [ - [ - "type", - "=", - "emptyDir" - ] - ], - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "Memory", - "description": "Memory" - } - ] - } - }, - { - "variable": "size", - "label": "Size Quotum of Storage", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "256Gi" - } - }, - { - "variable": "storageClass", - "label": "storageClass (Advanced)", - "description": "sets the storageClass to something other than iX default. Only for advanced usecases!", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "static", - "label": "Static Fixed PVC Bindings (Experimental)", - "description": "Link a PVC to a specific storage location", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "mode", - "label": "mode", - "description": "disabled: use normal dynamic PVCs\nsmb: connect to an SMB share\nnfs: connect to an NFS share\n", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "smb", - "description": "smb" - }, - { - "value": "nfs", - "description": "nfs" - } - ] - } - }, - { - "variable": "server", - "label": "Server", - "description": "server to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "myserver" - } - }, - { - "variable": "share", - "label": "Share", - "description": "share to connect to", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "!=", - "disabled" - ] - ], - "default": "/myshare" - } - }, - { - "variable": "user", - "label": "User", - "description": "connecting user", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "myuser" - } - }, - { - "variable": "domain", - "label": "Domain", - "description": "user domain", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - }, - { - "variable": "password", - "label": "Password", - "description": "connecting password", - "schema": { - "type": "string", - "show_if": [ - [ - "mode", - "=", - "smb" - ] - ], - "default": "" - } - } - ] - } - }, - { - "variable": "volumeSnapshots", - "label": "Volume Snapshots (Experimental)", - "description": "Add an entry to the list to force creation of a volumeSnapshot of this PVC", - "schema": { - "show_if": [ - [ - "type", - "=", - "pvc" - ] - ], - "type": "list", - "default": [], - "items": [ - { - "variable": "volumeSnapshotEntry", - "label": "Custom volumeSnapshot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "description": "WARNING: renaming this, means deletion of the snapshot with the old name!", - "schema": { - "type": "string", - "default": "mysnapshot", - "required": true - } - }, - { - "variable": "volumeSnapshotClassName", - "label": "volumeSnapshot Class Name (Advanced)", - "description": "For use with PVCs using a non-default storageClass", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "", - "group": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name (Optional)", - "description": "Defaults to chart name", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description (Optional)", - "description": "Defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "icon", - "label": "Icon (Optional)", - "description": "Defaults to chart icon", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "widget", - "label": "Widget Settings", - "schema": { - "type": "dict", - "additional_attrs": true, - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "attrs": [ - { - "variable": "enabled", - "label": "Enable Widget", - "description": "When disabled all widget annotations are skipped.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "custom", - "label": "Options", - "schema": { - "type": "dict", - "additional_attrs": true, - "attrs": [ - { - "variable": "key", - "label": "API-key (key)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "customkv", - "label": "Custom Options", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "option", - "label": "Option", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingressList", - "label": "Add Manual Custom Ingresses", - "group": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressListEntry", - "label": "Custom Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - }, - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "ingressClassName", - "label": "IngressClass Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - }, - { - "variable": "overrideService", - "label": "Linked Service", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Service Name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "port", - "label": "Service Port", - "schema": { - "type": "int" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your Cert-Manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Secret (Advanced)", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - }, - { - "variable": "homepage", - "label": "Homepage", - "description": "Connect ingress with Homepage", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "name", - "label": "Name", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "description", - "label": "Description", - "description": "defaults to chart description", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "group", - "label": "Group", - "schema": { - "type": "string", - "required": true, - "default": "default", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "securityContext", - "group": "SecurityContext", - "label": "Security Context", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "container", - "label": "Container", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "runAsUser", - "label": "runAsUser", - "description": "The UserID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "runAsGroup", - "label": "runAsGroup", - "description": "The groupID of the user running the application", - "schema": { - "type": "int", - "default": 568 - } - }, - { - "variable": "PUID", - "label": "Process User ID - PUID", - "description": "When supported by the container, this sets the User ID running the Application Process. Not supported by all Apps", - "schema": { - "type": "int", - "show_if": [ - [ - "runAsUser", - "=", - 0 - ] - ], - "default": 568 - } - }, - { - "variable": "UMASK", - "label": "UMASK", - "description": "When supported by the container, this sets the UMASK for the App. Not supported by all Apps", - "schema": { - "type": "string", - "default": "0022" - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "privileged", - "label": "Privileged mode", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "readOnlyRootFilesystem", - "label": "ReadOnly Root Filesystem", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - } - ] - } - }, - { - "variable": "pod", - "label": "Pod", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "fsGroupChangePolicy", - "label": "When should we take ownership?", - "schema": { - "type": "string", - "default": "OnRootMismatch", - "enum": [ - { - "value": "OnRootMismatch", - "description": "OnRootMismatch" - }, - { - "value": "Always", - "description": "Always" - } - ] - } - }, - { - "variable": "supplementalGroups", - "label": "Supplemental Groups", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "supplementalGroupsEntry", - "label": "Supplemental Group", - "schema": { - "type": "int" - } - } - ] - } - }, - { - "variable": "fsGroup", - "label": "fsGroup", - "description": "The group that should own ALL storage.", - "schema": { - "type": "int", - "default": 568 - } - } - ] - } - } - ] - } - }, - { - "variable": "resources", - "group": "Resources", - "label": "Resource Limits", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "limits", - "label": "Advanced Limit Resource Consumption", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "4000m", - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "8Gi", - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - }, - { - "variable": "gpu.intel.com/i915", - "label": "Add Intel i915 GPUs", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "nvidia.com/gpu", - "label": "Add NVIDIA GPUs (Experimental)", - "schema": { - "type": "int", - "default": 0 - } - }, - { - "variable": "amd.com/gpu", - "label": "Add AMD GPUs", - "schema": { - "type": "int", - "default": 0 - } - } - ] - } - }, - { - "variable": "requests", - "label": "Minimum Resources Required (request)", - "schema": { - "additional_attrs": true, - "type": "dict", - "hidden": true, - "attrs": [ - { - "variable": "cpu", - "label": "CPU", - "description": "1000m means 1 hyperthread. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "10m", - "hidden": true, - "valid_chars": "^(?!^0(\\.0|m|)$)([0-9]+)(\\.[0-9]|m?)$" - } - }, - { - "variable": "memory", - "label": "RAM", - "description": "1Gi means 1 Gibibyte RAM. Detailed info: https://truecharts.org/manual/SCALE/validation", - "schema": { - "type": "string", - "default": "50Mi", - "hidden": true, - "valid_chars": "^(?!^0(e[0-9]|[EPTGMK]i?|)$)([0-9]+)(|[EPTGMK]i?|e[0-9]+)$" - } - } - ] - } - } - ] - } - }, - { - "variable": "deviceList", - "label": "Mount USB Devices", - "group": "Devices", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "deviceListEntry", - "label": "Device", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable the Storage", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "type", - "label": "(Advanced) Type of Storage", - "description": "Sets the persistence type", - "schema": { - "type": "string", - "default": "device", - "hidden": true - } - }, - { - "variable": "readOnly", - "label": "readOnly", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "hostPath", - "label": "Host Device Path", - "description": "Path to the device on the host system", - "schema": { - "type": "path" - } - }, - { - "variable": "mountPath", - "label": "Container Device Path", - "description": "Path inside the container the device is mounted", - "schema": { - "type": "string", - "default": "/dev/ttyACM0" - } - } - ] - } - } - ] - } - }, - { - "variable": "metrics", - "group": "Metrics", - "label": "Prometheus Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "main", - "label": "Main Metrics", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "prometheusRule", - "label": "PrometheusRule", - "description": "Enable and configure Prometheus Rules for the App.", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "description": "Enable Prometheus Metrics", - "schema": { - "type": "boolean", - "default": false - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "networkPolicy", - "group": "Experimental", - "label": "(Advanced) Network Policy", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "netPolicyEntry", - "label": "Network Policy Entry", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true, - "default": "" - } - }, - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "policyType", - "label": "Policy Type", - "schema": { - "type": "string", - "default": "", - "enum": [ - { - "value": "", - "description": "Default" - }, - { - "value": "ingress", - "description": "Ingress" - }, - { - "value": "egress", - "description": "Egress" - }, - { - "value": "ingress-egress", - "description": "Ingress and Egress" - } - ] - } - }, - { - "variable": "egress", - "label": "Egress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "egressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "to", - "label": "To", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "toEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "ingressEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "from", - "label": "From", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "fromEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "ipBlock", - "label": "IP Block", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "cidr", - "label": "CIDR", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "except", - "label": "Except", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "exceptint", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - }, - { - "variable": "namespaceSelector", - "label": "Namespace Selector", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "podSelector", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "matchExpressions", - "label": "Match Expressions", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "expressionEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "key", - "label": "Key", - "schema": { - "type": "string" - } - }, - { - "variable": "operator", - "label": "Operator", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "In", - "description": "In" - }, - { - "value": "NotIn", - "description": "NotIn" - }, - { - "value": "Exists", - "description": "Exists" - }, - { - "value": "DoesNotExist", - "description": "DoesNotExist" - } - ] - } - }, - { - "variable": "values", - "label": "Values", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "value", - "label": "", - "schema": { - "type": "string" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ports", - "label": "Ports", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "portsEntry", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int" - } - }, - { - "variable": "endPort", - "label": "End Port", - "schema": { - "type": "int" - } - }, - { - "variable": "protocol", - "label": "Protocol", - "schema": { - "type": "string", - "default": "TCP", - "enum": [ - { - "value": "TCP", - "description": "TCP" - }, - { - "value": "UDP", - "description": "UDP" - }, - { - "value": "SCTP", - "description": "SCTP" - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "addons", - "group": "Addons", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "Codeserver", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "service", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Service Type", - "description": "ClusterIP's are only internally available and Loadbalancer exposes the service using the system loadbalancer", - "schema": { - "type": "string", - "default": "LoadBalancer", - "enum": [ - { - "value": "NodePort", - "description": "Deprecated CHANGE THIS" - }, - { - "value": "ClusterIP", - "description": "ClusterIP" - }, - { - "value": "LoadBalancer", - "description": "LoadBalancer" - } - ] - } - }, - { - "variable": "loadBalancerIP", - "label": "LoadBalancer IP", - "description": "MetalLB Only: Selects the Loadbalancer IP to expose on. Required when using PortalButton with MetalLB", - "schema": { - "show_if": [ - [ - "type", - "=", - "LoadBalancer" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "ports", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "codeserver", - "label": "", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "port", - "label": "Port", - "schema": { - "type": "int", - "default": 36107 - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "ingress", - "label": "Ingress", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enable Ingress", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "hosts", - "label": "Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "hostEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "host", - "label": "HostName", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "paths", - "label": "Paths", - "schema": { - "type": "list", - "default": [ - { - "path": "/", - "pathType": "Prefix" - } - ], - "items": [ - { - "variable": "pathEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "path", - "label": "Path", - "schema": { - "type": "string", - "required": true, - "default": "/" - } - }, - { - "variable": "pathType", - "label": "Path Type", - "schema": { - "type": "string", - "required": true, - "default": "Prefix" - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "integrations", - "label": "Integrations", - "description": "Connect ingress with other charts", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "traefik", - "label": "Traefik", - "description": "Connect ingress with Traefik", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "allowCors", - "label": "Allow Cross Origin Requests (advanced)", - "schema": { - "type": "boolean", - "default": false, - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - }, - { - "variable": "entrypoints", - "label": "Entrypoints", - "schema": { - "type": "list", - "default": [ - "websecure" - ], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "entrypoint", - "label": "Entrypoint", - "schema": { - "type": "string" - } - } - ] - } - }, - { - "variable": "middlewares", - "label": "Middlewares", - "schema": { - "type": "list", - "default": [], - "show_if": [ - [ - "enabled", - "=", - true - ] - ], - "items": [ - { - "variable": "middleware", - "label": "Middleware", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "name", - "schema": { - "type": "string", - "default": "", - "required": true - } - }, - { - "variable": "namespace", - "label": "namespace (optional)", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "certManager", - "label": "certManager", - "description": "Connect ingress with certManager", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "enabled", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "certificateIssuer", - "label": "certificateIssuer", - "description": "defaults to chartname", - "schema": { - "type": "string", - "default": "", - "show_if": [ - [ - "enabled", - "=", - true - ] - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "advanced", - "label": "Show Advanced Settings", - "description": "Advanced settings are not covered by TrueCharts Support", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "ingressClassName", - "label": "(Advanced/Optional) IngressClass Name", - "schema": { - "type": "string", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": "" - } - }, - { - "variable": "tls", - "label": "TLS-Settings", - "schema": { - "type": "list", - "show_if": [ - [ - "advanced", - "=", - true - ] - ], - "default": [], - "items": [ - { - "variable": "tlsEntry", - "label": "Host", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "hosts", - "label": "Certificate Hosts", - "schema": { - "type": "list", - "default": [], - "items": [ - { - "variable": "host", - "label": "Host", - "schema": { - "type": "string", - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "certificateIssuer", - "label": "Use Cert-Manager clusterIssuer", - "description": "add the name of your cert-manager clusterIssuer here for automatic tls certificates.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "clusterCertificate", - "label": "Cluster Certificate (Advanced)", - "description": "Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart.", - "schema": { - "type": "string", - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "default": "" - } - }, - { - "variable": "secretName", - "label": "Use Custom Certificate Secret (Advanced)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "string", - "default": "" - } - }, - { - "variable": "scaleCert", - "label": "Use TrueNAS SCALE Certificate (Deprecated)", - "schema": { - "show_if": [ - [ - "certificateIssuer", - "=", - "" - ] - ], - "type": "int", - "$ref": [ - "definitions/certificate" - ], - "enum": [ - { - "value": null, - "description": "No Certificate" - } - ], - "default": null, - "null": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "envList", - "label": "Codeserver Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "netshoot", - "label": "Netshoot", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "enabled", - "label": "Enabled", - "schema": { - "type": "boolean", - "default": false, - "show_subquestions_if": true, - "subquestions": [ - { - "variable": "envList", - "label": "Netshoot Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "vpn", - "label": "VPN", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "type", - "label": "Type", - "schema": { - "type": "string", - "default": "disabled", - "enum": [ - { - "value": "disabled", - "description": "disabled" - }, - { - "value": "gluetun", - "description": "Gluetun" - }, - { - "value": "tailscale", - "description": "Tailscale" - }, - { - "value": "openvpn", - "description": "OpenVPN (Deprecated)" - }, - { - "value": "wireguard", - "description": "Wireguard (Deprecated)" - } - ] - } - }, - { - "variable": "openvpn", - "label": "OpenVPN Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "openvpn" - ] - ], - "attrs": [ - { - "variable": "username", - "label": "Authentication Username (Optional)", - "description": "Authentication Username, Optional", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "password", - "label": "Authentication Password", - "description": "Authentication Credentials", - "schema": { - "type": "string", - "show_if": [ - [ - "username", - "!=", - "" - ] - ], - "default": "", - "required": true - } - } - ] - } - }, - { - "variable": "tailscale", - "label": "Tailscale Settings", - "schema": { - "additional_attrs": true, - "type": "dict", - "show_if": [ - [ - "type", - "=", - "tailscale" - ] - ], - "attrs": [ - { - "variable": "authkey", - "label": "Authentication Key", - "description": "Provide an auth key to automatically authenticate the node as your user account.", - "schema": { - "type": "string", - "private": true, - "default": "" - } - }, - { - "variable": "auth_once", - "label": "Auth Once", - "description": "Only attempt to log in if not already logged in.", - "schema": { - "type": "boolean", - "default": true - } - }, - { - "variable": "accept_dns", - "label": "Accept DNS", - "description": "Accept DNS configuration from the admin console.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "userspace", - "label": "Userspace", - "description": "Userspace Networking mode allows running Tailscale where you do not have access to create a VPN tunnel device.", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "variable": "routes", - "label": "Routes", - "description": "Expose physical subnet routes to your entire Tailscale network.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "dest_ip", - "label": "Destination IP", - "description": "Tells the DNAT mechanism which Destination IP to set in the IP header, and where to send packets that are matched.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "sock5_server", - "label": "Sock5 Server", - "description": "The address on which to listen for SOCKS5 proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "outbound_http_proxy_listen", - "label": "Outbound HTTP Proxy Listen", - "description": "The address on which to listen for HTTP proxying into the tailscale net.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "extra_args", - "label": "Extra Args", - "description": "Extra Args", - "schema": { - "type": "string", - "default": "" - } - }, - { - "variable": "daemon_extra_args", - "label": "Tailscale Daemon Extra Args", - "description": "Tailscale Daemon Extra Args", - "schema": { - "type": "string", - "default": "" - } - } - ] - } - }, - { - "variable": "killSwitch", - "label": "Enable Killswitch", - "schema": { - "type": "boolean", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": true - } - }, - { - "variable": "excludedNetworks_IPv4", - "label": "Killswitch Excluded IPv4 networks", - "description": "List of Killswitch Excluded IPv4 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv4", - "label": "IPv4 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "excludedNetworks_IPv6", - "label": "Killswitch Excluded IPv6 networks", - "description": "List of Killswitch Excluded IPv6 Addresses", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "networkv6", - "label": "IPv6 Network", - "schema": { - "type": "string", - "required": true - } - } - ] - } - }, - { - "variable": "configFile", - "label": "VPN Config File Location", - "schema": { - "type": "string", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": "" - } - }, - { - "variable": "envList", - "label": "VPN Environment Variables", - "schema": { - "type": "list", - "show_if": [ - [ - "type", - "!=", - "disabled" - ] - ], - "default": [], - "items": [ - { - "variable": "envItem", - "label": "Environment Variable", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "name", - "label": "Name", - "schema": { - "type": "string", - "required": true - } - }, - { - "variable": "value", - "label": "Value", - "schema": { - "type": "string", - "required": true, - "max_length": 10240 - } - } - ] - } - } - ] - } - } - ] - } - } - ] - } - }, - { - "variable": "docs", - "group": "Documentation", - "label": "Please read the documentation at https://truecharts.org", - "description": "Please read the documentation at
    https://truecharts.org", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDocs", - "label": "I have checked the documentation", - "schema": { - "type": "boolean", - "default": true - } - } - ] - } - }, - { - "variable": "donateNag", - "group": "Documentation", - "label": "Please consider supporting TrueCharts, see https://truecharts.org/sponsor", - "description": "Please consider supporting TrueCharts, see
    https://truecharts.org/sponsor", - "schema": { - "additional_attrs": true, - "type": "dict", - "attrs": [ - { - "variable": "confirmDonate", - "label": "I have considered donating", - "schema": { - "type": "boolean", - "default": true, - "hidden": true - } - } - ] - } - } - ] - }, - "app_readme": "

    A self-hosted data logger for your Tesla

    \n

    This App is supplied by TrueCharts, for more information visit the manual: https://truecharts.org/charts/incubator/TeslaMate

    \n
    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    ", - "detailed_readme": "
    \n

    title: README

    \n

    General Info

    \n

    TrueCharts can be installed as both normal Helm Charts or as TrueNAS SCALE Apps.\nBoth solutions are fully supported, but we heavily advice the use of normal Helm Charts where possible

    \n

    For more information about this Chart, please check the docs on the TrueCharts website

    \n

    This chart is not maintained by the upstream project and any issues with the chart should be raised here

    \n

    Installation

    \n

    Helm-Chart installation

    \n

    To install TrueCharts Helm charts using Helm, you can use our OCI Repository.

    \n

    helm install mychart oci://tccr.io/truecharts/CHARTNAME

    \n

    For more information on how to install TrueCharts Helm charts, checkout the instructions on the website: https://truecharts.org/helm/

    \n

    TrueNAS SCALE Apps

    \n

    For more information on how to use TrueCharts as TrueNAS SCALE Apps, please checkout the quick-start guides for TrueNAS SCALE.

    \n

    Configuration Options

    \n

    To view the chart specific options, please view Values.yaml included in the chart.

    \n

    All our Charts use a shared \"common\" library chart that contains most of the templating and options.\nFor the complete overview of all available options, please checkout the documentation for them on the website: https://truecharts.org/common/

    \n

    Chart Specific Guides and information

    \n

    All our charts have dedicated documentation pages.\nThe documentation for this chart can be found here:\nhttps://truecharts.org/charts/incubator/TeslaMate

    \n

    Support

    \n\n
    \n

    Sponsor TrueCharts

    \n

    TrueCharts can only exist due to the incredible effort of our staff.\nPlease consider making a donation or contributing back to the project any way you can!

    \n

    All Rights Reserved - The TrueCharts Project

    ", - "changelog": "

    for the complete changelog, please refer to the website

    \n

    Important:

    " - } -} \ No newline at end of file diff --git a/incubator/TeslaMate/item.yaml b/incubator/TeslaMate/item.yaml deleted file mode 100644 index 523614bafd4..00000000000 --- a/incubator/TeslaMate/item.yaml +++ /dev/null @@ -1,4 +0,0 @@ -icon_url: https://truecharts.org/img/hotlink-ok/chart-icons/TeslaMate.webp -categories: - - metrics -screenshots: []